• EnglishEspañol日本語한국어Português
  • Log inStart now

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

Instrument your Nagios instance quickly and send your telemetry data with guided install. Our guided install creates a customized CLI command for your environment that downloads and installs the New Relic CLI and the infrastructure agent.

Ready to get started? Click one of these buttons to try it out.

Guided install

Install and activate

To install the Nagios integration:

Additional notes:

Did this doc help with your installation?

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 example configurations, see the nagios-config.yml and nagios-service-checks.yml examples.

Our configuration files have common settings used in all of our integrations, such as interval, timeout, andinventory_source, among others. For more on these common settings, see this list of configuration properties.

Specific settings related to Nagios are defined using the env section of the configuration file. These settings control the connection to your Nagios instance as well as other security settings and features.

Nagios instance settings





This points to a yaml file containing definitions of the service checks that will be run by the integration. Required.



The number of service checks to be run concurrently.



The name of the table where the service check results are saved.


Service checks config file

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




The naming convention is not specific, and allows for easy recognition in our infrastructure UI.


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.


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


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

These setting values can be defined in several ways:

  • Add the values directly in the config file.
  • Replace the values from environment variables using the {{}} notation. This requires infrastructure agent version 1.14.0 or higher. Read more here.
  • Use secrets management to protect sensible information, such as passwords, so that it's not exposed in plain text in the configuration file. For more information, see secrets management.

Labels/custom attributes

Environment variables can be used to control configuration settings, such as your , and are then passed to the infrastructure agent. For instructions on how to use the passthrough feature, see Configure the infrastructure agent.

You can also decorate your metrics using labels. Labels allow you to add key/value pair attributes to your metrics. You can use these labels to query, filter, or group your metrics.

Our default sample config file includes examples with labels, you can remove, modify, or add new ones of your choice.

env: production
role: nagios


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 > All capabilities > Infrastructure > Third-party services and select one of the Nagios integration links.

Nagios data is attached to the NagiosServiceCheckSample 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 type.




The command used to run the service check.


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


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


The standard output (stdout) of the service check.


The descriptive name of the service check being performed.


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


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 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.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.