Mkeventd snmptraps and rewrite hostname not matching on clearing events

CMK version:
Checkmk Enterprise Edition 2.1.0p12
OS version:
Centos 7.9.2009
Error message:
None.

2023-01-23 14:19:06,343 [20] [cmk.mkeventd.EventStatus] Do not cancel event 47748: host is not the same (my-host-type-201 != my-host-type-\2)

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
N/A

I have an event console rule for snmptraps I am trying to get to clear messages, but when I use the host rewrite method for the host names the clearing trap never matches the original trap. Am I missing something? how do I get mkeventd to run the above check on the rewritten hostname instead of ‘my-host-type-\2’? It should be matching and clearing but it is not.

I figured this out, it appears your regex match groups have to be the same on the ‘text to clear’ the event.

so regex to create an alarm

.major (event) on (this host) is (this issue please log it).

regex to clear the alarm
.cleared (event) on (this host) is (this issue please log it).

The text to cancel needs to the same matching groups in the same order. Seems kind of dumb and it is not documented, but the source code and testing confirmed that.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.