Crates.io | mqtt2influxdb |
lib.rs | mqtt2influxdb |
version | 0.1.2 |
source | src |
created_at | 2022-09-03 20:17:06.91932 |
updated_at | 2023-09-19 12:31:19.612657 |
description | CLI tool to push MQTT messages to InfluxDB2 |
homepage | https://github.com/Wassasin/mqtt2influxdb |
repository | https://github.com/Wassasin/mqtt2influxdb |
max_upload_size | |
id | 658034 |
size | 52,383 |
CLI tool to push MQTT messages to InfluxDB2.
$ ./mqtt2influxdb -h
mqtt2influxdb 0.1.0
CLI tool to push MQTT messages to InfluxDB2
USAGE:
mqtt2influxdb [OPTIONS] --influxdb-bucket <INFLUXDB_BUCKET> --influxdb-org <INFLUXDB_ORG> --influxdb-jwt <INFLUXDB_JWT> --config <CONFIG>
OPTIONS:
--config <CONFIG>
Path to the mapping configuration file used to translate MQTT messages to InfluxDB2
points [env: CONFIG=]
-h, --help
Print help information
--influxdb-bucket <INFLUXDB_BUCKET>
InfluxDB2 bucket to write all the data to [env: INFLUXDB_BUCKET=]
--influxdb-jwt <INFLUXDB_JWT>
InfluxDB2 secret token for the account to use [env: INFLUXDB_JWT=]
--influxdb-org <INFLUXDB_ORG>
InfluxDB2 organization for the database. [env: INFLUXDB_ORG=]
--influxdb-url <INFLUXDB_URL>
Url for the InfluxDB2 server to connect to [env: INFLUXDB_URL=] [default:
http://localhost:8086]
--mqtt-client-id <MQTT_CLIENT_ID>
Client ID used by this application to identify itself to the MQTT server [env:
MQTT_CLIENT_ID=] [default: mqtt2influxdb]
--mqtt-url <MQTT_URL>
Url for the MQTT server to connect to [env: MQTT_URL=] [default: mqtt://localhost]
-V, --version
Print version information
Can use both ENV variables and command line flags to configure the application, but I highly recommend not using the command line flag for --influxdb-jwt
because this will be available to any process running on the system. The mapping configuration is done exclusively using the configuration file pointed to by --config
.
For examples of configuration files check out the ./examples
folder in the repository.
If you want to contribute, these features are yet to be implemented or figured out:
/devicetype/<identifier>/temperature
to tag identifier=<identifier>
.