Page 1 of 1
Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Mon Feb 01, 2016 2:23 pm
by TylerTX
I'm pulling temp/humidity data from a sensor connected to a Netbotz Rack Monitor 570. This was simple enough using a configuration wizard and both values are displayed correctly using OIDs.
1. How would I go about creating both a high and low alert for humidity levels?
2. Is this even possible using a single service?
3. Is it possible to show the warning/critical level markings for both high and low values on a single dashlet gauge?
I bounced between Nagios forums and Nagios Exchange last week digging around for an easy solution that would fit my needs. I couldn't find anything that would allow me to just plug in an OID and give me the results I need for humidity alerting/monitoring. I'm certainly open to a little work if it's required.
At this point, anything would be helpful. Links to plugins or previous discussion are appreciated. Thanks in advance.
Nagios Installed Version: 5.2.2
Re: Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Mon Feb 01, 2016 2:56 pm
by lmiltchev
It seems like this plugin uses the "built in" thresholds in the system:
TEMP_OID = "PowerNet-MIB::emsProbeStatusProbeTemperature"
TEMP_HIGH_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeHighTempThresh"
TEMP_LOW_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeLowTempThresh"
TEMP_MAX_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeMaxTempThresh"
TEMP_MIN_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeMinTempThresh"
HUMIDITY_OID = "PowerNet-MIB::emsProbeStatusProbeHumidity"
HUMIDITY_HIGH_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeHighHumidityThresh"
HUMIDITY_LOW_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeLowHumidityThresh"
HUMIDITY_MAX_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeMaxHumidityThresh"
HUMIDITY_MIN_TRESH_OID = "PowerNet-MIB::emsProbeStatusProbeMinHumidityThresh"
I don't see an option to specify warning/critical thresholds/ranges from the CLI.
Code: Select all
[root@localhost scripts]# /usr/local/nagios/libexec/check_netbotz.py -h
Usage: check_netbotz.py [options]
Options:
-h, --help show this help message and exit
-H HOST, --host=HOST NetBotz Host Name
-c COMMUNITY, --community=COMMUNITY
SNMP Community Name. [Default:public]
-t TYPE, --type=TYPE Test Type. Valid values are 'temp' for tempratue test,
and 'humid' for humidity tests. [Default:temp]
-e ONERROR, --onerror=ONERROR
On error exit code. Valid values are 1 for warning, 2
for critical. [Default:2]
Re: Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Tue Feb 02, 2016 9:31 am
by TylerTX
Thank you for the response. I tried that plugin earlier and quickly moved on after receiving the message 'UNKNOWN: Cannot interact with NetBotz SNMP Agent'. It's possible that I'm doing something wrong, but as you noted, the arguments are short and sweet. I'm not sure you can mess up ./script -H x.x.x.x -c public. If they had the knowledge, I imagine someone could substitute another MIB to match it up with their device.
Since I'm already using the OID for grabbing the values, would it be possible to just create a service with check_snmp? It looks like you can use multiple OIDs, so could I just check the same OID several times within the check using different levels of warnings and criticals for each?
Something like ./check_snmp -H x.x.x.x -c20:80 -C public
That's probably too simple and I honestly don't know how to write an alert that will alert for warn/crit with multiple thresholds. Would you need more than one service? I would like to be alerted as follows:
0 - CRIT - 20 - WARN - 40 - OK - 60 - WARN - 80 - CRIT - 100
I suppose I could write a single alert for each, one to alert for critical at 0 to 20, etc. But is there an easier way to write this within a single service, or maybe just two? An example would be greatly appreciated.
Re: Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Tue Feb 02, 2016 10:28 am
by hsmith
You could use a wrapper script that uses the check_snmp plugin. You take the output from that, and run it by a bunch of if statements. You have those if statements change the message and the way that it exits based on what your output is.
Here is an example post I wrote awhile ago, I hope it may be of some use to you.
Re: Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Wed Feb 03, 2016 9:50 am
by TylerTX
I appreciate the replies. I wish I had more time to create something custom. That certainly looks like what I need to do to get what I want.
For now I used a built in check and kept it simple.
$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
-o .1.3.6.1.4.1.5528.100.4.1.2.1.8.3856353442 -C public -P 1 -l "HUMID" -u "PCT" -c20:80
Re: Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Wed Feb 03, 2016 9:52 am
by hsmith
I hope that helped you out at least. Is there anything else we can do for you, or would you like this thread locked?
Re: Looking for Netbotz Humidity Plugin/Alerting Suggestion
Posted: Wed Feb 03, 2016 10:31 am
by TylerTX
It's good for now, I'm going to let this rest. Thanks again.