mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
370e08d091
commit
1b78f2d9ca
@ -1015,13 +1015,13 @@ daemon name, while `test $service.state_id$ -gt 0` makes sure that the daemon
|
|||||||
is only restarted when the service is an a not `OK` state.
|
is only restarted when the service is an a not `OK` state.
|
||||||
|
|
||||||
|
|
||||||
object EventCommand "event_by_ssh_restart_service" {
|
object EventCommand "event_by_ssh_restart_service" {
|
||||||
import "event_by_ssh"
|
import "event_by_ssh"
|
||||||
|
|
||||||
//only restart the daemon if state > 0 (not-ok)
|
//only restart the daemon if state > 0 (not-ok)
|
||||||
//requires sudo permissions for the icinga user
|
//requires sudo permissions for the icinga user
|
||||||
vars.event_by_ssh_command = "test $service.state_id$ -gt 0 && sudo /etc/init.d/$event_by_ssh_service$ restart"
|
vars.event_by_ssh_command = "test $service.state_id$ -gt 0 && sudo /etc/init.d/$event_by_ssh_service$ restart"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Now set the `event_command` attribute to `event_by_ssh_restart_service` and tell it
|
Now set the `event_command` attribute to `event_by_ssh_restart_service` and tell it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user