Hello,

I have Icinga2 running with SNMP traps, and Slack notifications are sent
for these traps. Up to a few weeks ago, I also got OK notifications. I
run Logstash to process incoming SNMP traps, and to distinguish which
trap is a recovery (OK) message, and which are not. Logstash then sends
the trap to Icinga2, which works perfectly fine. When I just configured
all this, I also got OK notifications in Slack when a trap came with a
recovery message. However, since a few weeks, I don't get these anymore.
I don't know what happened, because as far I'm concerned I didn't change
anything. Is it possible that this problem appeared when I upgraded to a
newer version of Icinga2? Is there a special option I have to enable to
always send notifications for OK messages? My SNMP traps configuration:

template Service "snmp-trap-service" {
        import "generic-service"
        check_command = "passive"
        enable_notifications = 1
        enable_active_checks = 1
        enable_passive_checks = 1
        enable_flapping = 0
/*      volatile = 1*/
        max_check_attempts = 1
        check_interval = 1h
        enable_perfdata = 0
        vars.slack_notifications = "enabled"
        vars.dummy_state = 0
        vars.dummy_text = "No SNMP traps received during notification
interval."
}

apply Service "snmp_traps" {
        import "snmp-trap-service"
        assign where host.address && host.vars.traps == "true"
}

Thanks!

-Gijs

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to