mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
239 stars 94 forks source link

check_driveSize filter by drive size >0 #693

Closed hs-hub-world closed 4 years ago

hs-hub-world commented 4 years ago

Hello,

Is there any way to filter using drive size having more than zero this will eliminate Drives like Floppy (A:, D:, etc.) example: ./check_nrpe -2 -H server1 -p 5666 -t 240 -n -c Check_DriveSize mounted -a 'perf-config=(unit:G)' "filter=size>0"

This returns No drives found

Thank you HS

hs-hub-world commented 4 years ago

Got it! in case anyone else is looking: ./check_nrpe -2 -H server1 -p 5666 -t 240 -n -c Check_DriveSize mounted -a 'perf-config=(unit:G)' "filter=size>0M"

And here is the final version: check_nrpe!Check_DriveSize! mounted -a 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free} free / ${size} total}' top-syntax='${status}: ${problem_list}' 'crit=free<500M' 'warn=free<1G' exclude='System Reserved' "filter=size>0M"

Thanks!