Giter Site home page Giter Site logo

ganglia-nagios-bridge's Introduction


ganglia-nagios-bridge


Copyright (C) 2010 Daniel Pocock
http://danielpocock.com/ganglia-nagios-bridge


Installation
------------

Copy ganglia-nagios-bridge.py to a suitable location (e.g. /usr/local/bin),
leaving off the '.py' extension.

Declare the services to be monitored in /etc/nagios3/*
  - see the included nagios.cfg for some examples

Copy nagios-bridge.conf to a suitable location (default /etc/ganglia)
and amend it as required.

Add ganglia-nagios-bridge to crontab
- it can be run every 1 to 5 minutes typically
- it must run as the nagios user so it will have permission to create files
  in the checkresult spool directory

e.g.

cat > /etc/crontab << EOF
# poll metrics from Ganglia, update Nagios
* * * * * nagios /usr/local/bin/ganglia-nagios-bridge
EOF

Limitations and troubleshooting
-------------------------------

Nagios must know about all the hosts and services exported by
Ganglia.  If it sees things in the checkresults file that it
doesn't know about, it logs warning messages about them
but it correctly processes all the things it does
recognise.

Make sure the hostnames and service names match exactly.

If the Ganglia XML is particularly large, you may want to buffer it
before parsing to avoid any risk of blocking the gmetad
while ganglia-nagios-bridge is working.  Of course, this requires
that you have sufficient RAM (or disk space) to buffer the XML.

Nagios is very picky about the checkresult filename.  mkstemp
is used to generate the filenames.  Nagios expects them to be
exactly 7 characters, starting with a 'c'.  Nagios will delete
the files after reading them.

Monitor nagios.log while it is processing the first checkresult
file to make sure it goes smoothly.  It will log errors if it
doesn't recognise a host or service name.  You may want to automatically
detect such issues in the log so that if new hosts/services appear in future,
you will be immediately alerted to update the Nagios configuration.


ganglia-nagios-bridge's People

Contributors

dpocock avatar jbuchbinder avatar

Watchers

xueji avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.