Hi,
I am integrating slack with Nagios core to receive alerts and slack has a pretty simple mechanism called Incoming webhooks to achieve it. I had two separate scripts for getting slack host & service notifications under /usr/local/nagios/libexec directory. Both Nagios core & the client are RHEL EC2 instances.
On dry run for these two scripts they work perfectly, sending empty notifications to slack but actual alerts are not seen on slack. I am attaching the snip for both the files, please suggest where can I start troubleshooting for errors. I have no idea what's wrong going on here ?
Thanks,
Piyush
Nagios-Slack webhook not sending alerts to Slack
-
danderson
Re: Nagios-Slack webhook not sending alerts to Slack
Thanks for reaching out @pnikhade,
Personally, I wouldn't post your Slack Hook on a public forum. Otherwise, I would make sure the URL is executable. Also it looks like the path you put in the command is /usr/lib64/nagios/plugins/slack_service_notify but it looks like it should be /usr/lib64/nagios/plugins/slack_service_notify.sh
Let me know if this helps
Personally, I wouldn't post your Slack Hook on a public forum. Otherwise, I would make sure the URL is executable. Also it looks like the path you put in the command is /usr/lib64/nagios/plugins/slack_service_notify but it looks like it should be /usr/lib64/nagios/plugins/slack_service_notify.sh
Let me know if this helps
Re: Nagios-Slack webhook not sending alerts to Slack
Hi @danderson,
Thanks for your response, but whatever commands I defined in commands file is correct, please check the attached.
Please guide what I am doing wrong here.
Many Thanks,
Piyush
Thanks for your response, but whatever commands I defined in commands file is correct, please check the attached.
Please guide what I am doing wrong here.
Many Thanks,
Piyush
Last edited by pnikhade on Thu Apr 25, 2024 9:05 am, edited 1 time in total.
Re: Nagios-Slack webhook not sending alerts to Slack
Hello @pnikhade,
Have you checked your Nagios logs? Have you configured your hosts/services to utilize your defined commands?
Have you checked your Nagios logs? Have you configured your hosts/services to utilize your defined commands?
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Re: Nagios-Slack webhook not sending alerts to Slack
hi, this is resolved. One file was wrongly name which caused issue. Thanks !