Nagios «Status Information» doesn’t show the drive status when status is OK


#1

Hello, We use «Nagios Core 4.2.4» and plugin «check_npre 3.0.1», with «NSClient++ 0.5.0.62» on Windows servers. When we check space on a single drive or volume, we want to obtain the following data in Status Information: drive status (OK, Warning or Critical) - according to thresholds set with «warn» and «crit» options - and drive total, free (GB and %) and used (GB and %) space. We are using the following syntax: ./check_nrpe -H host address -c check_drivesize -a “warn=used gt 90%” “crit=used gt 95%” show-all “detail-syntax=%(drive): Total: %(size) - Used: %(total_used) (%(total_used_pct)%) - Free: %(total_free) (%(total_free_pct)%)” drive=C Unfortunately, with this syntax, «Status Information» doesn’t show the drive status when it’s OK, although it shows the drive status when it’s «Warning» or «Critical». Here are Status Information examples in these 3 different situations:

  • C:: Total: 79.656GB - Used: 61.292GB (77%) - Free: 18.364GB (23%) [result for “warn=used gt 90%” “crit=used gt 95%”]
  • warning(C:: Total: 79.656GB - Used: 61.292GB (77%) - Free: 18.364GB (23%)) [result for “warn=used gt 75%” “crit=used gt 95%”]
  • critical(C:: Total: 79.656GB - Used: 61.292GB (77%) - Free: 18.364GB (23%)) [result for “warn=used gt 75%” “crit=used gt 75%”] We use:
  1. «show-all» option, to obtain drive total, free and used space when status is OK. If this option is not used and status is OK, «Status Information» is «OK All 1 drive(s) are ok»;
  2. «top-syntax» option, not to obtain a duplicated drive status when it’s «warning» or «critical». In fact, without this option, «Status Information» is like this:
  • OK C:: Total: 79.656GB - Used: 61.298GB (77%) - Free: 18.358GB (23%)
  • WARNING warning(C:: Total: 79.656GB - Used: 61.297GB (77%) - Free: 18.36GB (23%))
  • CRITICAL critical(C:: Total: 79.656GB - Used: 61.297GB (77%) - Free: 18.36GB (23%)) Can someone help us please? Thanks in advance!