Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shirou/mqforward
MQTT to influxdb forwarder
https://github.com/shirou/mqforward
Last synced: 13 days ago
JSON representation
MQTT to influxdb forwarder
- Host: GitHub
- URL: https://github.com/shirou/mqforward
- Owner: shirou
- License: mit
- Created: 2014-11-18T05:48:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-11T00:55:48.000Z (5 months ago)
- Last Synced: 2024-10-14T17:41:22.962Z (25 days ago)
- Language: Go
- Size: 103 KB
- Stars: 75
- Watchers: 9
- Forks: 24
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-influxdb - mqforward - [MQTT](http://mqtt.org/) to influxdb forwarder (Collecting data into InfluxDB / Projects)
README
mqforward
=====================mqforward is forwarder from MQTT to Influxdb.
This subscribes a topic with wildcard and forward a payload to
Influxdb. The value should be JSON or msgpack.for example,
- Publish ``{"a": 1, "b": 2}`` to "mqforward/a/b",
- Subscribe "mqforward/#",in the influxdb,
- value ``a=1 and b=2`` into the a.b series. so you can ``SELECT a, b FROM "a.b"``
If udp is true in the config, send series over UDP to InfluxDB. otherwise, use HTTP.
usage
---------install
+++++++++++++++Just `go get` (it takes for a while)
::
$ go get github.com/shirou/mqforward
then, type
::
$ go install github.com/shirou/mqforward
config
+++++++++++++++Config example is below. If you put config to `~/.mqforward.ini`, it will be loaded automatically.
::
[mqforward-mqtt]
hostname= localhost
port = 1883
username= ""
password= ""
topic = mqforward/#[mqforward-influxdb]
# url = https://127.0.01/subpath
hostname = 127.0.0.1
scheme = http # or https
port = 4444
db = test
username = root
password = root
caCerts = ~/.certs/cacert.pem # can be empty
insecure = true # if certificates are not checked
series = weather
topicMap = mqforward/{location}/{sensor} # creates tags 'location' and 'sensor' from topic path
run
+++++++++++++++Set path to $GOPATH/bin,
::
$ mqforward run
or
::
mqforward run -c someconfig.ini
license
-----------MIT