Skip to main content
Version: Next

InfluxDB

The InfluxDB output writes time-series data to InfluxDB 2.x using the Line Protocol. It maps columns to tags and fields, buffers writes in configurable batches, and retries failures with exponential backoff.

Configuration

FieldTypeRequiredDefaultDescription
typestringyesFixed value "influxdb"
urlstringyesInfluxDB server URL (e.g. http://localhost:8086).
orgstringyesOrganization name.
bucketstringyesDestination bucket.
tokenstringyesAuthentication token.
measurementstringyesMeasurement name.
tagsarray<object>noTag mappings (indexed fields).
fieldsarray<object>yesField mappings (value fields).
timestamp_fieldstringnoSource column for the point timestamp (nanoseconds). Defaults to current time.
batch_sizeintegerno1000Number of lines to buffer before flushing.
flush_intervalintegernoFlush interval in seconds.
retry_countintegerno3Number of retry attempts on failure.
timeout_msintegerno5000HTTP request timeout in milliseconds.

tags[]

FieldTypeRequiredDefaultDescription
fieldstringyesSource column name in the message batch.
tag_namestringyesTag name written to InfluxDB.

fields[]

FieldTypeRequiredDefaultDescription
fieldstringyesSource column name in the message batch.
field_namestringyesField name written to InfluxDB.
field_typestringnostringOne of float, integer, boolean, string.

Examples

Basic InfluxDB Output

output:
type: "influxdb"
url: "http://localhost:8086"
org: "my-org"
bucket: "sensor-data"
token: "${INFLUXDB_TOKEN}"
measurement: "temperature"
fields:
- field: "temp"
field_name: "value"
field_type: "float"

With Tags and Timestamp

output:
type: "influxdb"
url: "http://localhost:8086"
org: "production"
bucket: "metrics"
token: "${INFLUXDB_TOKEN}"
measurement: "system_metrics"
tags:
- field: "hostname"
tag_name: "host"
- field: "region"
tag_name: "region"
fields:
- field: "cpu_percent"
field_name: "cpu_usage"
field_type: "float"
- field: "memory_mb"
field_name: "memory_usage"
field_type: "integer"
- field: "status_message"
field_name: "status"
field_type: "string"
timestamp_field: "timestamp"

With Batching and Retry

output:
type: "influxdb"
url: "https://influxdb.example.com:8086"
org: "enterprise"
bucket: "telemetry"
token: "${INFLUXDB_TOKEN}"
measurement: "iot_readings"
tags:
- field: "device_type"
tag_name: "device_type"
fields:
- field: "temp"
field_name: "temperature"
field_type: "float"
- field: "battery"
field_name: "battery_level"
field_type: "integer"
timestamp_field: "event_time"
batch_size: 5000
flush_interval: 10
retry_count: 5
timeout_ms: 10000

Notes

  • Measurement, tag, and field identifiers are escaped per Line Protocol rules automatically.
  • When field_type is omitted it is treated as a string field.
  • Retries use exponential backoff starting at 100 ms.