Page 1 of 1
Getting too much info on file system
Posted: Tue Mar 20, 2018 6:23 am
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!
Re: Getting too much info on file system
Posted: Tue Mar 20, 2018 4:26 pm
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.
Re: Getting too much info on file system
Posted: Wed Mar 21, 2018 11:12 am
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.
Re: Getting too much info on file system
Posted: Wed Mar 21, 2018 3:20 pm
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
Re: Getting too much info on file system
Posted: Fri Mar 23, 2018 9:58 am
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.
Re: Getting too much info on file system
Posted: Fri Mar 23, 2018 10:05 am
by tmcdonald
We'll keep this open for you.