ConSol-Monitoring / snclient

SNClient+ - Cross platform monitoring agent
MIT License
48 stars 8 forks source link

No PerfData for check_drivesize when using warn and crit other than used_pct #136

Closed Stefan-Hoesl closed 1 month ago

Stefan-Hoesl commented 1 month ago

Hello,

I am monitoring Linux und Windows server with check_nsc_web. When calling check_drivsize with the default parameters performance data ist returned. If I use used_pct for for warn and crit the perfomance data is also returned. If I us any other filters than used_pct, no performance data is returned.

sni commented 1 month ago

do you have an example? i cannot reproduce that:

check_drivesize drive=/ filter="size > 5GB"
OK - All 1 drive(s) are ok |'/ used'=257947115520B;391656354611;440613398938;0;489570443264 '/ used %'=52.7%;80;90;0;100

check_drivesize drive=/ warn="free < 5%"
OK - All 1 drive(s) are ok |'/ free'=206664941568B;24478522163:;;0;489570443264 '/ free %'=42.2%;5:;;0;100 '/ used'=257961451520B;;440613398938;0;489570443264 '/ used %'=52.7%;;90;0;100

check_drivesize drive=/ warn="free_pct < 5%"
OK - All 1 drive(s) are ok |'/ free'=206658510848B;24478522163:;;0;489570443264 '/ free %'=42.2%;5:;;0;100 '/ used'=257967882240B;;440613398938;0;489570443264 '/ used %'=52.7%;;90;0;100
Stefan-Hoesl commented 1 month ago

With warning and critical there is no perfdata. If I only use waring then perfdata is shown. The Agent is at version 0.26.

'/.../check_nsc_web' '-config' '/.../check_nsc_web.config' '-k' '-u' 'https://server:8443' 'check_drivesize' 'drive=/' 'warning=free_bytes<75GB' 'critical=free_bytes<38GB'
CRITICAL - / 5.462 GiB/29.985 GiB (18.2%)

'/.../check_nsc_web' '-config' '/.../check_nsc_web.config' '-k' '-u' 'https://server:8443' 'check_drivesize' 'drive=/' 'warning=free_bytes<75GB'
WARNING - / 5.462 GiB/29.985 GiB (18.2%) |'/ used'=5864632320B;;28976873472;0;32196526080 '/ used %'=18.2%;;90;0;100

'/.../check_nsc_web' '-config' '/.../check_nsc_web.config' '-k' '-u' 'https://server:8443' 'check_drivesize' 'drive=/'
OK - All 1 drive(s) are ok |'/ used'=5864632320B;25757220864;28976873472;0;32196526080 '/ used %'=18.2%;80;90;0;100
sni commented 1 month ago

thanks for reporting this, should be fine now.