Page 1 of 1
Changing disk utilization output
Posted: Thu Nov 01, 2012 2:57 pm
by mbrowning
Is there a way that I can change how the disk utilization output is displayed. Currently our checks through snmp (check_snmp_storage.pl) will display in total MB used/free. Can I go into the config of the check_snmp_storage.pl and change that?
Re: Changing disk utilization output
Posted: Thu Nov 01, 2012 4:49 pm
by scottwilkerson
Looking at the help file you should be able to add the -T flag to change the calculation
Code: Select all
[root@localhost libexec]# ./check_snmp_storage.pl -h
SNMP Disk Monitor for Nagios version 1.3.3
(c)2004-2007 Patrick Proy
...
-T, --type=TYPE
pl : calculate percent left
pu : calculate percent used (Default)
bl : calculate MegaBytes left
bu : calculate MegaBytes used
...
Note :
with T=pu or T=bu : OK < warn < crit
with T=pl ot T=bl : crit < warn < OK
If multiple storage are selected, the worse condition will be returned
i.e if one disk is critical, the return is critical
...
Re: Changing disk utilization output
Posted: Thu Nov 01, 2012 4:52 pm
by lmiltchev
How exactly do you want to change the output? Can't you find any options that you can use, instead of trying to modify the "check_snmp_storage.pl" file?
Code: Select all
/usr/local/nagios/libexec/check_snmp_storage.pl -h
For example, if you need to use GB, instead of MB, you can add a "-G" flag to the end of the command line.
Re: Changing disk utilization output
Posted: Mon Nov 05, 2012 11:24 am
by mbrowning
yes would like to display the output in GB instead.
I tried adding in the -G but did not work.
Re: Changing disk utilization output
Posted: Mon Nov 05, 2012 12:26 pm
by scottwilkerson
Where did you add it? I just tested this
without -G
Code: Select all
[root@localhost libexec]# ./check_snmp_storage_wizard.pl -H 192.168.5.168 -C public --v2c -m "^/$" -w 80 -c 95 -f
/: 53%used(6141MB/11630MB) (<80%) : OK | '/'=6141MB;9304;11049;0;11630
with -G
Code: Select all
[root@localhost libexec]# ./check_snmp_storage_wizard.pl -H 192.168.5.168 -C public --v2c -m "^/$" -w 80 -c 95 -f -G
/: 53%used(6GB/11GB) (<80%) : OK | '/'=6GB;9;11;0;11
Re: Changing disk utilization output
Posted: Tue Nov 06, 2012 4:47 pm
by mbrowning
I dont see a check_snmp_storage_wizard.pl. The one that I am using is the check_snmp_storage.pl and does not seem to work with that.
Re: Changing disk utilization output
Posted: Wed Nov 07, 2012 4:49 pm
by mbrowning
I found that the version of the check_snmp_storage that I had was an older version. I updated to latest version of NagiosXI and I can now add in the -G and gives output in GB.
Thanks!
Re: Changing disk utilization output
Posted: Wed Nov 07, 2012 5:51 pm
by slansing
Excellent, thanks for providing your solution!