Quantcast
Channel: Monitoring-Portal Feed
Viewing all articles
Browse latest Browse all 1338

Icinga2 EventCommand is not fired up

$
0
0
Hello,

I have defined a simple EventCommand object:

object EventCommand "cmd_service_restart" {
import "plugin-event-command"
command = "/etc/init.d/crond restart"

}

Defined a service:

apply Service "crond" {
import "generic-service"
check_command = "procs"
if (host.vars.remote_client) {

command_endpoint = host.vars.remote_client
}
vars.procs_command = "crond"

vars.procs_critical = "1:"
event_command = "cmd_service_restart"
assign where host.vars.os == "Linux"

}

I can see that the event is executed:


[2015-07-29 19:29:54 +0000] notice/Checkable: State Change: Checkable dc1udtlhtst02.stack.qadev.corp!crond soft state change from OK to CRITICAL detected.
[2015-07-29 19:29:54 +0000] notice/Checkable: Executing event handler 'cmd_service_restart' for service 'dc1udtlhtst02.stack.qadev.corp!crond'
[2015-07-29 19:29:54 +0000] notice/ApiListener: Sending message to 'dc1udtlhtst02.stack.qadev.corp'
[2015-07-29 19:29:54 +0000] notice/ApiListener: Relaying 'event::CheckResult' message


But apparently no command is executed elsewhere. Does anyone have any expertise in defining your own commands? I just need to restart services that went down without "by_ssh" plugin.

Thanks in advance.

Viewing all articles
Browse latest Browse all 1338

Trending Articles


Vimeo 10.7.1 by Vimeo.com, Inc.


UPDATE SC IDOL: TWO BECOME ONE


KASAMBAHAY BILL IN THE HOUSE


Girasoles para colorear


Presence Quotes – Positive Quotes


EASY COME, EASY GO


Love with Heart Breaking Quotes


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


FORTUITOUS EVENT


Pokemon para colorear


Sapos para colorear


Smile Quotes


Letting Go Quotes


Love Song lyrics that marks your Heart


RE: Mutton Pies (frankie241)


Hato lada ym dei namar ka jingpyrshah jong U JJM Nichols Roy (Bah Joy) ngin...


Long Distance Relationship Tagalog Love Quotes