[collectd] write_http plugin appears to pause all data collection while dumping it's cache

Patrick OBrien PatrickOBrien at eharmony.com
Wed Sep 21 20:22:21 CEST 2011


Hey All -

I've been messing around with getting data from collectd into something other than RRD (in my case it is carbon/graphite) and one of the easiest ways I could see to do this was to have the write_http plugin PUT the data in JSON format to a central location, have the listening server parse the JSON and then send it along to carbon via an AMQP cluster. Immediately I noticed that there were gaps in the data that was being graphed (anywhere from 5 to 20 seconds or so) which struck me as fairly odd, especially considering that all metrics from the host for that time period was not showing up (see attached screenshot).

Initially I thought that this was caused somewhere along the line by  the pieces I had written, so I set about optimizing the code I had written (which really isn't a bad thing) and checking into what carbon and the AMQP were doing. After a while of chasing down dead end leads I took a look at exactly what collectd was doing. I've taken a look at collectd 4.10.3 and 5.0.0 and all of them appear to exhibit the same behavior: unless the logs are lying, once the write_http buffer fills up and sends the data off, no information is gathered by collectd.

I've attached the debug logs from both host1 (collectd 4.10.3) and host2 (collectd 5.0.0). If the log file is accurate, is this the expected behavior of the write_http plugin? I've also attached our minimal collectd.conf, which gathers load data once per second, and just for testing is only gathering load info.

Thank you!

-pat


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2011-09-21 at 11.07.02 AM.png
Type: image/png
Size: 25762 bytes
Desc: Screen shot 2011-09-21 at 11.07.02 AM.png
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110921/6a6e8c9a/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001..txt
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110921/6a6e8c9a/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: host1.txt
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110921/6a6e8c9a/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: host2.txt
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110921/6a6e8c9a/attachment-0005.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd.conf
Type: application/octet-stream
Size: 1486 bytes
Desc: collectd.conf
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110921/6a6e8c9a/attachment-0001.obj>


More information about the collectd mailing list