nagios-eventhandler-cachet icon indicating copy to clipboard operation
nagios-eventhandler-cachet copied to clipboard

Can't query components

Open nageshwaran08 opened this issue 5 years ago • 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.

nageshwaran08 avatar Jan 28 '20 10:01 nageshwaran08

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 }

nageshwaran08 avatar Jan 28 '20 10:01 nageshwaran08