Our next-gen architecture is built to help you make sense of your ever-growing data Watch a 4-min demo video!

Back to All Integrations

Nagios Nagios

Last Updated: Aug. 16, 2022

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.

Prerequisites

  • Active Coralogix account with Metric bucket and a working Grafana dashboard for metrics
  • Installed Nagios Core (Official Doc Here)
  • Installed Nagios XI (Official Doc Here)

Nagios Core Configuration

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:

  • clusterURL- your cluster endpoint location according to the geo location (can be found in a table at the end of the page).
  • appname- is your application name, which will be added to your metric attributes.
  • subsystem- is your subsystem, which will be added to your metric attributes.
  • privatekey- is your Private Key, which you can find in Settings > Send Your Data.

Nagios XI Configuration

Once Nagios XI is configured, follow the next steps:

  • Enter the Admin tab at the top bar
  • On the left bar go to “outbound transfers”
  • Enable the “outbound check transfer” by checking the checkbox
  • On global options change filter mode to include and filter /^.*/
  • Move to the NRDP section and enable NRDP by checking the checkbox
  • IP column (without HTTPS): <clusterURL>/nrdp/api/v1/<appname>/<subsystem>
  • The type should stay HTTPS
  • Fill the token column with the privatekey
  • Update the settings and logs and metrics should be coming after that

Endpoints

clusterURL
EUhttps://nagios.coralogix.com
UShttps://nagios.coralogix.us
INhttps://nagios.coralogix.in
EU2https://nagios.eu2.coralogix.com
SGhttps://nagios.coralogixsg.com

On this page