Hi Everyone
I have a strange behaviour. I created some Checkscripts with bash. In the Icinga2 Web they work as they should. But the notification is not sent. The embedded Checks like Ping work with notification.
In the Configuration I see no difference.
Do I have to return the Message of the Script in a certain way(exept exit 2)?
In the logs I see that it sends a message, but in real it gets never sent out. I tried to write a Log from the Notificationhandler script but as it seams to me it never gets called.
Yesterday I got a message when the script went into a timeout, then I recieved a Unknown error.
apply Notification "discord" to Service {
import "discord-service-notification"
user_groups = [ "oncall" ]
interval = 5m
assign where host.vars.sla == "24x7"
}
apply Service "website_content_check" {
import "generic-service"
check_command = "website_check"
assign where host.vars.check_website == true
}
object User "oncall_alets" {
import "generic-user"
display_name = "oncall alerts"
groups = [ "oncall" ]
enable_notifications = true
states = [ Warning, Critical, Unknown ]
types = [ Problem, Acknowledgement, Recovery, Custom, FlappingStart,
FlappingEnd, DowntimeStart, DowntimeEnd, DowntimeRemoved ]
email = "root@localhost"
}
object UserGroup "oncall" {
display_name = "oncall"
}