/etc/wmbusmeters.conf
:
shell=/usr/bin/curl localhost:9144/webhook --data "$METER_JSON"
global:
config_version: 3
input:
type: webhook
webhook_path: /webhook
webhook_format: json_single
webhook_json_selector: .meter
metrics:
- type: gauge
name: water_consumption
help: Cubic meters of water used
match: 'multical21'
value: ''
cumulative: false
labels:
media: ''
id: ''
name: ''
server:
host: "[::]"
port: 9144
grok_exporter
docker-compose up -d
With: ``` version: ‘3’ services: grok_exporter: image: magentaaps/grok_exporter:latest-rc command: -config /srv/grok_exporter_config.yml ports:
Start wmbusmetersd
curl localhost:9144/metrics
Yields:
...
# HELP water_consumption Cubic meters of water used
# TYPE water_consumption gauge
water_consumption{id="11111111",media="cold water",name="MyColdTapWater"} 1.326
grok_exporter
as a scrape_target
to Prometheus
.