mickem / nscp

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

CheckDriveSize Space with Limits defined in MB/GB etc, returns warn 0 crit 0 in Perfdata #686

Open andreasgottwald opened 4 years ago

andreasgottwald commented 4 years ago

Issue and Steps to Reproduce

Setup CheckDriveSize with Limits in MB or GB, allow Perfdata return. You will get these:

OK d:: Total: 599.997GB - Used: 142.78GB (24%) - Free: 457.217GB (76%)|'d: free'=457.21684GB;0.78125;0.39062;0;599.99706 'd: free %'=76%;0;0;0;100

'CheckDriveSize' '-p' '5666' '-t' '10' '-a' 'Drive=d' 'MinWarn=800M' 'MinCrit=400M'

Expected Behavior

If one chooses to use free disk space as their measurement either the limits must be dynamically generated for % or set to nothing (=76%;;;0;100)

Actual Behavior

The Perfdata in this instance shows in icinga the % loop as critical, because it returns the limits 0 0.

Details

andreasgottwald commented 4 years ago

image