mqtt2influxdb
An opinionated and intentionally scope-limited MQTT to InfluxDB bridge.
[!NOTE]
This README is incomplete (tracked in #1).
tk orchestration, retries, etc
tk can't necessarily work with every message format can't necessarily work with weird key names or most nested structures doesn't support non-JSON
tk
tk
-env-files
-strict
-help
-version
note, strict overrides FIELDTAG_DETERMINATION_FAILURE
and CAST_FAILURE
tk
The timestamp for each InfluxDB point defaults to the time the message was processed.
If the message contains a top-level entry named at
, ts
, or time
, that value will be parsed and used as the timestamp.
tk
per The Open Group Base Specifications https://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html , any char other than NUL or =
is allowed in an env var name.
Influx disallows(ish) ( https://docs.influxdata.com/influxdb/v1/write_protocols/line_protocol_reference/#special-characters ): #, and the names time, _field, _measurement.
For sanity I also disallow ASCII control chars (character code 0-31). And I recommend you don't use periods (.) or mixed case as that could cause collisions.
lowercased except in env vars, when they're all uppercased.
tk
tk
MQTT_SERVER
MQTT_TOPIC
MQTT_USER
MQTT_PASS
MQTT_QOS
MQTT_CLIENT_ID
MQTT_CLEAN_START
MQTT_KEEP_ALIVE_S
MQTT_SESSION_EXPIRY_S
tk
INFLUX_SERVER
INFLUX_USER
INFLUX_PASS
INFLUX_BUCKET
INFLUX_MEASUREMENT_NAME
INFLUX_TIMEOUT_S
INFLUX_RETRIES
INFLUX_TAGS
tk
Typically, we auto TK
Format: M2I_<canonicalized-name>_ISA=<field|tag>
FIELDTAG_DETERMINATION_FAILURE
: ignore
, log
, or fatal
tk
Format: M2I_<canonicalized-field-name>_TYPE=<int|float|double|string|bool>
CAST_FAILURE
: ignore
, log
, or fatal
DEFAULT_NUMBERS_TO_FLOAT
: true
or false
tk
HEARTBEAT_GET_URL
HEARTBEAT_INTERVAL_S
HEARTBEAT_THRESHOLD_S
HEALTH_PORT
If a message contains a timestamp field, it must be a string and will be parsed as an RFC3339 timestamp.
[!NOTE]
Timestamps from an Apple platform formatted asNSISO8601DateFormatWithInternetDateTime
will be parsed correctly by this program.
In the future, multiple timestamp formats may be supported; see #3.
tk
This software is licensed under the LGPL-3.0 license. See LICENSE in this repo.
Chris Dzombak