DX Unified Infrastructure Management

  • 1.  SNMP text value from MIB in alert, rather than numerical value?

    Posted Oct 17, 2008 01:52 AM
    Wasn't sure exactly how to phrase the thread title but I think that pretty much sums it up.

    I'm monitoring our data centre UPS's with the SNMP monitor, and am writing some custom alert messages for each alert condition I'm setting. One particular value I want to watch isn't a simple threshold as such but is a number assigned to a status. The status is '3' when healthy (which translates to "normal") but if it switches to 4 ("bypass") or 4 ("battery") then there is a problem.

    Does anyone know if there is any way of getting the TEXT value based on the data in the MIB into the alert? If I use the $value variable in the message I just get the numerical representation rather than the status in text...

    Anybody?


  • 2.  SNMP text value from MIB in alert, rather than numerical value?
    Best Answer

    Posted Oct 17, 2008 05:39 AM
    Jim,

    Unless it is an undocumented feature, it does not look like that is an option.  However, when I use the PU command (or Ctrl+P) to run the query_agent callback on the snmpget probe, it returns a 'value' field and a 'variable' field.  The 'variable' field has the text representation of the value, so you could try $variable in your alarm message and see if that works.  Since it is not documented that way, I would not count on it, but it might work.

    Another option might be to use the get_description callback on the snmpget probe to get the list of values and their text meanings.  That callback accepts an OID (by number or name) and returns the full description from the MIB.  That would probably be easier than processing the MIB file directly in Lua, which is also an option, of course.

    Regards,
    Keith


  • 3.  SNMP text value from MIB in alert, rather than numerical value?

    Posted Oct 18, 2008 12:44 AM
    Jim,

    Checked the snmpget code (used to be one of my babies :smileyhappy:, and proposed a change that will allow for a $variable token to be expanded.  This will be included in the next release.

    As Keith correctly points out you can query the snmpget probe, however, it is not very effective.
    Or you could launder/pre-process the alarm from snmpget when it arrives with the NAS.

    Just a thought,

    Carstein


  • 4.  SNMP text value from MIB in alert, rather than numerical value?

    Posted Oct 18, 2008 04:45 AM
    Thanks for the responses guys. Alas $variable does just print the text $variable in the alarms so that's a no go. Querying the get_description I guess would work but would add an extra layer of complexity in my alarms which I'd really like to try and avoid.. it sounds like the change that has been proposed for the next version by Carstein will negate the need for this sort of jiggery hackery so thanks very much for that!

    Thanks again!