fluent / fluent/fluent-bit

Prometheus scrape is not generating any internal fluentbit metric

Open
#11,633 0 comments 0 reactions 0 assignees View on GitHub
status: waiting-for-triage
Dominant language
C
Stars
8.1k
Forks
2k
Avg merge
4d 16h
Merged PRs (30d)
58

Description

## Bug Report

**Describe the bug**
Prometheus_scrape report (almost) every fluentbit metric with 0.

**To Reproduce**
If you configure an exporter, configure Fluent Bit to use the prometheus_scrape input to read it, and enable the http server configuration, you cannot see any metrics querying the prometheus endpoint.

```
curl -s localhost:2020/api/v2/metrics/prometheus | grep input
# HELP fluentbit_input_bytes_total Number of input bytes.
# TYPE fluentbit_input_bytes_total counter
fluentbit_input_bytes_total{name="http.0"} 619
fluentbit_input_bytes_total{name="syslog.1"} 4603299
fluentbit_input_bytes_total{name="syslog.2"} 3955500
fluentbit_input_bytes_total{name="http.3"} 106697067
fluentbit_input_bytes_total{name="prometheus_scrape.4"} 0 <---- Everything is 0, while it shouldn't be 0
fluentbit_input_bytes_total{name="prometheus_scrape.5"} 0
fluentbit_input_bytes_total{name="prometheus_scrape.6"} 0
fluentbit_input_bytes_total{name="prometheus_scrape.7"} 0
```

**Expected behavior**
It would be nice to report these metrics. Apart having these metrics, it would be nice to have a separate metric to track errors in the input (to track misbehaving exporters).

**Your Environment**
* Version used: 5.0.0-dev
* Operating System and version: Almalinux 9
* Filters and plugins: prometheus_scrape

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.