You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -241,15 +241,15 @@ metrics:
241
241
# A map of string to string for constant labels. This labels will be attached to every prometheus metric
242
242
const_labels:
243
243
sensor_type: ikea
244
+
# When specified, metric value to use if a value cannot be parsed (match cannot be found in the map above, invalid float parsing, expression fails, ...)
245
+
# If not specified, parsing error will occur.
246
+
error_value: 1
244
247
# When specified, enables mapping between string values to metric values.
245
248
string_value_mapping:
246
249
# A map of string to metric value.
247
250
map:
248
251
off: 0
249
252
low: 0
250
-
# Metric value to use if a match cannot be found in the map above.
251
-
# If not specified, parsing error will occur.
252
-
error_value: 1
253
253
# The name of the metric in prometheus
254
254
- prom_name: total_light_usage_seconds
255
255
# The name of the metric in a MQTT JSON message
@@ -265,15 +265,15 @@ metrics:
265
265
# A map of string to string for constant labels. This labels will be attached to every prometheus metric
266
266
const_labels:
267
267
sensor_type: ikea
268
+
# Metric value to use if a value cannot be parsed (match cannot be found in the map above, invalid float parsing, ...)
269
+
# If not specified, parsing error will occur.
270
+
error_value: 1
268
271
# When specified, enables mapping between string values to metric values.
269
272
string_value_mapping:
270
273
# A map of string to metric value.
271
274
map:
272
275
off: 0
273
276
low: 0
274
-
# Metric value to use if a match cannot be found in the map above.
275
-
# If not specified, parsing error will occur.
276
-
error_value: 1
277
277
# Sum up the time the light is on, see the section "Expressions" below.
returnConfig{}, fmt.Errorf("metric %s/%s: cannot set both string_value_mapping.error_value and error_value (string_value_mapping.error_value is deprecated).", m.MQTTName, m.PrometheusName)
243
+
}
244
+
logger.Warn("string_value_mapping.error_value is deprecated: please use error_value at the metric level.", zap.String("prometheusName", m.PrometheusName), zap.String("MQTTName", m.MQTTName))
0 commit comments