We try to feed metrics from worldwide distributed devices into Prometheus. To decouple the devices from the services (to avoid too many direct communications), there is a message broker and a Kafka bridge.
+----------------------------------+
| Device 1 |
| +---------------+ |
| | Application I |--+ |
| +---------------+ \ |
| | |
| +----------------+ | +------+ | +------+ +----------+ +--------------+
| | Application II |---+->| MQTT |-|---metrics--->| MQTT |---->| Kafka |------>| Prometheus |
| +----------------+ | +------+ | +------+ +----------+ +--------------+
| | |
| +-----------------+ / |
| | Application III |-+ |
| +-----------------+ |
+----------------------------------+
We struggle to figure out how to feed Prometheus from the Kafka bridge more or less directly. We could - of course - instantiate translation services per Application (Service) on each device, but this feels being overkill.
We didn't find any suggestion on https://prometheus.io/docs/instrumenting/exporters/ - but I think we ask the wrong questions.
Our first application is a collectd to measure some common system metrics. This is a reasonable data source since everyone knows what should be seen in Prometheus then.
The communication
+------+ +------+ +----------+
| MQTT |----Internet--->| MQTT |---->| Kafka |
+------+ +------+ +----------+
cannot reasonable opened up for particular messages, since each message shall receive Kafka.