[icinga-users] EventCommand setup and Service vs Applys usage.

Lance Reed reed.r.lance at gmail.com
Tue Aug 30 22:11:23 CEST 2016


I am in the process of attempting to setup EventCommand / Event
Handlers in Icinga2.

So far the documentation I am finding so far is spotty or confusing.

One complication is that we use applys for all of our checks vs service objects/


apply Service "check_some_service" to Host {
      import "generic-service"
  display_name = "some service"
  assign where host.vars.puppet_role == "foo" || host.vars.puppet_role
== "bar" || match("baz*", host.name)
  ignore where host.name == "localhost"
  check_command = "by_ssh2"
  vars.by_ssh_command = "/usr/lib64/nagios/plugins/check_http -H
$host$ -p $port$ -u $uri$"
  vars.host = "localhost"
  vars.port = "58140"
  vars.uri = "http://localhost:59140/command?type=ping"
  event_command = "restart-some-event"


Can someone tell me if using "apply Service" will work with the
Icinga2 code when doing EventCommands to restart services etc?

Thanks for any ideas to get this moving forward.



More information about the icinga-users mailing list