Open vielmetti opened 4 years ago
Time to review https://github.com/SweBarre/mqtt2prom
Prometheus data looks like
# HELP sensor_temperature_celsius Temperature in celsius
# TYPE sensor_temperature_celsius gauge
sensor_temperature_celsius{instance="computer_room",job="zigbee",sensorid="computer_room"} 19.8
sensor_temperature_celsius{instance="kitchen",job="rfxcom",sensorid="kitchen"} 21.8
sensor_temperature_celsius{instance="laundry",job="zigbee",sensorid="laundry"} 19.84
sensor_temperature_celsius{instance="outside",job="rfxcom",sensorid="backside"} 5.9
which in my model would map to
temp.kitchen.rfxcom: 21.8
temp.laundry.zigbee: 19.84
temp.computer_room.zigbee: 19.8
temp.outside.rfxcom: 5.9
NATS has a fairly flexible naming scheme for channels. Think about how to name things.
My first pass at a naming was to put the temperature from the qwiic sensor at
There's more than one way to do it. Do I anticipate the need for more than a 3-level hierarchy? Should the data be self-describing, with a JSON object?
Review this when I have 10 sensors reporting.