About the integration:
Integrate Nagios XI with Freshservice, alert your team about the health of your infrastructure, services and applications on time, allowing them to begin remediation processes before outages affect your business and end users. Alert notifications sent from Nagios are created as aggregated alert records in Freshservice for quick processing and resolution.
Configuration in Freshservice:
Step 1:
Head to the Admin panel, scroll down to IT Operations Management, and select Monitoring Tools.
If your account has more than one workspace, navigate to Admin > {Worskpace Name} > IT Operations Management> Monitoring Tools.
Step 2:
You are now on the Monitoring Tools list page. Select Add monitoring tool to add a new integration.
Step 3
You will see a list of pre-configured integrations, the gateway to custom integration using webhooks, and the option to use email as a channel for alerts. Select Nagios XI.
Step 4
Get the Endpoint URL and the Auth key for Nagios XI by following the integration setup.
Configuration in Nagios XI :
Login to Nagios XI
Click on Configure > Core Config Manager > Commands
In Nagios XI, two commands have to be configured for sending host and service notifications to Freshservice.
Click on Add new and create a new command.
Enter a name in the Command Name field and paste the following CURL command in the Command Line field after modifying the Endpoint URL and Authentication token copied from Freshservice below
Host notification to Freshservice
curl -X POST -H "Authorization: <Paste Authentication token copied from Freshservice here without these braces>" -H "Content-Type: application/json" --data "{\"metric_name\": \"Availability\", \"hostname\": \"$HOSTNAME$\", \"message\": \"$NOTIFICATIONTYPE$ - $HOSTNAME$ is $HOSTSTATE$\", \"ip_address\": \"$HOSTADDRESS$\", \"severity\": \"$HOSTSTATE$\", \"event_id\": \"$HOSTEVENTID$\", \"output\": \"$HOSTOUTPUT$\", \"perf_data\": \"$HOSTPERFDATA$\", \"action_url\": \"$HOSTACTIONURL$\", \"check_command\": \"$HOSTCHECKCOMMAND$\", \"problem_id\": \"$HOSTPROBLEMID$\" , \"long_datetime\": \"$LONGDATETIME$\", \"notification_comment\": \"$NOTIFICATIONCOMMENT$\", \"notification_type\": \"$NOTIFICATIONTYPE$\", \"contact_name\": \"$CONTACTNAME$\" }" <paste Endpoint URL copied from Freshservice here without these braces>
As shown in the above screenshot, set Command Type as "misc command" and set it to Active before saving it.
Repeat steps 4 and 5 to create another command for Service notification.
Configure the following CURL command in Command Line to receive alert notifications for services, after modifying the Endpoint URL and Authentication token copied from Freshservice below.
Service notification to Freshservice
curl -X POST -H "Authorization: <Paste Authentication token copied from Freshservice here without these braces>" -H "Content-Type: application/json" --data "{\"metric_name\": \"$SERVICEDESC$\", \"hostname\": \"$HOSTNAME$\", \"message\": \"$NOTIFICATIONTYPE$ - $SERVICEDESC$\", \"description\": \"$SERVICEDESC$\", \"ip_address\": \"$HOSTADDRESS$\", \"severity\": \"$SERVICESTATE$\", \"event_id\": \"$SERVICEEVENTID$\", \"output\": \"$SERVICEOUTPUT$\", \"perf_data\": \"$SERVICEPERFDATA$\", \"action_url\": \"$SERVICEACTIONURL$\", \"check_command\": \"$SERVICECHECKCOMMAND$\", \"problem_id\": \"$SERVICEPROBLEMID$\" , \"long_datetime\": \"$LONGDATETIME$\", \"notification_comment\": \"$NOTIFICATIONCOMMENT$\", \"notification_type\": \"$NOTIFICATIONTYPE$\", \"contact_name\": \"$CONTACTNAME$\" }" <paste Endpoint URL copied from Freshservice here without these braces>
Create a Contact to set trigger conditions by clicking on Alerting > Contacts > Add New > Enter a Contact Name or if there is an existing Contact for which you want to associate the Command to, click on it.
Click on Alert Settings tab and enable Host and Service Notifications.
Click on Manage Host Notification Command and select the respective command created for sending host notications to Freshservice. Similarly select the service notification command by clicking on Manage Service Notification Commands.
Click on Save
When an alert is generated in Nagios XI, it will in turn create an alert in Freshservice.