Changing disk utilization output
Changing disk utilization output
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?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Changing disk utilization output
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
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?
For example, if you need to use GB, instead of MB, you can add a "-G" flag to the end of the command line.
Code: Select all
/usr/local/nagios/libexec/check_snmp_storage.pl -hBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Changing disk utilization output
yes would like to display the output in GB instead.
I tried adding in the -G but did not work.
I tried adding in the -G but did not work.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Changing disk utilization output
Where did you add it? I just tested this
without -G
with -G
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;11630Code: 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;11Re: Changing disk utilization output
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
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!
Thanks!
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Changing disk utilization output
Excellent, thanks for providing your solution!