Stackstate-Nagios Integration

Overview

Send events from your Nagios-monitored infrastructure to StackState for richer alerting and to help correlate Nagios events with metrics from your StackState-monitored infrastructure.

This check watches your Nagios server’s logs and sends events to your StckState event stream: track service flaps, host state changes, passive service checks, host and service downtimes, and more. The check can also send Nagios Perfdata as metrics to StackState.

  • Watches your Nagios server’s logs and sends events to your StackState event stream. It emits eve

The check emits events for service flaps, host state changes, passive service checks, host and service downtimes, and more. It can also send Nagios Perfdata to StackState as metrics.

Setup

Installation

This check is packaged with the Agent, so simply install the agent.

Configuration

The Nagios integration requires the StackState Agent.

  1. Find the Nagios configuration file on your server (usually /etc/nagios3/nagios.cfg)

    sudo find /etc -type f -name nagios.cfg
    
  2. Configure the StackState Agent to access Nagios, edit conf.d/nagios.yaml

    init_config:
    
    instances:
        - nagios_conf: /etc/nagios3/nagios.cfg
          collect_events: True
    

  3. Restart the Agent

Note:To integrate with the Icinga fork of Nagios, you should be able to use the Nagios integration to pull in Icinga events. Just link to the Icinga configuration instead of the Nagios one.

Data Collected

Metrics

With a default configuration, the Nagios check doesn’t collect any metrics. But if you set collect_host_performance_data and/or collect_service_performance_data to True, the check watches for perfdata and sumbits it as gauge metrics to StackState.

Events

The check watches the Nagios events log for log lines containing these string, emitting an event for each such line:

  • SERVICE FLAPPING ALERT
  • ACKNOWLEDGE_SVC_PROBLEM
  • SERVICE ALERT
  • HOST ALERT
  • PASSIVE SERVICE CHECK
  • CURRENT SERVICE STATE
  • ACKNOWLEDGE_HOST_PROBLEM
  • CURRENT HOST STATE
  • SERVICE NOTIFICATION
  • HOST DOWNTIME ALERT
  • PROCESS_SERVICE_CHECK_RESULT
  • SERVICE DOWNTIME ALERT