[collectd] Collectd Nagios IP Socket

Crowder, Travis Travis.Crowder at penton.com
Fri Feb 15 06:03:31 CET 2013


From: Lindsay Holmwood <lindsay at holmwood.id.au<mailto:lindsay at holmwood.id.au>>
Date: Fri, 15 Feb 2013 15:15:49 +1100
To: Collectd <collectd at verplant.org<mailto:collectd at verplant.org>>
Subject: Re: [collectd] Collectd Nagios IP Socket



On Friday, February 15, 2013, Crowder, Travis wrote:
Is there a way for Collectd and Nagios to play together over an IP socket instead of a Unix socket?

Nagios and Collectd live on different boxes in my setup.

Thanks!

I'm guessing you want your collectd-nagios Nagios checks to execute against a remote collectd?

I have tackled this problem in two ways:

1. use socat to expose the unixsock over TCP on the collectd box, then do the reverse on the Nagios box, e.g.

collectd-nagios => (socat unixsock to tcp client) => (socat tcp server to collectd unixsock) => collectd unixsock => collectd

This works pretty well and is fairly straightforward to set up, but you'll need to hack collectd's init script to reliably kill old socat processes and start up new ones, lest you receive 1,000's of failing collectd-nagios checks when you trigger a race condition.

It also starts getting tricky if you start needing to scale your Nagios instances horizontally.

2. Use Visage* to expose the RRDs as JSON over HTTP, and write custom monitoring checks to query this data and alert appropriately.

This gives you a lot of flexibility to alert more intelligently (e.g. alert if >60% of the  CPU cores have been pegged at >95% for the last 5 minutes), at the cost of having to write your own checks every time you want to monitor something.

HTH,
Lindsay

* I am the primary author of Visage, so take anything I say with a grain of salt


--
w: http://holmwood.id.au/~lindsay/
t: @auxesis

_______________________________________________ collectd mailing list collectd at verplant.org<mailto:collectd at verplant.org> http://mailman.verplant.org/listinfo/collectd

You are awesome.

Thank you!

-Travis Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20130215/3d8636fd/attachment.html>


More information about the collectd mailing list