Eerste versie
This commit is contained in:
22
tests/test_data/test_counter_absolute/conf.yaml
Normal file
22
tests/test_data/test_counter_absolute/conf.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# Logging
|
||||
logging:
|
||||
# logfile: 'conf/mqttexperter.log' # Optional default '' (stdout)
|
||||
level: 'debug' # Optional default 'info'
|
||||
|
||||
timescale: 0
|
||||
|
||||
# Metric definitions
|
||||
metrics:
|
||||
- name: "fhem_rain_mm"
|
||||
help: "443 Mhz Sensors, rain in mm/m2"
|
||||
type: "counter_absolute"
|
||||
topic: "fhem/+/+/rain_total"
|
||||
label_configs:
|
||||
- source_labels: ['__msg_topic__']
|
||||
target_label: '__topic__'
|
||||
- source_labels: ["__msg_topic__"]
|
||||
regex: "fhem/([^/]+).*"
|
||||
target_label: "location"
|
||||
replacement: '\1'
|
||||
action: "replace"
|
13
tests/test_data/test_counter_absolute/mqtt_msg.csv
Normal file
13
tests/test_data/test_counter_absolute/mqtt_msg.csv
Normal file
@@ -0,0 +1,13 @@
|
||||
in_topic;in_payload;out_name;out_labels;out_value;delay;assert
|
||||
fhem/Garten/rainmeter01/rain_total;4.8;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};4.8;4;True
|
||||
fhem/Garten/rainmeter01/rain_total;11.1;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};11.1;3;True
|
||||
fhem/Garten/rainmeter01/rain_total;110;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};110;5;True
|
||||
fhem/Garten/rainmeter01/rain_total;134.8;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};134.8;4;True
|
||||
fhem/Garten/rainmeter01/rain_total;211.1;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};211.1;3;True
|
||||
fhem/Garten/rainmeter01/rain_total;155.9;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};155.9;5;True
|
||||
fhem/Garten/rainmeter01/rain_total;2134.8;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};2134.8;4;True
|
||||
fhem/Garten/rainmeter01/rain_total;11.1;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};11.1;3;True
|
||||
fhem/Garten/rainmeter01/rain_total;155.9;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};155.9;5;True
|
||||
fhem/Garten/rainmeter01/rain_total;23134.8;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};23134.8;4;True
|
||||
fhem/Garten/rainmeter01/rain_total;1233123.123123123123;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};1233123.123123123123;3;True
|
||||
fhem/Garten/rainmeter01/rain_total;1233123.123123123124;fhem_rain_mm;{"location":"Garten","topic": "fhem/Garten/rainmeter01/rain_total"};1233123.123123123124;5;True
|
Can't render this file because it contains an unexpected character in line 2 and column 54.
|
Reference in New Issue
Block a user