Can't Get "alias_disk" to use GB instead of % when checking
Posted: Tue Nov 28, 2017 10:07 am
I have the current check as follows on a windows 2008 r2 server:
pretty standard
so i wanted it to check usign disk size ratehr than percentage. So changed it to this:
and restarted the remote servers NSclient.
running a manual check from nagios :
successfully reports "CRITICAL: C:\: Total: 49.7G - Used: 20.6G (41%) - Free: 29.1G (59%) < critical|'C:\ %'=59%;29;39 'C:\'=20.57G;35;30;0;49.65"
The problem is when nagios automatically runs a schdueled check it reports back as "OK: all drives within bounds
I did a bit of digging to see how it is set up and the disk space check i think is set up as follows:
define service{
use generic-service
host_name !mail.poad
hostgroup_name pod-pl-iis2
service_description Drive Space
check_command check_nrpe!alias_disk_loose
servicegroups drivespace
}
define servicegroup{
servicegroup_name drivespace
alias Drive_Space
}
so i changed the alias_disk_loose as well to match (and restarted the remote windows NSclient)
Again. manual run of the check reports correctly. nagios automatic nrpe check of it reports no errors.
apologise if i've missed anythign vital off - Still working my way around this application and i'm not sure where to look next
any help would be appreciated
Regards
Code: Select all
; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXEDso i wanted it to check usign disk size ratehr than percentage. So changed it to this:
Code: Select all
; alias_disk - Alias for alias_disk. To configure this item add a section called: /settings/external scripts/alias/alias_disk
alias_disk = CheckDriveSize MinWarn=35GB MinCrit=30GB CheckAll FilterType=FIXEDrunning a manual check from nagios :
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H pod-pl-iis2 -c alias_diskThe problem is when nagios automatically runs a schdueled check it reports back as "OK: all drives within bounds
I did a bit of digging to see how it is set up and the disk space check i think is set up as follows:
define service{
use generic-service
host_name !mail.poad
hostgroup_name pod-pl-iis2
service_description Drive Space
check_command check_nrpe!alias_disk_loose
servicegroups drivespace
}
define servicegroup{
servicegroup_name drivespace
alias Drive_Space
}
so i changed the alias_disk_loose as well to match (and restarted the remote windows NSclient)
Code: Select all
; alias_disk_loose - Alias for alias_disk_loose. To configure this item add a section called: /settings/external scripts/alias/alias_disk_loose
alias_disk_loose = CheckDriveSize MinWarn=35GB MinCrit=30GB CheckAll FilterType=FIXED ignore-unreadableapologise if i've missed anythign vital off - Still working my way around this application and i'm not sure where to look next
any help would be appreciated
Regards