mpellegrin / nagios-eventhandler-cachet

A Nagios event handler to push Nagios notifications to Cachet API
MIT License
50 stars 17 forks source link

Can't query components #17

Open nageshwaran08 opened 4 years ago

nageshwaran08 commented 4 years ago

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.

nageshwaran08 commented 4 years ago

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 }