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
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -375,7 +375,7 @@ During the evaluation, the following variables are available to the expression:
375
375
* `last_result` - the result from the previous expression evaluation (a float for `raw_expression`/`expression`, a string for `dynamic_labels`)
376
376
* `elapsed` - the time that passed since the previous evaluation, as a [Duration](https://pkg.go.dev/time#Duration) value
377
377
378
-
The [language definition](https://expr-lang.org/docs/v1.9/Language-Definition) describes the expression syntax. In addition, the following functions are available:
378
+
The [language definition](https://expr-lang.org/docs/language-definition) describes the expression syntax. In addition, the following functions are available:
379
379
* `now()` - the current time as a [Time](https://pkg.go.dev/time#Time) value
380
380
* `int(x)` - convert `x` to an integer value
381
381
* `float(x)` - convert `x` to a floating point value
@@ -400,6 +400,14 @@ If `raw_expression` is set, the generated value of the expression is exported to
400
400
1. If `force_monotonicy` is set to `true`, any new value that is smaller than the previous one is considered to be a counter reset. When a reset is detected, the previous value becomes the value offset which is automatically added to each consecutive value. The offset is persistet between restarts of mqtt2prometheus.
401
401
1. If `mqtt_value_scale` is set to a non-zero value, it is applied to the the value to yield the final metric value.
402
402
403
+
#### Expressions in docker environment
404
+
405
+
With expressions enabled the exporter will persist the conversion into /var/lib/mqtt2prometheus. This directory needs to be writable for the user. One solution is to use `--tmpfs /var/lib/mqtt2prometheus:uid=65532,gid=65532,mode=700` in your docker command or to add to docker-compose.yml
0 commit comments