Graylog2 / Graylog2/graylog2-server

Some prometheus metrics are exported as the wrong type

Open
#11,461 2 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior

I recently upgraded from 4.0.11 to 4.1.6, and have started testing out the new Prometheus integration, but it looks like some of the metrics are exported as the wrong type, which makes querying the metrics a bit difficult.

## Current Behavior

So far I've noticed the following:

- `gl_input_throughput` is a gauge, but should be a counter
- `gl_output_throughput` is a gauge, but should be a counter

## Possible Solution

## Steps to Reproduce (for bugs)

1. Set up Graylog 4.1.6
2. Enable the Prometheus exporter with `prometheus_exporter_enabled = true`
3. `curl localhost:9833/metrics | grep gl_input_throughput`
4. Observe that the metric is a `gauge`, when it behaves like a `counter`.

## Context

I'm forwarding these to Datadog using Datadog's OpenTelemetry/Prometheus integration, and it uses the metric type as provided by the Prometheus output. It's possible to override this on the Datadog end, but it still behaves oddly, it'd be nice if the metrics were exported with the right type from the start.

## Your Environment

* Graylog Version: 4.1.6
* Java Version: Oracle Corporation 1.8.0_302
* Elasticsearch Version: 6.8
* MongoDB Version: 4.2
* Operating System: N/A
* Browser version: N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.