Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
136 lines (104 sloc) 3.9 KB



Collects state metrics from your Nagios installation by monitoring the Nagios status.dat file and presents them to the Snap system.

  1. Getting Started
  1. Contributing
  2. License
  3. Acknowledgements

Getting Started

System Requirements

Operating systems

All OSs currently supported by snap:

  • Linux/amd64
  • Darwin/amd64


Download Snap:

For Snap, check here.

To build the plugin binary:


Clone repo into $GOPATH/src/

$ git clone<yourGithubID>/snap-plugin-collector-nagios.git


The following provides instructions for building the plugin yourself if you decided to download the source. We assume you already have a $GOPATH setup for golang development. The repository utilizes glide for library management.

build: make

testing: make test

Configuration and Usage

Load the Plugin

Once the framework is up and running, you can load the plugin.

$ snaptel plugin load snap-plugin-collector-nagios
Plugin loaded
Name: nagios
Version: 1
Type: collector
Signed: false
Loaded Time: Sat, 18 Mar 2017 13:28:45 PDT

Task File

You need to create or update a task file to use the Nagios collector plugin. We have provided an example, _examples/tasks/nagios-status-task.yaml shown below. In our example, we utilize the psutil collector so we have some data to work with. There is one (1) configuration setting you can use.

Setting Description Required?
status_file The Nagios status file to monitor states from Yes

The status file is your Nagios installation's status.dat file, usually found in $NAGIOS_ROOT/var/status.dat . It is the same file the CGI scripts use to present host and service statuses. This is where we collect state metrics from for the whole Nagios installation.

  version: 1
    type: "simple"
    interval: "1s"
    count: 5
  max-failures: 10
        /nagios/*/acknowledged: {} 
        /nagios/*/state: {}
        /nagios/*/services/*/acknowledged: {}
        /nagios/*/services/*/state: {}
        - plugin_name: "file"
            file: "/tmp/nagios-metrics.log"

Once the task file has been created, you can create and watch the task.

$ snaptel task create -t examples/tasks/nagios-status-task.yaml
Using task manifest to create task
Task created
ID: 72869b36-def6-47c4-9db2-822f93bb9d1f
Name: Task-72869b36-def6-47c4-9db2-822f93bb9d1f
State: Running

$ snaptel task list
ID                                       NAME
STATE     ...
Task-72869b36-def6-47c4-9db2-822f93bb9d1f    Running   ...

Contributing We love contributions!

The most immediately helpful way you can benefit this plug-in is by cloning the repository, adding some further examples and submitting a pull request.


Released under the Apache 2.0 License.