[collectd] output plugin for Splunk

Florian Forster octo at verplant.org
Thu Aug 21 11:55:07 CEST 2008

Hi Clay,

On Wed, Aug 20, 2008 at 03:20:11PM -0700, Clay Loveless wrote:
> With that combination, Splunk will run the script  of my choosing on a
> configurable interval and index that script's STDOUT.

sounds good :)

> I would really like feedback on the approach I'm using here. It's
> pretty bare bones -- specifically, I'm interested in my use of the  
> FLUSH command.

You don't need the FLUSH command here. That command tells plugins such
as `rrdtool' to write values to disk *right now*, but it doesn't effect
the `unixsock' plugin itself (i. e. the values you'll get with a
`GETVAL' command). Even if it would, you'd need to send the `FLUSH'
command first. Also, the syntax you're using can't be right. It should
be something like:
  if flush:
    self._cmd('FLUSH timeout=1 identifier=' + val)

Unless you do something with RRD files afterwards you really don't need
to FLUSH anything here. I'd simply remove it..

> I notice that the network.c file in the collectd core  keeps track of
> data that's already been sent to avoid sending it  again. Will using
> FLUSH in this way achieve the same effect? (Doesn't  seem like it
> will.)

No: The network plugin has a buffer which it fills up and sends as soon
as it's full. This way, many values can be sent at once, which safes
network traffic. If you send a FLUSH command to the network plugin, it
simply sends out this buffer right away.

Does this answer your question?
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080821/386f50e5/attachment.pgp 

More information about the collectd mailing list