[Live Webinar] Next-Level O11y: Why Every DevOps Team Needs a RUM Strategy Register today!

Back to All Docs

Nagios Nagios

Last Updated: Jun. 28, 2023

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 instances using NRDP protocol; Coralogix uses this protocol to collect logs and metrics from each status check that is sent.

This tutorial demonstrates how to send your logs and metrics to Coralogix using Nagios.

Prerequisites

Configuration

Nagios Core

STEP 1. Update the main configuration file nagios.cfg, usually located in: /usr/local/nagios/etc/, by adding the following:

obsess_over_hosts=1
obsess_over_services=1
ochp_command=send_nrdp_host
ocsp_command=send_nrdp_service

STEP 2. Create (or update) the file commands.cfg, usually located in: /usr/local/nagios/etc/, and add it to
nagios.cfg:

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/v1/:application/:subsystem/nrdp/ --token=<privatekey> --host="$HOSTNAME$" --service="$SERVICEDESC$" --state=$SERVICESTATEID$ --output="$SERVICEOUTPUT$|$SERVICEPERFDATA$"
}

You are required to input 4 mandatory fields:

  • clusterURL: Coralogix ingress endpoint associated with your Coralogix domain with path changed to one of the following:
    • nrdp/v1/:application/:subsystem/nrdp/
    • nrdp/v1/:application/:subsystem/
  • appName: Application name added to your metric attributes
  • subsystemName: Subsystem name added to your metric attributes
  • privateKey: Coralogix Send-Your-Data API key

Nagios XI

Once Nagios Core is configured, configure Nagios XI.

STEP 1. Select the admin tab in your navigation pane.

STEP 2. In the left-hand side bar, click Outbound Transfers and input the following parameters:

  • Outbound check transfer: Enable.
  • Global options: Change filter mode to include and filter /^.*/.
  • NRDP: Enable.
  • IP: (without HTTPS): Coralogix ingress endpoint associated with your Coralogix domain with path changed to one of the following:
    • nrdp/v1/:application/:subsystem/nrdp/
    • nrdp/v1/:application/:subsystem/
  • Type: HTTPS
  • Token: Input Coralogix Send-Your-Data API key.
  • Settings: Update as necessary.

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].

On this page

Live Webinar
Next-Level O11y: Why Every DevOps Team Needs a RUM Strategy
April 30th at 12pm ET | 6pm CET
Save my Seat