collectd

edit
  • Version: 3.0.3
  • Released on: December 26, 2016
  • Changelog

Getting Help

edit

For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github. For the list of Elastic supported plugins, please consult the Elastic Support Matrix.

Description

edit

Read events from the collectd binary protocol over the network via udp. See https://collectd.org/wiki/index.php/Binary_protocol

Configuration in your Logstash configuration file can be as simple as:

    input {
      udp {
        port => 25826
        buffer_size => 1452
        codec => collectd { }
      }
    }

A sample collectd.conf to send to Logstash might be:

    Hostname    "host.example.com"
    LoadPlugin interface
    LoadPlugin load
    LoadPlugin memory
    LoadPlugin network
    <Plugin interface>
        Interface "eth0"
        IgnoreSelected false
    </Plugin>
    <Plugin network>
        <Server "10.0.0.1" "25826">
        </Server>
    </Plugin>

Be sure to replace 10.0.0.1 with the IP of your Logstash instance.

 

Synopsis

edit

This plugin supports the following configuration options:

Required configuration options:

collectd {
  }

Available configuration options:

Setting Input type Required

authfile

string

No

enable_metric

boolean

No

id

string

No

nan_handling

string, one of ["change_value", "warn", "drop"]

No

nan_tag

string

No

nan_value

number

No

prune_intervals

boolean

No

security_level

string, one of ["None", "Sign", "Encrypt"]

No

typesdb

array

No

Details

edit

 

authfile

edit
  • Value type is string
  • There is no default value for this setting.

Path to the authentication file. This file should have the same format as the AuthFile in collectd. You only need to set this option if the security_level is set to Sign or Encrypt

enable_metric

edit
  • Value type is boolean
  • Default value is true

Disable or enable metric logging for this specific plugin instance by default we record all the metrics we can, but you can disable metrics collection for a specific plugin.

  • Value type is string
  • There is no default value for this setting.

Add a unique ID to the plugin configuration. If no ID is specified, Logstash will generate one. It is strongly recommended to set this ID in your configuration. This is particularly useful when you have two or more plugins of the same type, for example, if you have 2 grok filters. Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.

output {
 stdout {
   id => "my_plugin_id"
 }
}

nan_handling

edit
  • Value can be any of: change_value, warn, drop
  • Default value is "change_value"

What to do when a value in the event is NaN (Not a Number)

  • change_value (default): Change the NaN to the value of the nan_value option and add nan_tag as a tag
  • warn: Change the NaN to the value of the nan_value option, print a warning to the log and add nan_tag as a tag
  • drop: Drop the event containing the NaN (this only drops the single event, not the whole packet)

nan_tag

edit
  • Value type is string
  • Default value is "_collectdNaN"

The tag to add to the event if a NaN value was found Set this to an empty string ('') if you don’t want to tag

nan_value

edit
  • Value type is number
  • Default value is 0

Only relevant when nan_handeling is set to change_value Change NaN to this configured value

prune_intervals

edit
  • Value type is boolean
  • Default value is true

Prune interval records. Defaults to true.

security_level

edit
  • Value can be any of: None, Sign, Encrypt
  • Default value is "None"

Security Level. Default is None. This setting mirrors the setting from the collectd Network plugin

typesdb

edit
  • Value type is array
  • There is no default value for this setting.

File path(s) to collectd types.db to use. The last matching pattern wins if you have identical pattern names in multiple files. If no types.db is provided the included types.db will be used (currently 5.4.0).