https://github.com/github/ledbetter
Script that scrapes alert statistics from Nagios and reports them to Graphite
https://github.com/github/ledbetter
Last synced: 5 months ago
JSON representation
Script that scrapes alert statistics from Nagios and reports them to Graphite
- Host: GitHub
- URL: https://github.com/github/ledbetter
- Owner: github
- License: mit
- Archived: true
- Fork: true (obfuscurity/ledbetter)
- Created: 2013-09-28T16:43:55.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-01-10T18:23:15.000Z (about 11 years ago)
- Last Synced: 2024-09-30T00:41:29.323Z (over 1 year ago)
- Language: Ruby
- Size: 19.3 MB
- Stars: 36
- Watchers: 32
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-monitoring - ledbetter github - Script that scrapes alert statistics from Nagios and reports them to Graphite. (Nagios Monitoring / Nagios Monitoring Addons)
README
# Ledbetter
Ledbetter is a simple script for gathering Nagios problem statistics and submitting them to Graphite. It focuses on summary (overall, servicegroup and hostgroup) statistics and writes them to the `nagios.problems` metrics namespace within Graphite.
## Installation
Clone the GitHub repository and use Bundler to install the gem dependencies.
```
$ git clone https://github.com/github/ledbetter.git
$ cd ledbetter
$ bundle install
```
## Usage
Ledbetter 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 CARBON_URL=carbon://localhost:2003
$ bundle exec ruby ledbetter.rb
```
Optionally you can set `DEBUG=1` to also print statistics to `stdout`. `CARBON_PREFIX` can also be set to override the default namespace (`nagios.problems`).
```
$ DEBUG=1 bundle exec ruby ledbetter.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
Ledbetter is distributed under the MIT license.