Hi, I have a question between icinga and opsgenie.
I’m using binary icinga2opsgenie on my icinga integration.
When I have a CRITICAL state, an alert is generated and sent on opsgenie -> All is ok.
If CRITICAL become OK -> no problem, alert is closed on opsgenie.
But I have a problem:
I’m using states: OK, WARNING, CRITICAL, UNKNOWN.
Sometimes, a service which was OK become CRITICAL: an alert is created on opsgenie.
CRITICAL problem is solved by me, but in the same time, due to some probes, my service stay on WARNING state, not OK, then, alert on opsgenie stays opened (I have to close it manually).
My config for notification:
object User "opsgenie-contact" {
// object attributes
display_name = "OpsGenie Contact"
enable_notifications = 1
groups = ["opsgenie"]
period = "24x7"
// object vars
vars.notificationways = ["host-notif-opsgenie-contact", "service-notif-opsgenie-contact"]
vars.services_args += {
}
}
apply Notification "service-notif-opsgenie-contact" to Service {
// object attributes
command = "notify-service-by-opsgenie"
period = "24x7"
times.begin = 2m
states = [Critical, Unknown]
types = [Problem, Recovery, DowntimeRemoved, DowntimeEnd]
users = ["opsgenie-contact"]
if (service.vars["notification_period"]) {
period = service.vars["notification_period"]
}
if (service.vars["notification_interval"]) {
interval = service.vars["notification_interval"]
} else {
interval = 300
}
// personnal config:
assign where host.address && !service.vars.notification_options_states && !service.vars.is_test && host.vars["notification_enabled"]
assign where host.address && service.vars.notification_options_states && host.vars["notification_enabled"]
}
What I want to do is: when alert change of state, this alert has to be closed.
Do you have some ideas?
Thanks for Help
A.