• /
  • Log in
  • Free account
Docs

Nagios monitoring integration

Our Nagios integration lets you use your service checks directly, without the need to run a Nagios instance.

Read on to install the integration, and to see what data we collect.

Compatibility and requirements

Our integration is compatible with any existing service that conform to the Nagios Plugin API.

Before installing the integration, make sure that you meet the following requirements:

Quick start

The quickest way to get started is through our guided install.

Tip

Try our guided install for yourself. (If you're hosted in the EU, use our EU guided install.)

Install and activate

To install the Nagios integration:

Additional notes:

Configure the integration

An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.

For an example configuration, see the example config file.

Important

With secrets management, you can configure on-host integrations with New Relic Infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management.

Arguments

The nagios-config.yml contains two configurable arguments:

  • service_checks_config: This points to a yaml file containing definitions of the service checks that will be run by the integration.
  • concurrency: The number of services checks to be run concurrently (Default: 1).

Commands

The service_checks_config yaml file contains the top-level array service_checks. Each service check must contain both a name and a command.

Key

Description

name

The naming convention is not specific, and allows for easy recognition in the Infrastructure UI.

command

The command is an array of strings, with the first position containing the path to the executable and the remaining positions containing the arguments to the executable.

labels

A collection of key: value pairs which help to identify and group service checks in Insights.

parse_output

Attempts to parse the output of service checks that conform to the Nagios Plugin API spec. Default: false.

Permissions

Non-configurable commands are run by the infrastructure agent, which itself is run by the root user. For the integration to run properly, ensure that the permissions on the yaml file are appropriately restrictive as indicated below:

Example configurations

Example file configurations:

For more about the general structure of on-host integration configuration, see Configuration.

Find and use data

To find your integration data go to one.newrelic.com > Infrastructure > Third-party services and select one of the Nagios integration links.

In New Relic Insights, Nagios data is attached to the NagiosServiceCheckSample Insights event type.

For more on how to find and use your data, see Understand integration data.

Metric data

The Nagios integration collects the following metric data attributes.

Nagios service check sample metrics

These attributes can be found by querying the NagiosServiceCheckSample event types in Insights.

Metric

Description

serviceCheck.command

The command used to run the service check.

serviceCheck.error

The standard error (stderr) output of the service check.

serviceCheck.longServiceOutput

The portion of the message that is parsed by Nagios as $LONGSERVICEOUTPUT$. Only enabled if parse_output is set.

serviceCheck.message

The standard output (stdout) of the service check.

serviceCheck.name

The descriptive name of the service check being performed.

serviceCheck.serviceOutput

The portion of the message that is parsed by Nagios as $SERVICEOUTPUT$. Only enabled if parse_output is set.

serviceCheck.status

The return code of the service check. Options:

  • 0 = Ok
  • 1 = Warning
  • 2 = Critical
  • 3 = Unknown

*

Any additional metrics defined and reported by the service check. Only enabled if parse_output is set.

Troubleshooting

Troubleshooting tips:

Check the source code

This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.

For more help

If you need more help, check out these support and learning resources:

Docs
Create issueEdit page
Copyright © 2021 New Relic Inc.