[collectd] CollectD

Robert Cross bluebobx at gmail.com
Mon Nov 7 12:08:35 CET 2016

> ----------------------------------------------------------------------
> Message: 1
> Date: Wed, 2 Nov 2016 15:15:14 +0000
> From: "Batham, Shailendra" <sbatham at amgen.com>
> To: "CollectD Mailgroup (collectd at verplant.org)"
>         <collectd at verplant.org>
> Subject: [collectd] CollectD
> Message-ID:
>         <BLUPR07MB3728026B215E0D77426DCCFB5A00 at BLUPR07MB372.
> namprd07.prod.outlook.com>
> Content-Type: text/plain; charset="us-ascii"
> Hello,
> I am using collectd on linux, sending data to InfluxDB.
> Is there any option for tagging collectd metrics to influxdb?
> I want global tagging like team and sub team for each time series entry in
> Influx.
> Any help is appreciated.
> Thanks,
> Shailendra
> ****************************************

Hi Shailendra, if you check the archives, then you'll see that I asked a
similar question - although in my case I wanted to tag output to Apache
Kafka, (which then later goes to InfluxDB). Unfortunately, this isn't
possible. :(

However, in the course of that conversation the InfluxData guys were *very*
helpful, and gave us a solution that I'll suggest might help you. Instead
of sending your data direct to InfluxDB from CollectD, send it (as graphite
format) to a port on your local machine. Then install Influx's Telegraf
software (free!) and get IT to pick up from that port and forward to
InfluxDB. Then you can add whatever tags you want at the Telegraf stage AND
also add a conversion to influx format (which means slightly less load on
your InfluxDB box).

LoadPlugin write_graphite
<Plugin write_graphite>
  <Node "telegraf">
    Host     "localhost"
    Port     "8094"
    Protocol "tcp"

Sample telegraf.conf:
  component = "riak"
  environment = "qa1"
  support = "us-west"

  collection_jitter = "2s"
  debug = false
  flush_interval = "10s"
  flush_jitter = "2s"
  hostname = ""
  interval = "5s"
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  omit_hostname = false
  quiet = false
  round_interval = true

  allowed_pending_messages = 10000
  data_format = "graphite"
  max_tcp_connections = 250
  service_address = ":8094"
  tagexclude = [ "collectd-garbage" ]
  templates = [ "collectd-garbage.measurement.field*" ]

  urls = ["http://influxdb.acme.com:8086"]
  database = "stats"
  retention_policy = ""
  write_consistency = "any"
  timeout = "5s"

Obviously you'll have to update that telegraf configuration to suit what
you've got, but we've been using that spec and it seems to work quite well.
I've not tested that configuration, but it's taken from what we're using,
but with a sample influx output substituted for the Kafka one we use.

The InfluxData guys were also pointing out that there's settings you can
make in the Telegraf setup to tune your interface to InfluxDB, so it's
maybe worthwhile from that point of view. If you don't want to run a
Telegraf instance on each box then you could arrange for one box in a group
to act as a forwarder and get all the "child" collectd instances to send to
that instead. Downside is that all the children would obviously have to
have the same added tags.

Hope this helps, regards. Bob Cross.
(PS you might want to use a more descriptive subject line next time!!)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20161107/30c33101/attachment.html>

More information about the collectd mailing list