<div dir="ltr">Hi Ben,<br><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 5:34 PM Stuart Cracraft <<a href="mailto:smcracraft@me.com">smcracraft@me.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Ben,<div><br></div><div>We just use the exec plugin of collect to throw all the stuff into <div>collectd and from there into graphite and from there to</div><div>Icinga/Nagios for monitoring/alarms.</div><div><br></div><div>It is super, super simple. Most people do that...</div><div><br></div><div>We are transitioning into influxdb/grafana instead but for the past</div><div>year or two the above are sufficient.</div><div><br></div><div>For the exec plugin, we just create one erb script, in Chef, which</div><div>sends out to the necessary systems, collects the items via the</div><div>templates/default/foobar.sh.erb, and which outputs them to</div><div>the stdout for the collectd parent process and from there up</div><div>to the collectd+graphite graphs/servers.</div></div></div></blockquote><div><br></div><div>The other approach you can look at is exposing the data as JSON, and using collectd's curl_json[0] plugin to consume that data. </div><div><br></div><div>I'm currently working on a project with a server that's doing data distribution, which exposes traffic accounting metrics via a HTTP endpoint as JSON. We have collectd consuming this JSON, which works quite nicely as nodes come and go thanks to the wildcard matchers of the Key argument[1].</div><div><br></div><div>So you don't need a server constantly running to serve this JSON, you could write out the JSON to a file and serve it up with Apache, Nginx, etc. </div><div><br></div><div>Regardless of you using exec or curl_json, consider using counters to keep track of the traffic, and the derive [2] type in collectd to automatically calculate the rate of change. This keeps your collection logic much simpler. </div><div><br></div><div>Cheers,</div><div>Lindsay</div><div><br></div><div>[0] <a href="https://collectd.org/wiki/index.php/Plugin:cURL-JSON">https://collectd.org/wiki/index.php/Plugin:cURL-JSON</a></div><div>[1] <a href="https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_curl_json">https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_curl_json</a></div><div>[2] <a href="https://collectd.org/wiki/index.php/Data_source">https://collectd.org/wiki/index.php/Data_source</a></div></div></div>