[collectd] Dynamic Intervals and Pulling Data

Paul Querna pquerna at apache.org
Tue Sep 8 03:54:19 CEST 2009


Hi,

I am looking at a way to contribute a plugin for collectd to allow
'live' streaming of data.

Of course, setting the interval to 1 second, and using the existing
network plugin, would basically achieve this, but for 99.9% of the
time, running all of the plugins every second would be massive
overkill.

That led me to believing the best way to do this would be to change
the interval on demand, so when there is interest in getting live
data, the interval is changed to 1 second, and once you are no longer
interested in the live data, change the interval back to 20 seconds
(or more).

I think the best design I've thought of so far is to creare a new
plugin, tentatively called network-tcp.  It would connect to an
IP/port on startup, stream data in the same format as the UDP plugin
to the end point.    This end point could then also send a command
back to collectd, with some basic commands, but the most important one
being SET_INTERVAL, but I can imagine other commands being useful.

I've looked at a few of the existing plugins, most of them don't use
the interval_g, but a few do, mostly in calculating the period over
which they were ran for averages.

I am willing to contribute all the code, but I am hoping to get some
feedback on if the general idea seems viable, or are there suggestions
for alternative designs that would allow faster updates some of the
time, but without flooding a network end point with updates every
second all of the time.

Thoughts?

Thanks,

Paul Querna



More information about the collectd mailing list