Agent Check: Nagios
Overview
Send events from your Nagios-monitored infrastructure to Datadog for richer alerting and to help correlate Nagios events with metrics from your Datadog-monitored infrastructure.
This check watches your Nagios server’s logs and sends events to Datadog for the following:
- Service flaps
- Host state changes
- Passive service checks
- Host and service downtimes
This check can also send Nagios performance data as metrics to Datadog.
Setup
Installation
The Nagios check is included in the Datadog Agent package, so you don’t need to install anything else on your Nagios servers.
Configuration
Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the Containerized section.
Containerized
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Parameter | Value |
---|
<INTEGRATION_NAME> | nagios |
<INIT_CONFIG> | blank or {} |
<INSTANCE_CONFIG> | {"nagios_conf": "/etc/nagios3/nagios.cfg"} |
Note: The containerized Agent should be able to access the /etc/nagios3/nagios.cfg
file to enable the Datadog-Nagios integration.
Validation
Run the Agent’s status subcommand and look for nagios
under the Checks section.
Data Collected
Metrics
| |
---|
nagios.current_users.users (gauge) | Number of current user Shown as user |
nagios.disk_space (gauge) | Disk space Shown as mebibyte |
nagios.host.pl (gauge) | Packet loss Shown as percent |
nagios.host.rta (gauge) | Round trip time between Nagios and client Shown as millisecond |
nagios.http.size (gauge) | HTTP response size Shown as byte |
nagios.http.time (gauge) | HTTP response time Shown as second |
nagios.ping.pl (gauge) | Packet loss Shown as percent |
nagios.ping.rta (gauge) | Round trip time between Nagios and client Shown as millisecond |
nagios.swap_usage.swap (gauge) | Memory swap usage Shown as mebibyte |
Log collection
Collecting logs is disabled by default in the Datadog Agent, enable it in your datadog.yaml
file:
Add this configuration block to your nagios.d/conf.yaml
file to start collecting your Nagios logs:
logs:
- type: file
path: /opt/nagios/var/log/nagios.log
source: nagios
Change the path
parameter value based on your environment, see log_file
value in your nagios configuration file. See the sample nagios.d/conf.yaml for all available configuration options.
Restart the Agent.
Events
The check watches the Nagios events log for log lines containing these strings, emitting an event for each line:
- SERVICE FLAPPING ALERT
- ACKNOWLEDGE_SVC_PROBLEM
- SERVICE ALERT
- HOST ALERT
- ACKNOWLEDGE_HOST_PROBLEM
- SERVICE NOTIFICATION
- HOST DOWNTIME ALERT
- PROCESS_SERVICE_CHECK_RESULT
- SERVICE DOWNTIME ALERT
Service Checks
The Nagios check does not include any service checks.
Troubleshooting
Need help? Contact Datadog support.
Further Reading