|
| View previous topic :: View next topic |
| Author |
Message |
Flix3793
Joined: 09 Aug 2011 Posts: 5
|
Posted: Fri Aug 12, 2011 12:22 am Post subject: Defining "reply" text for SNMP traps |
|
|
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: |
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 |
|
| Back to top |
|
 |
KS-Soft Europe
Joined: 16 May 2006 Posts: 2249
|
Posted: Fri Aug 12, 2011 7:43 am Post subject: Defining "reply" text for SNMP traps |
|
|
| Quote: | | 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 ?
| Quote: | | 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% |
|
| Back to top |
|
 |
Flix3793
Joined: 09 Aug 2011 Posts: 5
|
Posted: Mon Sep 05, 2011 2:19 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|