mpellegrin/nagios-eventhandler-cachet

Can't query components

Opened this issue · 1 comments

Hi,
I have installed Cachet and try to push notification from Nagios to Cachet using event handlers.
I'm getting the error 'Can't query components' while running the below command
./cachet_notify 'My Cachet component' 'My nagios service' 'CRITICAL' 'HARD' 'The service is Critical'
Please anyone can guide me to solve the issue.

Thanks in advance,
Nagesh.

I copied the cachet_notify file to event handler folder, changes cachet URL & API key and added below config in nagios commands.cfg file.

define command {
command_name cachet_notify
command_line /usr/local/nagios/libexec/eventhandlers/cachet_notify '$ARG1$' '$SERVICEDESC$' '$SERVICESTATE$' '$SERVICESTATETYPE$' '$SERVICEOUTPUT$'
}

If add below config in my services file, then nagios service will not start.

define service {
service_description nagios-service
event_handler cachet_notify!Switch1
}