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

Help needed decoding nonjson topic #135

Open
RaceMouse-of-Denmark opened this issue Aug 5, 2023 · 2 comments
Open

Help needed decoding nonjson topic #135

RaceMouse-of-Denmark opened this issue Aug 5, 2023 · 2 comments

Comments

@RaceMouse-of-Denmark
Copy link

Hi,

I have this topic: RaceMow/wlan/rssi -63 which is not a json topic. Is it possible to decode this?
I'm subscribing to the topic RaceMow/# and would like to see a prom_name RSSI with the value -63. Is that at all possible with the latest version?
//Fink

@LeonidEfremov
Copy link

Same problem, no expected metrics output:

$ mosquitto_sub -h localhost -p 1883 -t /devices/yandex-weather/controls/temp     
10

my config:

mqtt:
  server: tcp:https://localhost:1883
  client_id: mqtt_exporter
  topic_path: /devices/+/controls/+
  metric_per_topic_config:
    metric_name_regex: ^\/devices\/(?P<deviceid>.*)\/controls\/(?P<metricname>.*)$
  qos: 0
cache:
  timeout: 24h
metrics:
  - prom_name: yandex_temp
    mqtt_name: temp
    type: gauge

only received_messages metric =(

$ curl https://localhost:9641/metrics -s | grep yandex
received_messages{status="success",topic="/devices/yandex-weather/controls/condition"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/feels_like"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/humidity"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/obs_time"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/pressure_mm"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/temp"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/wind_dir"} 1
received_messages{status="success",topic="/devices/yandex-weather/controls/wind_speed"} 1

it seems that non-json metrics does not work at all.

@LeonidEfremov
Copy link

@hikhvar, can you help with this issue?

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

No branches or pull requests

2 participants