Hi Team,
I have been trying to implement the email notification for specific windows system service. Here, Service apply as shown below…
apply Service "AmazonSSMAgent" {
check_command = "service-windows"
vars.service_win_service = "AmazonSSMAgent" //access the host custom var
command_endpoint = host.vars.client_endpoint
assign where host.vars.SSM == "AmazonSSMAgent" && host.vars.client_endpoint
}
Notification apply is shown below…
apply Notification "mail-icingaadmin" to Service {
import "mail-service-notification"
user_groups = host.vars.notification.mail.groups
users = host.vars.notification.mail.users
#interval = 0 // disable re-notification
//vars.notification_logtosyslog = true
assign where host.vars.notification.mail
}
I have been looking the above post… I think configurations should be as shown below.
apply Service "AmazonSSMAgent" {
check_command = "service-windows"
vars.service_win_service = "AmazonSSMAgent" //access the host custom var
vars. custom_notifications_users = ["username1@domain.com", "username2@domain.com"]
command_endpoint = host.vars.client_endpoint
assign where host.vars.SSM == "AmazonSSMAgent" && host.vars.client_endpoint
}
apply Notification "custom-mail-icingaadmin" to Service {
import "mail-service-notification"
user_groups = host.vars.notification.mail.groups
users = service.vars.notification.mail.users
#interval = 0 // disable re-notification
//vars.notification_logtosyslog = true
assign where service.vars.custom_notification_users.len() > 0
}
Is these are are configurations that i should make? with an existing configurations can you suggest me the things that i need to perform?
Thanks in advance