riemann.influxdb2

Forwards events to InfluxDB v2.

convert-time

(convert-time time-event precision)

create-client

(create-client {:keys [organization bucket scheme host port token], :as opts})

Returns a com.influxdb.client.InfluxDBClient instance.

default-opts

Default InfluxDB options

event->point

(event->point event opts)

Returns a com.influxdb.client.write.Point instance.

event->points

(event->points events opts)

get-time-unit

(get-time-unit precision)

influxdb2

(influxdb2 opts)

Returns a function which accepts an event, or sequence of events, and writes them to InfluxDB as a batch of measurement points. For performance, you should wrap this stream with batch or an asynchronous queue.

Support InfluxDB 2.x and InfluxDB 1.8+.

(def influxdb2-forwarder
  (batch 100 1/10
    (influxdb2 {:host "influxdb.example.com"
                :organization "riemann"
                :bucket "riemann"
                :token "riemann"})))

General Options:

  • :organization Name of the organization to write to. (default: "riemann")
  • :bucket Name of the bucket to write to. (default: "riemann")
  • :scheme URL scheme for endpoint. (default: "http")
  • :host Hostname to write points to. (default: "localhost")
  • :port Port number. (default: 8086)
  • :token Auth token to use to write data. (default: "riemann")
  • :precision The time precision. Possibles values are :seconds, :milliseconds and :microseconds and :nanoseconds (default :seconds).

post-data

(post-data connection data)

Post datapoint to InfluxDB endpoint.