Hi,
I'd like to monitor an Easyraid storage subsystem. I've got a MIB, saved an oidlib and created quite number of sensors. One sensor for example monitors the logical drive's overall status und returns OPTIMAL as a value. How can I tell the sensor to go into warning or error if the value is anything else than OPTIMAL? Or is it even possible to change the state to Warning if the value is DEGRADED and to Error if the value is FAIL?
KInd regards, P. Zinckgraf
Article Comments
Thanks for your quick reply. I was hoping I could use the sensors I created using my oidlib. Those sensors don't show any OID I could use to create matching custom string sensors. In their settings they just show for instance "EASYRAID-P-SNMP-MIB/raid log drv: 0/raid ld state", which is not accepted by the custom string sensor.
Will I have to dig through over 500 oidlib entries to find the matching OIDs?
Nov, 2013 - Permalink
This actually is not a String based SNMP Sensor, but a normal SNMP Custom Sensor. On those Lookups can be used to "translate" numerical results into readable messages. If the MIB was imported with the most recent version of the MIB Importer 3.4.7 the lookup file most likely, was added automatically. You can change it though to have it also use the states you want of course.
Nov, 2013 - Permalink
I used MIB importer 3.4.6. The SNMP Library sensor is the only sensor type I think that makes use of oidlibs. And sorry, I don't get your last sentence. What exactly can I change to have something using the states if the lookup file was - most likely - added?
I opened the original MIB in the MIB Importer, found the "raid ld state" in the tree. There are strings and values in the lokkup-field. I created a new custom string sensor with the OID from the MIB. The sensor so far gives me "no such name", though.
Nov, 2013 - Permalink
You can change the Lookup used on the sensor, to influence the sensors state (depending on the result). Or create a lookup for this sensor, if none is used yet.
Nov, 2013 - Permalink
Ok, what I have to do is create a custom string sensor with the OID from the MIB, make sure that there is a suitable (edited) lookup file that translates numerical responses back to the strings I can parse to determine warning and error conditions.
As a long shot, I added .0 to the OID that previously gave me the no such name error, and the sensor went into warning state "String not found [OPTIMAL]". I can't figure out what the actual response was, the sensor only has channels for response time and availability.
(Still, it would be much easier if one could parse responses of SNMP library sensors for strings.)
Nov, 2013 - Permalink
You do not need the OID and use it one a SNMP Custom String sensor. Just use the existing "SNMP Library Sensor", and check if a Lookup is used, and edit it your needs. Or if none is used, create a suiting one.
Nov, 2013 - Permalink
Ok, got it. I had missed that the lookup is a channel property, not a sensor property.
I found the lookup field in the channel settings and for testing puposes edited the corresponding .ovl lookup file to give a Warning state if the snmp response is "3", which the lookup file resolves to "OPTIMAL". And I changed the channel unit to "Custom". Is there anything else I have to take care of to trick the sensor into Warning state?
Nov, 2013 - Permalink
If you've edited the lookup file correctly, the only necessary step then is to 're-load' the lookup files, under "Setup"->"System Administration"->"Administrative Tools".
Nov, 2013 - Permalink
Thank you very much, everything is running smooth now. Sorry for the shallow learning curve...
Nov, 2013 - Permalink
Hello,
thank you very much for your KB-Post. This is possible by using the according options in the "Settings" of the "SNMP Custom String"-Sensor, like shown in the attached screenshot:
best regards.
Nov, 2013 - Permalink