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:
- Install the infrastructure agent.
- Linux distribution or Windows OS version compatible with New Relic's infrastructure agent.
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.
Install and activate
To install the Nagios integration:
Additional notes:
- Advanced: It's also possible to install the integration from a tarball file. This gives you full control over the installation and configuration process.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
¿Te ha ayudado este documento con la instalación?
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
Setting | Description | Default |
---|---|---|
SERVICE_CHECKS_CONFIG | This points to a yaml file containing definitions of the service checks that will be run by the integration. Required. | N/A |
CONCURRENCY | The number of service checks to be run concurrently. | 1 |
OUTPUT_TABLE_NAME | The name of the table where the service check results are saved. | NagiosServiceCheckSample |
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
.
Key | Description |
---|---|
| 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: |
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.
labels: env: production role: nagios
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 > 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.
Metric | Description |
---|---|
| 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 |
| 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 |
| The return code of the service check. Options:
|
| Any additional metrics defined and reported by the service check. Only enabled if |
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.