kpetremann / mqtt-exporter

Simple generic MQTT Prometheus exporter for IoT working out of the box
https://hub.docker.com/r/kpetrem/mqtt-exporter
MIT License
108 stars 30 forks source link

main: match ignored topics with fnmatch instead of equality #19

Closed roobre closed 2 years ago

roobre commented 2 years ago

This PR allows to define topics to ignore using wildcards (*, ?) rather than requiring an exact match. This patch should be backwards-compatible as exact match should still happen if there are no wildcards present.

A single * will match across / separators: *excludeme* will exclude foo/excludeme/bar.

As a side note, I have fixed the env var being documented with an incorrect name in README.md.

kpetremann commented 2 years ago

thanks for the PR