fluent / fluent/fluent-plugin-prometheus

Prometheus gauge

Open
#154 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
257
Forks
83
Avg merge
1d 16h
Merged PRs (30d)
7

Description

Hi!

I'm trying to add a gauge with a constant value in order to see what helm configuration is deployed.
It's an idea that's similar to #40 but just related to my current config release.

After seeing the code https://github.com/fluent/fluent-plugin-prometheus/blob/master/lib/fluent/plugin/prometheus.rb#L197-L207

I think it should be possible to do something like this:
```
# Add constant key in order to be able to use a gauge

@type record_transformer

helm_release {{ .Release.Revision }}

@type prometheus

name fluentd_last_sent
type gauge
key "helm_release"
desc Use for debugging purposes

helm_release_name {{ .Release.Name }}
helm_release_version {{ .Release.Revision }}

```

If I output the record, I can see that the helm_release key is present, but right now if i query the metrics endpoint. I'm not seeing anything:

![image](https://user-images.githubusercontent.com/50414615/81539868-22a44580-9371-11ea-8bde-b27f374def60.png)

Am I missing something on the config?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.