chaperon v0.3.1 Chaperon.Export.InfluxDB View Source

InfluxDB metric export module.

Link to this section Summary

Functions

Returns a supervisable connection child_spec.

Returns the connection configuration.

Sends metrics of given session to InfluxDB in LoadTestMeasurement format.

Executes a query.

Executes a reading query.

Checks the status of a connection.

Determines the version of an InfluxDB host.

Executes a writing query.

Link to this section Functions

Returns a supervisable connection child_spec.

Callback implementation for Instream.Connection.child_spec/1.

Returns the connection configuration.

Callback implementation for Instream.Connection.config/1.

Link to this function

encode(session, opts \\ [])

View Source

Sends metrics of given session to InfluxDB in LoadTestMeasurement format.

Link to this function

encode_run(vals, action_name, opts)

View Source
Link to this function

encode_runs(runs, action_name, opts)

View Source
Link to this function

execute(query, opts \\ [])

View Source

Executes a query.

Passing [async: true] in the options always returns :ok. The command will be executed asynchronously.

Callback implementation for Instream.Connection.execute/2.

Link to this function

ping(host \\ nil, opts \\ [])

View Source

Pings a server.

By default the first server in your connection configuration will be pinged.

The server passed does not necessarily need to belong to your connection. Only the connection details (scheme, port, ...) will be used to determine the exact url to send the ping request to.

Callback implementation for Instream.Connection.ping/2.

Link to this function

query(query, opts \\ [])

View Source

Executes a reading query.

Options:

See Instream.Connection.execute/2 for additional generic options.

Callback implementation for Instream.Connection.query/2.

Checks the status of a connection.

Callback implementation for Instream.Connection.status/1.

Link to this function

status(host \\ nil, opts \\ [])

View Source
Link to this function

version(host \\ nil, opts \\ [])

View Source

Determines the version of an InfluxDB host.

The version will be retrieved using a :ping query and extract the returned X-Influxdb-Version header. If the header is missing the version will be returned as "unknown".

Callback implementation for Instream.Connection.version/2.

Link to this function

write(payload, opts \\ [])

View Source

Executes a writing query.

See Instream.Connection.execute/2 for additional generic options.

Callback implementation for Instream.Connection.write/2.