feat: filter metric value using regex#240
feat: filter metric value using regex#240raedtwj wants to merge 21 commits intoprometheus-community:masterfrom
Conversation
4266921 to
2fadfb1
Compare
rustycl0ck
left a comment
There was a problem hiding this comment.
Please add unit tests and update the documentation/configuration file example so that users can understand how this feature works and how to use it.
The implementation looks good to me. Thanks for the PR!
config/config.go
Outdated
| EpochTimestamp string | ||
| Help string | ||
| Values map[string]string | ||
| Regex string |
There was a problem hiding this comment.
| Regex string | |
| IncludeRegex string |
|
That feature would be very helpful, cause' it seems like there's no other way to convert string values like this |
|
@rustycl0ck Thanks for the PR! |
|
We have been using this feature for some time and it is very useful to us. It fully meets the expected requirements. We hope you can merge this request as soon as possible. This is really important for us. Thank you very much !!!!!! |
|
For example, using Gauge metrics to represent memory usage, number of connections, etc. Can convert string to float 1.52GB.
|
|
we cannot alter the source json. We cannot apply any transformation on the exporter's side. How are we supposed to extract any non-float data as a metric in order to plot it in grafana. We seriously need this feature or a similar solution. |
|
@SuperQ |
…theus-community#231) Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.42.0 to 0.44.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](prometheus/common@v0.42.0...v0.44.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.9.1 to 0.10.0. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md) - [Commits](prometheus/exporter-toolkit@v0.9.1...v0.10.0) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.1 to 0.27.2. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.27.1...v0.27.2) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
* [FEATURE] Allow timestamps from metrics prometheus-community#167 * [FEATURE] Support Value Conversions prometheus-community#172 Signed-off-by: SuperQ <superq@gmail.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: rustyclock <rustyclock@protonmail.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: eli_eli <771308671@qq.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: eli_eli <771308671@qq.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: eli_eli <771308671@qq.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: eli_eli <771308671@qq.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: eli_eli <771308671@qq.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: eli_eli <771308671@qq.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.2 to 0.28.1. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.27.2...v0.28.1) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
Signed-off-by: prombot <prometheus-team@googlegroups.com> Signed-off-by: raed altuwaijri <altuwaijriraed@gmail.com>
962da12 to
e7082f9
Compare
Signed-off-by: raedtwj <71555785+raedtwj@users.noreply.github.com>
Documentation and unit tests have been added, Special thanks to @eli-eli333 and @liubo20210831 |
this change let you filter metric values using regex
Ex config.yml
this config will be parsed
{"availableMemory": "1000 MB"}to
and won't throwing parse error since the suffix is not matched by the pattern