snmp OK trap not working
hello,
i can send snmp traps to get the snmptrap monitor in down or warning state without problems based on oid and value text, however sending a trap to get the OK state (second option in snmptrap monitor) is NOT working. the log always states that the trap is rejected as it is not matched. is this a bug ?
i can send snmp traps to get the snmptrap monitor in down or warning state without problems based on oid and value text, however sending a trap to get the OK state (second option in snmptrap monitor) is NOT working. the log always states that the trap is rejected as it is not matched. is this a bug ?
This discussion has been closed.
Comments
Also kindly take note of console of the s-alerts process for any error messages regarding the concerned check.
After which, upload also the debug file.
Thank you.
https://tickets.serverscheck.com/index.php?
but it does not work as well!
any way here is my log and ticket i tried to make:
//////////////////////
Hello,
We are implementing snmp traps.
Sending snmp traps are ok no problems.
Receiving snmp traps works only for down and warning state of the snmptrap monitor.
However sending a snmp trap to Serverscheck to set the OK state is NOT working!
the monitor settings:
the ip range - all wildcards *
community string - public
Generic id - 6
OID - wildcard *
OID type - TEXT
OID value for error state <contains> DOWN
when trap matches above condition then set monitor to DOWN
The check will be set to OK when following value is matched:
OID value for OK state contains OK
So the idea is to send a trap to serverscheck with value DOWN to get down state, and sending value OK to get OK state.
when running the serverscheck trap reciver in debug mode i get:
# SNMPTRAP Thu Sep 19 21:17:09 2013 Starting Trap Receiver thread
# SNMPTRAP Thu Sep 19 21:17:10 2013 Trap Receiver listening on port 162
# SNMPTRAP Thu Sep 19 21:17:41 2013 Trap Receiver alive
# SNMPTRAP Thu Sep 19 21:18:12 2013 Trap Receiver alive
# SNMPTRAP Thu Sep 19 21:18:43 2013 Trap Receiver alive
z 0@?? ??public
¤2??+??????"@?À¨????????C?00?0??
+??????"???"DOWN"
returned pair: 1.3.6.1.4.1.23.2.34.1 -> "DOWN"
# SNMPTRAP Thu Sep 19 21:18:44 2013 trap received from 192.168.2.12 - 6 - 1.3.6.1.4.1.23.2.34.1|"DOWN"
|| - community .public
.
community: .public
.
# SNMPTRAP Thu Sep 19 21:18:45 2013 Trap data:
Community:public
Enterprise:1.3.6.1.4.1.23.2.34Agent addr:192.168.2.12
Generic ID:6 Specific ID:21
Uptime:0:02:04 OID:1.3.6.1.4.1.23.2.34.1|"DOWN"
||
# SNMPTRAP Thu Sep 19 21:18:45 2013 IP matched
# SNMPTRAP Thu Sep 19 21:18:45 2013 Community string matched
# SNMPTRAP Thu Sep 19 21:18:45 2013 Generic ID matched
# SNMPTRAP Thu Sep 19 21:18:45 2013 1.3.6.1.4.1.23.2.34.1 = *
# SNMPTRAP Thu Sep 19 21:18:45 2013 match found for 1.3.6.1.4.1.23.2.34.1 - 1379615585SNMPTRAP (value "DOWN"
/DOWN/) - set to DOWN
# SNMPTRAP Thu Sep 19 21:18:45 2013 Starting alerting procedure for 1379615585SNMPTRAP with status: DOWN (see logging in alertslogs directory)
# SNMPTRAP Thu Sep 19 21:18:45 2013 trap 0 removed - match result: 1
z 0>?? ??public
¤0??+??????"@?À¨????????C?00?0??
+??????"???"OK"
returned pair: 1.3.6.1.4.1.23.2.34.1 -> "OK"
# SNMPTRAP Thu Sep 19 21:19:07 2013 trap received from 192.168.2.12 - 6 - 1.3.6.1.4.1.23.2.34.1|"OK"
|| - community .public
.
community: .public
.
# SNMPTRAP Thu Sep 19 21:19:08 2013 Trap data:
Community:public
Enterprise:1.3.6.1.4.1.23.2.34Agent addr:192.168.2.12
Generic ID:6 Specific ID:21
Uptime:0:02:04 OID:1.3.6.1.4.1.23.2.34.1|"OK"
||
# SNMPTRAP Thu Sep 19 21:19:08 2013 IP matched
# SNMPTRAP Thu Sep 19 21:19:08 2013 Community string matched
# SNMPTRAP Thu Sep 19 21:19:08 2013 Generic ID matched
# SNMPTRAP Thu Sep 19 21:19:08 2013 1.3.6.1.4.1.23.2.34.1 = *
# SNMPTRAP Thu Sep 19 21:19:08 2013 trap 1 removed - match result: 0
So the only thing changed in the trap is the value setting ->OK, and as you can see in log, the match result is 0.
Is this a bug ? (or do i need to send a specific hidden OID for the OK trap ?)
As a workaround against that for now, you can just simply reset the traps to acknowledge the notification.
Could you try please it with following build?
http://upgrade.serverscheck.net/monitoring_software/monitoring_snmptrap.exe
For the time being, the component upgrade that provides the fix can already be availed of by downloading the following and replacing the old component on the ServersCheck directory:
http://upgrade.serverscheck.net/monitoring_software/monitoring_thread2.exe