Nagios is an open-source monitoring system for computer systems. It was designed to run on the Linux operating system and can monitor devices running Linux, Windows, and Unix operating systems. Nagios software runs periodic status checks on critical parameters of application, network, and server resources.
Both Nagios XI and Nagios core, have the ability to generate Status checks which arrive in the form of logs and metrics.
Nagios supports forwarding status checks to another Nagios instance using NRDP protocol, we use this protocol on our end to collect metrics and logs from each status check that is sent.
In order to ship logs and metrics from Nagios core to Coralogix, there are 2 steps.
First, update the main configuration file named: nagios.cfg, usually located in: /usr/local/nagios/etc/ .
This section will enable the check results for hosts and services.
Add this section to your existing config:
obsess_over_hosts=1 obsess_over_services=1 ochp_command=send_nrdp_host ocsp_command=send_nrdp_service
Second, update (or create if doesn’t exist): commands.cfg, usually located in: /usr/local/nagios/etc/ .
The config will look as follows. Add it to existing main config:
command_name send_nrdp_host command_line $USER1$/send_nrdp.php --url=<clusterURL>/nrdp/api/v1/<appname>/<subsystem> --token=<privatekey> --host="$HOSTNAME$" --state=$HOSTSTATEID$ --output="$HOSTOUTPUT$|$HOSTPERFDATA$" } define command{ command_name send_nrdp_service command_line $USER1$/send_nrdp.php --url=<clusterURL>/nrdp/api/v1/<appname>/<subsystem> --token=<privatekey> --host="$HOSTNAME$" --service="$SERVICEDESC$" --state=$SERVICESTATEID$ --output="$SERVICEOUTPUT$|$SERVICEPERFDATA$" }
The section above will define how the logs and metrics will arrive to Coralogix.
Keep in mind that there are 4 mandatory fields to be filled in:
Once Nagios XI is configured, follow the next steps:
cluster | URL |
EU | https://nagios.coralogix.com |
US | https://nagios.coralogix.us |
IN | https://nagios.coralogix.in |
EU2 | https://nagios.eu2.coralogix.com |
SG | https://nagios.coralogixsg.com |