Get mac id or device id(iot) from mqtt exporter prometheus

12 views
Skip to first unread message

Amit Das

unread,
Jan 16, 2021, 9:55:59 AM1/16/21
to Prometheus Users
Hi,

I am trying get mac id of a iot device with mqtt installed its sending the mac id of the devices(ex 100 devices each unique). In my prometheus mqtt metrics i dont see the mac id or instance ip. I would like to get the iot devices mac it which it is sending when i view from mqtt explorer UI tool. Is there any specific config i need to add in my prometheus .yml?

Thanks,

Julius Volz

unread,
Jan 17, 2021, 4:25:38 AM1/17/21
to Amit Das, Prometheus Users
Hi,

I'm not too familiar with mqtt, but your monitoring chain seems to be:

device --(push)--> mosquitto-exporter <--(pull)-- Prometheus

Prometheus would have no way of knowing or attaching the MAC address of the initial pushing devices, so it's at least not a Prometheus configuration question. If this is possible at all, it would have to happen in the device->mosquitto-exporter part of the chain, in such a way that each device includes the MAC address in its push to the exporter, and the exporter then exposes the MAC address as a label in the resulting Prometheus metrics. But I know nothing about mqtt or the mosquitto-exporter, so can't answer that part.

Julius

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d4ddd906-0c89-4130-99f2-6627386fc1f4n%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com
Reply all
Reply to author
Forward
0 new messages