<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div><span style="font-family: Calibri; font-size: 11pt; text-align: left; font-weight: bold; ">From:
</span><span style="font-family: Calibri; font-size: 11pt; text-align: left; ">Lindsay Holmwood <</span><a href="mailto:lindsay@holmwood.id.au" style="font-family: Calibri; font-size: 11pt; text-align: left; ">lindsay@holmwood.id.au</a><span style="font-family: Calibri; font-size: 11pt; text-align: left; ">></span></div>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">Date: </span>Fri, 15 Feb 2013 15:15:49 +1100<br>
<span style="font-weight:bold">To: </span>Collectd <<a href="mailto:collectd@verplant.org">collectd@verplant.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [collectd] Collectd Nagios IP Socket<br>
</div>
<div><br>
</div>
<br>
<br>
On Friday, February 15, 2013, Crowder, Travis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>Is there a way for Collectd and Nagios to play together over an IP socket instead of a Unix socket?</div>
<div><br>
</div>
<div>Nagios and Collectd live on different boxes in my setup.</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
</blockquote>
<div><br>
</div>
<div>I'm guessing you want your collectd-nagios Nagios checks to execute against a remote collectd?</div>
<div><br>
</div>
<div>I have tackled this problem in two ways:</div>
<div><br>
</div>
<div>1. use socat to expose the unixsock over TCP on the collectd box, then do the reverse on the Nagios box, e.g. </div>
<div><br>
</div>
<div>collectd-nagios => (socat unixsock to tcp client) => (socat tcp server to collectd unixsock) => collectd unixsock => collectd</div>
<div><br>
</div>
<div>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. <span></span></div>
<div><br>
</div>
<div>It also starts getting tricky if you start needing to scale your Nagios instances horizontally. </div>
<div><br>
</div>
<div>2. Use Visage* to expose the RRDs as JSON over HTTP, and write custom monitoring checks to query this data and alert appropriately. </div>
<div><br>
</div>
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.
<div><br>
</div>
<div>HTH,</div>
<div>Lindsay</div>
<div><br>
</div>
<div>* I am the primary author of Visage, so take anything I say with a grain of salt</div>
<br>
<br>
-- <br>
w: <a href="http://holmwood.id.au/~lindsay/">http://holmwood.id.au/~lindsay/</a><br>
t: @auxesis<br>
<br>
_______________________________________________ collectd mailing list <a href="mailto:collectd@verplant.org">
collectd@verplant.org</a> <a href="http://mailman.verplant.org/listinfo/collectd">
http://mailman.verplant.org/listinfo/collectd</a></span>
<div><br>
</div>
<div>You are awesome.</div>
<div><br>
</div>
<div>Thank you!</div>
<div><br>
</div>
<div>-Travis Crowder</div>
<span id="OLK_SRC_BODY_SECTION"></span>
</body>
</html>