|
|
2 лет назад | |
|---|---|---|
| .. | ||
| certs | 9fc586f670 test: add influx docker test certs | 3 лет назад |
| README.md | 24f476e35f test: add README to influxdb test script | 2 лет назад |
| docker-compose.yaml | fbfd4a2565 test: use EMQX_IMAGE_TAG for influx test script | 3 лет назад |
| emqx.conf | 7c1b453285 refactor: stop creating emqx-enterprise.conf | 2 лет назад |
| influx-bridge.conf | 99796224d8 refactor(resource): rename `request_timeout` -> `request_ttl` | 2 лет назад |
| start.sh | 424d6ed34b test: improve start.sh script for influxdb tests | 3 лет назад |
This script starts two EMQX nodes and a influxdb server in docker container. The bootstraping rule engine and data bridge config is provided in influx-bridge.conf which got included in the bootstraping config bundle emqx.conf.
./start.sh
The rule and bridge are configured to pipe data from MQTT topic t/# to the 'myvalues' measurement in the 'mqtt' bucket.
/t/a with a JSON object as MQTT paylaod like {"value": 1}curl -k -H 'Authorization: Token abcdefg' -G 'https://localhost:8086/query?pretty=true' --data-urlencode "db=mqtt" --data-urlencode "q=SELECT * from myvalues"Example output the curl query against influxdb:
{"results":[{"statement_id":0,"series":[{"name":"myvalues","columns":["time","clientid","value"],"values":[["2023-02-28T11:13:29.039Z","a1",123]]}]}]