Tim Starling wrote:
<snip>
I wrote a perl script a while back to poll the gmond
XML output from one
machine and stop or start a process on another machine based on the value of
a metric retrieved. I didn't use telnet (ick), I read from a socket and then
used an XPath module to find the metric in the XML. It's probably lying
around in my home directory somewhere if you want to look at it.
Hello,
I have wrote a little perl plugin for nagios that would let us grab a
given metric for a given host. The plugin implements caching of gmetad
data, caching of xml parse and handle warning / critical threshold.
I have also give a little configuration example for nagios
checkcommands.cfg.
Files are in /home/hashar/gmeta-nagios/ :
cbg_commands.cfg The nagios configuration for the plugin
check_by_gmetad.pl The plugin itself, use perl
gmetad-cache.stor XML Parse cache
gmetad-cache.xml XML grabbed from the gmetad host.
So now, it is just pending for a FC3 larousse upgrade and a nagios compile.
If caching is required, then adding metrics to nagios
is obviously not the
same as adding metrics to ganglia. For ganglia, you run gmetric whenever a
metric changes, so you can have a loop that sets 30 metrics in each pass if
you like. You don't give it a plugin for it to invoke at its leisure, you
make your own daemon.
I will set up a basic nagios installation first, then we can work on
metrics. Memcached instances / errors might be interesting as well as
mysql replication lag for slaves.
cheers,
--
Ashar Voultoiz - WP++++
http://en.wikipedia.org/wiki/User:Hashar
http://www.livejournal.com/community/wikitech/
IM: hashar(a)jabber.org ICQ: 15325080