This is the MQTT tutorial, showing how to publish the data to the MQTT broker.
You can do the subsequent step ( Telegraf -> InfluxDB -> Grafana) by yourself.
There are some similar tutorials (integrate into the Home assistant by MQTT)
The JSON format in MQTT mode is the same with the other ways(tls,tcp,HTTP,https),
please refer to