Status : core plugin, unit tested and maintained.
This plugin is used send data to Influxdb.
Example: to send, for each line of nginx log, a counter with value 1, key nginx.request
, on an influxdb instance located on port 8125.
Config using url: output://influxdb://localhost:8089?only_type=nginx&metric_type=counter&metric_key=nginx.request
Config using logstash format:
output {
if [type] == nginx {
influxdb {
database => mydatabase
host => localhost
port => 8089
protocol => udp
metric_type => counter
metric_key => nginx.request
}
}
}
Parameters:
interval
: reporting interval in ms. default: 1000database
: name of the influxdb database.host
: ip of the influxdb server.port
: port of the influxdb server.protocol
: protocol used to communicate with server, one of:udp
,http
,https
metric_type
: one ofhistogram
,meter
,counter
,timer
,gauge
. Type of value to send to Influxdb.metric_key
: key name to send to Influxdb.metric_value
: metric value to send to Influxdb. Mandatory fortimer
,counter
andgauge
type.cache_*
: cache configuration for resolvinghost
. More doc at cache.
metric_key
and metric_value
can reference log line properties (see interpolation).
Example: metric_key=nginx.response.#{status}