InfluxDB

The InfluxDB destination writes data to an InfluxDB database.

When you configure the InfluxDB destination, you define connection information, the retention policy, and the fields to use as tags on points. If InfluxDB is set up on a cluster, you can also define the write consistency level.

You can use a UDP Source origin to read collectd messages, process the data, and then write the messages to InfluxDB in the collectd native format. If you use an origin that reads a different data format, you must map the records to points in the InfluxDB database.

Configuring an InfluxDB Destination

Configure an InfluxDB destination to write data to an InfluxDB database.
  1. In the Properties panel, on the General tab, configure the following properties:
    General Property Description
    Name Stage name.
    Description Optional description.
    Required Fields Fields that must include data for the record to be passed into the stage.
    Tip: You might include fields that the stage uses.

    Records that do not include all required fields are processed based on the error handling configured for the pipeline.

    Preconditions Conditions that must evaluate to TRUE to allow a record to enter the stage for processing. Click Add to create additional preconditions.

    Records that do not meet all preconditions are processed based on the error handling configured for the stage.

    On Record Error Error record handling for the stage:
    • Discard - Discards the record.
    • Send to Error - Sends the record to the pipeline for error handling.
    • Stop Pipeline - Stops the pipeline. Not valid for cluster pipelines.
  2. On the InfluxDB tab, configure the following properties:
    InfluxDB Property Description
    URL URL to the InfluxDB HTTP API.
    Username Username to access the InfluxDB database.

    If InfluxDB authentication is disabled, enter any value.

    Password Password to access the InfluxDB database.

    If InfluxDB authentication is disabled, enter any value.

    Tip: To secure sensitive information such as usernames and passwords, you can use runtime resources or Hashicorp Vault secrets. For more information, see Using Runtime Resources or Accessing Hashicorp Vault Secrets.
    Database Name Name of the InfluxDB database.
    Auto-create Database Specifies whether to create the database in InfluxDB. Select if the named database does not exist.
    Retention Policy Name of the retention policy created for the database.

    If you don't enter a value, Data Collector uses the default retention policy.

    Consistency Level

    Write consistency level to use when InfluxDB is set up on a cluster. Select one of the following options: any, one, quorum, or all.

    For more information about the write consistency level, see the InfluxDB documentation.

    Record Mapping Map records to points in the InfluxDB database. Select one of the following options:
    • collectd - Select if using the UDP Source origin to read collectd data. InfluxDB accepts data written in the collectd native format.
    • Custom Mappings - Select if the origin reads another data format. You then map specific fields in the records to the measurement, timestamp, and key-value fields on points.
    Measurement Field If configuring a custom mapping, field to map to the measurement on a point.
    Time Field If configuring a custom mapping, field to map to the timestamp on a point.
    Time Unit If configuring a custom mapping, field to map to the timestamp unit on a point.
    Value Fields If configuring a custom mapping, fields to map to key-value fields on a point.
    Tag Fields Fields to use as tags on a point.