Changing disk utilization output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mbrowning
Posts: 34
Joined: Tue Oct 23, 2012 9:51 am

Changing disk utilization output

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Changing disk utilization output

Post 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
...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Changing disk utilization output

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mbrowning
Posts: 34
Joined: Tue Oct 23, 2012 9:51 am

Re: Changing disk utilization output

Post by mbrowning »

yes would like to display the output in GB instead.

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mbrowning
Posts: 34
Joined: Tue Oct 23, 2012 9:51 am

Re: Changing disk utilization output

Post 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.
mbrowning
Posts: 34
Joined: Tue Oct 23, 2012 9:51 am

Re: Changing disk utilization output

Post 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!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Changing disk utilization output

Post by slansing »

Excellent, thanks for providing your solution!
Locked