Closed byjosez closed 6 months ago
Hi @byjosez,
At first look, I think you are using the wrong port. If your Prometheus instance is also in a container, then mqtt-exporter is receiving the request from internal Docker network bridge, so you should use the port 9000 on which mqtt-exporter is actually listening on.
The port 9001 being for requests from outside your Docker environment, like doing a curl from the host or your computer.
I hope it helps.
Hi @byjosez,
At first look, I think you are using the wrong port. If your Prometheus instance is also in a container, then mqtt-exporter is receiving the request from internal Docker network bridge, so you should use the port 9000 on which mqtt-exporter is actually listening on.
The port 9001 being for requests from outside your Docker environment, like doing a curl from the host or your computer.
I hope it helps.
Yes, I changed the port to 9000 and I get those metrics that I published last in the post, is that really what I should export? I don't see the data that I published when I run
mosquitto_sub -h 192.168.105.112 -p 1883 -v -t '#'
You don't have metrics because it is not following the format used by mqtt-exporter by default. I don't know about solar assistant, but it seems the metrics are very similar to ESPhome.
Maybe try to enable ESPhome compatibility: https://github.com/kpetremann/mqtt-exporter?tab=readme-ov-file#esphome
You would just need to add the following environment variable: ESPHOME_TOPIC_PREFIXES="solar_assistant"
You don't have metrics because it is not following the format used by mqtt-exporter by default. I don't know about solar assistant, but it seems the metrics are very similar to ESPhome.
Maybe try to enable ESPhome compatibility: https://github.com/kpetremann/mqtt-exporter?tab=readme-ov-file#esphome
You would just need to add the following environment variable:
ESPHOME_TOPIC_PREFIXES="solar_assistant"
It doesn't work, I had to use node-red to then export it to influxdb and show it in grafana, thank you very much for your time bro.
Hello, it is not an error that I am reporting but, I cannot get mqtt-exporter to extract the metrics from my mqtt server hosted on a raspberry that is reachable locally, I do not see errors in the log, I execute through the console
But when I try to do it through mqtt-exporter I can't get anything. I hope you can help me.
I will attach the configuration of how it is being done.
Change the default port since I use portainer and it publishes on port 9000, now I get this: