Commit Graph

17 Commits

Author SHA1 Message Date
dependabot[bot]
797d8de6d1 Bump github.com/expr-lang/expr from 1.16.9 to 1.17.7
Bumps [github.com/expr-lang/expr](https://github.com/expr-lang/expr) from 1.16.9 to 1.17.7.
- [Release notes](https://github.com/expr-lang/expr/releases)
- [Commits](https://github.com/expr-lang/expr/compare/v1.16.9...v1.17.7)

---
updated-dependencies:
- dependency-name: github.com/expr-lang/expr
  dependency-version: 1.17.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 22:35:28 +00:00
Christoph Petrausch
4674e6a17f Merge pull request #160 from hikhvar/dependabot/go_modules/golang.org/x/crypto-0.31.0
Bump golang.org/x/crypto from 0.0.0-20210616213533-5ff15b29337e to 0.31.0
2024-12-27 20:19:06 +01:00
dependabot[bot]
b9c15e86b6 Bump golang.org/x/crypto
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210616213533-5ff15b29337e to 0.31.0.
- [Commits](https://github.com/golang/crypto/commits/v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-27 19:05:54 +00:00
dependabot[bot]
e04788d0ef Bump google.golang.org/protobuf from 1.26.0-rc.1 to 1.33.0
Bumps google.golang.org/protobuf from 1.26.0-rc.1 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-27 19:05:53 +00:00
Jérôme LOYET
6ff26135b2 update expr to 1.16.9
- update minimal go version from 1.16 to 1.18 (like expr)
- update test from go 1.16 to 1.23
2024-12-27 08:39:41 +01:00
Christian Schneider
f380bea81d Support metrics from arithmetic expressions.
This change adds the new metric config option `expression` which can
define a complex expression to calculate the final metric value. The
expression is evaluated using github.com/antonmedv/expr as the engine,
see expr-lang.org/docs/v1.9/Language-Definition for a language overview.
In addition, some basic functions are available during evaluation: now,
int, float, round, ceil, floor, abs, min, max.

For each evaluation, the expression gets:
- the current MQTT value
- the last MQTT value
- the result of the last evaluation
- the elapsed time since the last evaluation

Expressions allow more flexibility to derive metrics from sensor inputs
which are very hard or even impossible to do in Prometheus, for example,
integrate continuous values over time, filter extreme or zero values, or
non-linear scaling. The last value, result, and timestamp are preserved
even between restarts of mqtt2prometheus. This means that expressions
can be used to produce continuous time series over a long time range.

To make upstream integration easier, the code depends on the rather old
v1.8.9 of github.com/antonmedv/expr, which is available in the main repo
of all supported Debian versions.
2024-03-25 10:15:05 +01:00
dependabot[bot]
d0d8a9935b Bump github.com/prometheus/client_golang from 1.11.0 to 1.11.1
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-15 03:14:58 +00:00
dependabot[bot]
52dfb5802c Bump github.com/prometheus/exporter-toolkit from 0.5.1 to 0.7.3
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.5.1 to 0.7.3.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.5.1...v0.7.3)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 22:26:24 +00:00
Michael Robbins
b1b53a6013 Bumping paho.mqtt.golang v1.3.4 => v1.3.5 2021-06-14 12:20:55 +10:00
Michael Robbins
c0fa66bf8f Bumping dependencies 2021-05-29 10:51:34 +10:00
Christoph Petrausch
48fb74e2df Upgraded procfs 2021-03-24 19:24:22 +01:00
Christoph Petrausch
1de4d0b3d0 Add experimental support for web-config-file
Fixes #55
2021-03-21 22:16:42 +01:00
Christoph Petrausch
24df81ed32 Add fuzzing 2021-02-14 20:47:41 +01:00
Christoph Petrausch
126e13428b Use go.uber.org/zap for logging
As mentioned in https://github.com/hikhvar/mqtt2prometheus/issues/23, we
do not use any logging framework at all. This was fine for getting the
exporter startet. However, with inreasing load the logging must be
configureable. This PR is a start to replace all instances of
"log.Printf" with the zap logger. The current configuration parameters
are the log level and the log format (console, json). We might expose
the log configuration to the config file. But I think this is overkill
for the current state of the exporter.
2020-10-29 20:58:28 +01:00
Christoph Petrausch
29eb9250f6 Moved to gojsonq to support nested paths 2020-07-18 18:03:49 +02:00
Christoph Petrausch
627c52669a Update hack config 2020-07-16 14:42:38 +02:00
Christoph Petrausch
1de13bc192 Migrate to go modules 2020-04-21 22:17:42 +02:00