Getting too much info on file system

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Getting too much info on file system

Post by andrewatmacys »

I have a check_snmp_storage_wizard.pl command running and it is giving me too much information, it's returning information on every file system being monitored instead of the one that's being alerted on. I am able to monitor all the file systems I want to monitor, but would like to only get information on the directories I am alerting on. For example, if I am monitoring /home, /root, /cdrom, and /archive, and /archive is above 85%, I would like the check to only alert on /archive and send only that, not the status of the other three, if that makes sense.

Thank you in advance, I hope there is a way to do this!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting too much info on file system

Post by npolovenko »

Hello, @andrewatmacys .
Can you show us the command definition as well as an example of the output from this plugin? Either way, I don't think this plugin supports multiple directories. You may need to create separate commands for each directory.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Re: Getting too much info on file system

Post by andrewatmacys »

Here is the command:

[nagios@<server> ~]$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 127.0.0.1 --login=login --passwd=passwd --privpass=privpass --protocols=sha,aes -m "(/cdrom|/hadoop)" -e -q Disk -w 85 -c 95 -f

It's excluding the two directories listed in the command, but when it alerts to file systems that are over the threshold, it sends data on every directory. I would like for it to only send information on the directories that are over the capacity threshold.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Getting too much info on file system

Post by npolovenko »

@andrewatmacys , Can you try running the command with the -S argument:

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 127.0.0.1 --login=login --passwd=passwd --privpass=privpass --protocols=sha,aes -m "(/cdrom|/hadoop)" -e -q Disk -w 85 -c 95 -f -S1 

Code: Select all

-S, --short=<type>[,<where>,<cut>]
   <type>: Make the output shorter :
     0 : only print the global result except the disk in warning or critical
         ex: "< 80% : OK"
     1 : Don't print all info for every disk
         ex : "/ : 66 %used  (<  80) : OK"
   <where>: (optional) if = 1, put the OK/WARN/CRIT at the beginning
   <cut>: take the <n> first caracters or <n> last if n<0
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Re: Getting too much info on file system

Post by andrewatmacys »

Sorry for the delayed reply. It doesn't seem to be working as intended. I'll play around with it a little and let you know if I get it working before you respond.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Getting too much info on file system

Post by tmcdonald »

We'll keep this open for you.
Former Nagios employee
Locked