Notification Escalation - for Services & Http checks

Hi Team,

As per the documentation, i have seen notification delay/escalation notification syntax as shown below.

apply Notification "mail" to Service {
  import "generic-notification"
  command = "mail-notification"
  users = [ "icingaadmin" ]
  interval = 5m
  times.begin = 15m // delay notification window
  assign where service.name == "ping4"
}

In the above apply notification block you defined the assign where service.name == "ping4"

If we have apply service block as below how to define the assign block? is it something like
assign where service.name == “service_win_service” ?

apply Service for ( service_win_service => config in host.vars.win_services) {
  import "generic-service"
  check_command = "service-windows"
  enable_notifications = false
  vars += config
  command_endpoint = host.vars.client_endpoint
  assign where host.vars.client_endpoint
}

Any help would be much appreciated… thanks in advance

Hi Team… Can someone please advise on this…

Hi Team,

As per the documentation, i have seen notification delay/escalation
notification syntax as shown below.

apply Notification "mail" to Service {
  import "generic-notification"
  command = "mail-notification"
  users = [ "icingaadmin" ]
  interval = 5m
  times.begin = 15m
  assign where service.name == "ping4"
}

So, the above is applying a Notification to a Service check, where the service
name is “ping4”. It means you’ll get notified about “ping4” check results.

If we have apply service block as below how to define the assign block? is
it something like assign where service.name == “service_win_service”?

That seems unlikely to me, although it could help if you describe quite what
it is you’re trying to achieve.

apply Service for (service_win_service => config in

host.vars.win_services) {
import “generic-service”
check_command = “service-windows”
enable_notifications = false
vars += config
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint
}

What are you doing with the content of “service_win_service”?

Presumably it’s used by the check command “service-windows” somehow? (Maybe
it would be useful to post the contents of that check command here).

I think it’s more likely you want to say

assign where host.vars.win_services

but more detail from your side regarding what this variable contains and what
that means would be instructive.

Regards,

Antony.

As host.vars.win_services most likely is an array containing different service names I also could imagine that something like assign where host.vars.win_services in [ "thisservice" ] will work, if you only want to pin it to single services.
Or assign where host.vars.win_services in [ "thisservice", "thatservice" ] for multiple services

Hey @mani.vajrala :slight_smile:

Did the answers help you get to the bottom of your issue?
Any updates on this?
Would love to hear back from you!

Have a nice day!
Feu