Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Script that scrapes alert statistics from Nagios and reports them to Librato

License

Notifications You must be signed in to change notification settings

josephruscio/rearviewmirror

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rearviewmirror

rearviewmirror is a simple script for gathering Nagios problem statistics and submitting them to Librato. It focuses on summary (overall, servicegroup and hostgroup) statistics and writes them to the nagios.problems metrics namespace within Librato.

rearviewmirror is a fork of Ledbetter.

Installation

Clone the GitHub repository and use Bundler to install the gem dependencies.

$ git clone https://github.com/github/rearviewmirror.git
$ cd rearviewmirror
$ bundle install

Usage

rearviewmirror requires a number of environment variables for runtime configuration. The following example demonstrates how to run it manually from the command line, but you would typically run it as a cron job.

$ export NAGIOS_URL=http://nagios.foo.com/cgi-bin/nagios3
$ export NAGIOS_USER=foo
$ export NAGIOS_PASS=bar
$ export LIBRATO_USER="[email protected]"
$ export LIBRATO_TOKEN="aec123765489fe45a6"
$ bundle exec ruby rearviewmirror.rb

Optionally you can set VERBOSE=1 to also print statistics to stdout. LIBRATO_PREFIX can also be set to override the default namespace (nagios.problems).

$ VERBOSE=1 bundle exec ruby rearviewmirror.rb
nagios.problems.all 41 1359170720
nagios.problems.critical 27 1359170720
nagios.problems.warning 12 1359170720
nagios.problems.unknown 2 1359170720
nagios.problems.servicegroups.apache 0 1359170720
nagios.problems.servicegroups.backups 3 1359170720
nagios.problems.servicegroups.dns 0 1359170720
nagios.problems.servicegroups.mysql 1 1359170720
...

License

rearviewmirror is distributed under the MIT license.

About

Script that scrapes alert statistics from Nagios and reports them to Librato

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%