• /
  • ログイン

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.

A screenshot of the guided install CLI.

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:

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

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.

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 v1.14.0+. 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 license key, 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 > 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 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.

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.