Defining "reply" text for SNMP traps

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Flix3793
Posts: 5
Joined: Tue Aug 09, 2011 12:15 am

Defining "reply" text for SNMP traps

Post by Flix3793 »

Hallo again!

This time I have trouble with SNMP...
We have a bunch of APC UPS devices (ca. 60 of them) sending SNMP traps in "critical" and "warning" cases only. The computer where HostMonitor is running on is defined as trap receiver, and the test traps sent from the UPCs reach Host Monitor without problems. After I got that to work by creating a test containing all traps from all devices (just for testing purposes), I created an import file containing one single test for each device to make visible which hostname is sending the trap. That worked fine too. The tests are configured to reply "trap type", but choosing another reply doesn't make any difference. Host monitor is now showing

Code: Select all

Test Name          |Status|Recurrences|Reply           |
SNMP Trap:hostname |Bad   |1          |Specific (6.636)|
when I send an test trap.

Now I want HM to put "Test" into the Reply field when recieving THIS trap, and e.g. "Battery low" when recieving the trap for low battery warning.

Is this possible? And if yes, how do I do that?

I already tried "Tune up reply" as suggested in another thread, but nothing happened, reply output stayed the same.

EDIT: I also have a list of all traps, the devices can send: http://www.nagios-wiki.de/snmptt/apc
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Defining "reply" text for SNMP traps

Post by KS-Soft Europe »

The tests are configured to reply "trap type", but choosing another reply doesn't make any difference
Are yopu sure, you have recived new trap message after changing Display option ? Have you tried Display: OID ?
I already tried "Tune up reply" as suggested in another thread, but nothing happened, reply output stayed the same.

What exactly Tune up Reply value expression did you use ?
if Display option is selected to show OID,
you may try expression like the following:
if ('318.0.4' in '%SuggestedReply%') The UPS batteries are discharged; if ('318.0.7' in '%SuggestedReply%') Low battery; if ('318.0.1' in '%SuggestedReply%') Communication failure; else Unknown message for OID: %SuggestedReply%
Flix3793
Posts: 5
Joined: Tue Aug 09, 2011 12:15 am

Post by Flix3793 »

Hi!

Sorry for the delay... had some holidays. :-)

I used your TuneUp reply idea, modified it a little bit and it works fine as far as I can see. We will set up a testing UPS system later this afternoon to see if the whole thing works in "real" critical situations, too.
Post Reply