Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional configurable MQTT json key:value to support influxdb database selection #303

Closed
hansij66 opened this issue Jan 18, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@hansij66
Copy link

Is your feature request related to a problem? Please describe.
No - this is a feature request

I am using EMS-ESP in conjunction with Telegraf and influxdb to store selected data from EMS-ESP.
I have multiple MQTT sources (eg, weather, lights, smart meter,...), and I would like to store their data in specific influxdb databases (unique per MQTT source)

Snippet from telegraf configuration:

[[outputs.influxdb]]
  database = "telegraf" 
  database_tag = "database"

Telegraf selects (in above config example) the influxdb database based on the MQTT json key:value "database". For MQTT sources under my control, this works, I add eg a database:weather key:value.
For MQTT sources (like EMS-ESP, all data ends up in one influxdb database "telegraf"
I have not been able to find other ways in telegraf to specify a influxdb per [[inputs.mqtt_consumer]]

I do realize that this is scope creep beyond the original intend of EMS-ESP, and understand if it is not implemented.

Cheers,
Hans

@hansij66 hansij66 added the enhancement New feature or request label Jan 18, 2022
@proddy
Copy link
Contributor

proddy commented Jan 18, 2022

Hi Hans, that's pretty hardcore! A few users have Home Assistant feeding the EMS-ESP data directly into InfluxDB and then using Grafana or Chronograf to see visually or run queries against the timeline. It's something that can setup in minutes. Haven't heard of anyone using Telegraf though. One method could be to create a script to poll the data from the REST APIs using the Telegraf HTTP plugin and avoiding MQTT all together?

On your specific request, how would it work exactly? Like where would this key:value json object be part of? A separate payload?

@hansij66
Copy link
Author

hansij66 commented Jan 18, 2022 via email

@hansij66
Copy link
Author

I found the proper way to configure this in telegraf.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants