Disable warning and critical states for a SNMP check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jdmoore
Posts: 2
Joined: Fri Apr 14, 2017 10:21 am

Disable warning and critical states for a SNMP check

Post by jdmoore »

Using Nagios XI 5.4.8 on RHEL 7.4

Create some services for a Windows server using the Wizard. The system memory is being checked with check_snmp_storage.pl. The current check command is this:

Code: Select all

check_snmp_storage.pl -H $HOSTADDRESS$  -C <community> --v2c -m 'Physical Memory' -w 95 -c 99 -f
There are several instances where the memory used will be 100% and I don't mind this. I however would like to keep the performance data.

I've tried leaving off -c and -w, but these are required. Setting to 0 also does not work. I've also attempted to just set both to 100 but this is also invalid.

Is it possible with the check_snmp_storage.pl, or if necessary another check, to get memory usage but not have warning or critical state? This same question would be true for other snmp checks as well, such as CPU usage. I still want to collect the information, and ideally a failure to connect would be bad, but any value between 0 and 100 would be OK.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Disable warning and critical states for a SNMP check

Post by dwhitfield »

The check_snmp_storage.pl that comes with XI is not compiled and is licensed under GPL, so feel free to make modifications in compliance with the GPL.

I took a peak at the code, but it's 668 lines (or 669 depending on how you count). It probably wouldn't take too awfully long to comment out all the warning and critical options, but strictly speaking this is custom development, and it's certainly not something I have time to do after coming back from a holiday weekend.

If you want to give modifying that script a shot and then report errors, a community member may be able to help you out. It's also possible that things will slow up for us and I can spend a little more time with it.

Additionally, you are always welcome to make plugin feature requests at https://github.com/nagios-plugins/nagio ... issues/new
jdmoore
Posts: 2
Joined: Fri Apr 14, 2017 10:21 am

Re: Disable warning and critical states for a SNMP check

Post by jdmoore »

dwhitfield wrote:The check_snmp_storage.pl that comes with XI is not compiled and is licensed under GPL, so feel free to make modifications in compliance with the GPL.
Is there an already existing way to gather the performance data without alerting on it's values? I don't have a requirement that I use check_snmp_storage.pl, so if there is another (more correct) method of doing this, I'd prefer that. Or is modifying the check the right thing to do?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Disable warning and critical states for a SNMP check

Post by dwhitfield »

*Probably*, modification is the way to go. Alternatively, there might be something on exchange.nagios.com, but with over 4200 plugins, no one has exhaustive knowledge of what's out there. There may well be a simpler plugin that would be easier to modify.

That all said, do you really not want to alert, or do you not want to notify? You could certainly turn off notifications easily in the CCM. It would still show up in the UI though.

And, for clarity, it will still show up in the UI if you modify the script. It's just that you can set it to ok (aka green).
Locked