[collectd] Use collectd daemon to send stats for itself and other hosts?

Bruno Prémont bonbons at linux-vserver.org
Sat Sep 1 11:30:16 CEST 2012


On Sat, 01 September 2012 Caleb Maclennan <caleb at alerque.com> wrote:
> Is there a way to report statistics for more than one host using a single
> daemon/config file? I use a central server using rrdtool to log and several
> servers pass along their stats via the network plugin.
> 
> One of the client machines is able to reach several devices and send out
> stats for hosts other than itself. I would like these to be logged in their
> own respective host files when they hit rrdtool. I can pass along the stats
> but I can't figure out how to scope the config such that they get tagged
> with a hostname other than the host running the daemon.
> 
> Is this possible? If so how would the config have to be setup? If it
> matters, on of the things I'm probing for on other hosts is memcached
> stats. I cannot get into the machines to run collectd locally but can pick
> up data from another machine in the same cluster. However, I don't want to
> the two sets of stats scrambled under the same hostname in the logs.

It's a matter of the plugin collecting the stats, not collectd itself
(you try to use the filter plugins to rewrite the host, see
  http://collectd.org/documentation/manpages/collectd.conf.5.shtml#filter_configuration).

If memcached cannot set host from its configuration you are unlucky (though
you may patch collectd's memcached plugin to allow configuring the host
for which it reports the stats).

Bruno


> Thanks for any pointers!
> Caleb
> 
> P.S. I posted this question to the Unix&Linux Stack Exchange site if
> anybody wants to answer there and earn rep / promote collectd; however I
> will be sure to cross post anything I learn from answers that come in here.
> 
> http://unix.stackexchange.com/questions/46834/is-collectd-able-to-send-data-tagged-as-a-host-other-than-itself



More information about the collectd mailing list