Nagios
Steps to configure Nagios integration for incident management, using Squadcast
Last updated
Steps to configure Nagios integration for incident management, using Squadcast
Last updated
Follow the steps below to configure a service so as to push related alert data from Nagios onto Squadcast.
Squadcast will then process this information to create incidents for this service as per your preferences.
Navigate to Services -> Service Overview -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click Add.
2. Select Nagios. Copy the displayed Webhook URL to configure it within Nagios. Finish by clicking Add Alert Source -> Done.
Important:
When an alert source turns Active, it’ll show up under Configured Alert Sources, you can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source. An Alert Source is active if there is a recorded incident via that Alert Source for the Service.
Nagios Core versions 3.x and above are supported
Log in to your Nagios server and go to your nagios.cfg file (usually in /usr/local/nagios/etc/
or /etc/nagios
). Make sure enable_environment_macros=1. You can find the path of all your object config files and resource config file here. Go to $USER1$ directory. You can find the value of this macro in your resource.cfg file.
Once you're inside the directory, run the following commands:
Once the file is downloaded please make sure that the file has execute permissions for your Nagios user. If not, then please provide the same using the following commands:
The Squadcast script for Nagios requires Python 3 to be installed on the machine running Nagios.
Go to commands.cfg file. Then add the following two commands:
Make Sure to replace the url with the webhook url you copied from Squadcast Dashboard
Go to contacts.cfg file.
Create a new contact and set your notification_options and notification_period for service and host according to your preference.
Enable host_notifications and service_notifications
Set service_notification_commands to service-alert and host_notification_commands to host-alert
Ex:
Then add the contact to your preferred contact group.
Ex:
Finally restart Nagios using the following command:
Now whenever an event is triggered in Nagios, an incident will be automatically created in Squadcast. Also, once the event that triggered the incident(s) is resolved in Nagios, the relevant Squadcast incidents created would get resolved automatically.
Have any questions? Ask the community.