For other versions, see theVersioned plugin docs.
For plugins not bundled by default, it is easy to install by running bin/logstash-plugin install logstash-output-influxdb
. See Working with plugins for more details.
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.
This output lets you output Metrics to InfluxDB (>= 0.9.0-rc31)
The configuration here attempts to be as friendly as possibleand minimize the need for multiple definitions to write tomultiple measurements and still be efficient
the InfluxDB API let’s you do some semblance of bulk operationper http call but each call is database-specific
You can learn more at InfluxDB homepage
This plugin supports the following configuration options plus the Common Options described later.
Setting | Input type | Required |
---|---|---|
No |
||
No |
||
Yes |
||
No |
||
No |
||
No |
||
Yes |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
No |
||
string, one of |
No |
|
No |
||
No |
Also see Common Options for a list of options supported by alloutput plugins.
false
Allow the override of the time
column in the event?
By default any column with a name of time
will be ignored and the time willbe determined by the value of @timestamp
.
Setting this to true
allows you to explicitly set the time
column yourself
Note: time
must be an epoch value in either seconds, milliseconds or microseconds
{}
Allow value coercion
this will attempt to convert data point values to the appropriate type before postingotherwise sprintf-filtered numeric values could get sent as stringsformat is {'column_name' => 'datatype'}
currently supported datatypes are integer
and float
{}
Hash of key/value pairs representing data points to send to the named databaseExample: {'column1' => 'value1', 'column2' => 'value2'}
Events for the same measurement will be batched together where possibleBoth keys and values support sprintf formatting
"statistics"
The database to write - supports sprintf formatting
["@timestamp", "@version", "sequence", "message", "type"]
An array containing the names of fields from the event to exclude from thedata points
Events, in general, contain keys "@version" and "@timestamp". Other pluginsmay add others that you’ll want to exclude (such as "command" from theexec plugin).
This only applies when use_event_fields_for_data_points is true.
100
This setting controls how many events will be buffered before sending a batchof events. Note that these are only batched for the same measurement
The hostname or IP address to reach your InfluxDB instance
1
The amount of time since last flush before a flush is forced.
This setting helps ensure slow event rates don’t get stuck in Logstash.For example, if your flush_size
is 100, and you have received 10 events,and it has been more than idle_flush_time
seconds since the last flush,logstash will flush those 10 events automatically.
This helps keep both fast and slow log streams moving along innear-real-time.
1
The amount of time in seconds to delay the initial retry on connection failure.
The delay will increase exponentially for each retry attempt (up to max_retries).
3
The number of time to retry recoverable errors before dropping the events.
A value of -1 will cause the plugin to retry indefinately.A value of 0 will cause the plugin to never retry.Otherwise it will retry up to the specified number of times.
"logstash"
Measurement name - supports sprintf formatting
nil
The password for the user who access to the named database
["host"]
An array containing the names of fields to send to Influxdb as tags insteadof fields. Influxdb 0.9 convention is that values that do not change everyrequest should be considered metadata and given as tags. Tags are only sent whenpresent in data_points
or if user_event_fields_for_data_points
is true
.
n
, u
, ms
, s
, m
, h
"ms"
Set the level of precision of time
only useful when overriding the time value
false
Automatically use fields from the event as the data points sent to Influxdb
The following configuration options are supported by all output plugins:
"plain"
The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.
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 collectionfor a specific plugin.
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 usefulwhen you have two or more plugins of the same type. For example, if you have 2 influxdb outputs.Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
output { influxdb { id => "my_plugin_id" }}