EMQ X integration to InfluxDB #5015
Replies: 5 comments 2 replies
-
Hi @timhallinflux |
Beta Was this translation helpful? Give feedback.
-
Yes, for now. We are working on a native MQTT ingestion mechanism where you would configure InfluxDB Cloud to listen to the MQTT broker. That is planned for 2H21. If you wanted to leverage Telegraf (our distributed agent which is open source), you could embed those bits into EMQ X and simply use your configuration approach to pull from the MQTT broker and then configure the appropriate InfluxDB output. Happy to explain this approach in more detail... if you wish. |
Beta Was this translation helpful? Give feedback.
-
sorry for the delayed reply. converting this thread to a discussion. |
Beta Was this translation helpful? Give feedback.
-
We use EMQ X Webhook to persist data to the Influxdb Cloud: Create BucketAfter logging in to the influxDB's console, go to Generate TokenGo back to Create EMQ X Webhook ResourceResource url: https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/write Create EMQ X Rule SQLIn this example we demonstrate how to store temperature and humidity sensor data to the influxdb cloud. SELECT
payload.location as location,
payload.temp as temp,
payload.hum as hum
FROM
"emqx/test" Add Rule ActionAdd Request ParametersNeed to change
Add Request HeadersAuthorization needs to be modified. Authorization is the token generated by Influxdb Cloud
Add Request Body
Publish temperature and humidity dataView EMQ X Rule MatchedView data in Influxdb Cloud |
Beta Was this translation helpful? Give feedback.
-
super! Looks like it is all working. Perhaps the documentation needs to be updated to reflect this approach? |
Beta Was this translation helpful? Give feedback.
-
The current integration approach between EMQ X and InfluxDB is based on two things:
InfluxDB OSS v1.x supports both of these. However, InfluxDB Cloud does not support either. InfluxDB OSS v2 has been released since November and also does not support UDP or JSON formatted messages.
Ideally, we could work together to upgrade the integration to leverage an HTTP-based integration between EMQ X which would allow for users to use either InfluxDB OSS v2 or InfluxDB Cloud.
Beta Was this translation helpful? Give feedback.
All reactions