Hi!
I have a very strange problem…
We use Icinga2 at office to check many servers. Normally it works without any problem, but sometimes we don’t receive SMS of the problems…
After some tests I got something reproducible: I set a downtime for a service (or an host), then it happens “some shit”. Since there is a downtimes, nothing will be sent. Correct!
Then the downtime expires (or will deleted). The service is even in critical (or warning) state.
Now the very strange problem: the E-Mails will be sent, but not the SMS…
We defined two groups of services “high_prio” (E-Mails and SMS will be sent) and “low_prio” (only E-Mail will be sent).
Of course, the problem occours only with “high_prio” services…
I defined the SMS notification as:
template Notification “sms-service-notification” {
command = “sms-service-notification”states = [ OK, Warning, Critical ]
types = [ Problem ]vars += {
notification_from = “Monitoring icinga@our.domain.com”
notification_logtosyslog = false
}period = “24x7”
}apply Notification “sms-service-notification” to Service {
import “sms-service-notification”
interval = 0 // disable re-notificationif (service.vars.notificationgroups != “”) {
user_groups = service.vars.notificationgroups
} else {
user_groups = host.vars.notificationgroups
}assign where service.vars.priority == “high” || (service.vars.priority == null && host.vars.priority == [ “high” ])
}
We defined a user for these SMS as:
object User “it” {
import “generic-user”display_name = “IT”
groups = [
“icingaadmins”,
“admins”,
“high-prio”,
“low-prio”
]
email = “devnull@internal.mail.local”
vars.mobile = “handy-admin@internal.mail.local”
}
The NotificationCommand sms-service-notification
just sends an E-Mail to vars.mobile. The Mailserver will then send the data to a GSM-Modem.
So, after my tests, I see, that if the problem occours during a downtime, after the downtime (if the problem persists) just the normal E-Mails will be sent, but sms-service-notification
will just not be called…
Has someone an explanation for this problem? And maybe a suggestion how to solve it?
Thanks a lot
Luca