-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Closed as not planned
Copy link
Description
Bug Report
Describe the bug
There is a discrepancy between the default value of the storage_metrics
setting in the code (flb_config.c#L280) and the official documentation. In the code, storage_metrics is set to FLB_TRUE by default, while the documentation states that the default value is Off.
To Reproduce
- Steps to reproduce the problem:
- Use the following config.
fluent-bit.yaml
service:
http_server: on
- Run fluent-bit 3.0.7
docker run --rm -it -p 2020:2020 -v $(pwd)/fluent-bit.yaml:/fluent-bit/etc/fluent-bit.yaml fluent/fluent-bit:3.0.7 -c /fluent-bit/etc/fluent-bit.yaml
- Fetch the metrics with curl, then the storage metrics are returned while
storage.metrics
is not set (the default value isOff
).
curl http://localhost:2020/api/v2/metrics/prometheus
# HELP fluentbit_uptime Number of seconds that Fluent Bit has been running.
# TYPE fluentbit_uptime counter
fluentbit_uptime{hostname="52da66687fce"} 14
# HELP fluentbit_process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE fluentbit_process_start_time_seconds gauge
fluentbit_process_start_time_seconds{hostname="52da66687fce"} 1719471663
# HELP fluentbit_build_info Build version information.
# TYPE fluentbit_build_info gauge
fluentbit_build_info{hostname="52da66687fce",version="3.0.7",os="linux"} 1719471663
# HELP fluentbit_hot_reloaded_times Collect the count of hot reloaded times.
# TYPE fluentbit_hot_reloaded_times gauge
fluentbit_hot_reloaded_times{hostname="52da66687fce"} 0
# HELP fluentbit_storage_chunks Total number of chunks in the storage layer.
# TYPE fluentbit_storage_chunks gauge
fluentbit_storage_chunks 0
# HELP fluentbit_storage_mem_chunks Total number of memory chunks.
# TYPE fluentbit_storage_mem_chunks gauge
fluentbit_storage_mem_chunks 0
# HELP fluentbit_storage_fs_chunks Total number of filesystem chunks.
# TYPE fluentbit_storage_fs_chunks gauge
fluentbit_storage_fs_chunks 0
# HELP fluentbit_storage_fs_chunks_up Total number of filesystem chunks up in memory.
# TYPE fluentbit_storage_fs_chunks_up gauge
fluentbit_storage_fs_chunks_up 0
# HELP fluentbit_storage_fs_chunks_down Total number of filesystem chunks down.
# TYPE fluentbit_storage_fs_chunks_down gauge
fluentbit_storage_fs_chunks_down 0
On the other hand, if I explicitly set storage.metrics
to Off
, the storage metrics will no longer exported.
service:
http_server: on
storage.metrics: Off
Expected behavior
If no value is set for storage.metrics
, it is expected that the storage metrics will not be exported, as stated in the documentation.
curl http://localhost:2020/api/v2/metrics/prometheus
# HELP fluentbit_uptime Number of seconds that Fluent Bit has been running.
# TYPE fluentbit_uptime counter
fluentbit_uptime{hostname="5f9da872910b"} 5
# HELP fluentbit_process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE fluentbit_process_start_time_seconds gauge
fluentbit_process_start_time_seconds{hostname="5f9da872910b"} 1719472051
# HELP fluentbit_build_info Build version information.
# TYPE fluentbit_build_info gauge
fluentbit_build_info{hostname="5f9da872910b",version="3.0.7",os="linux"} 1719472051
# HELP fluentbit_hot_reloaded_times Collect the count of hot reloaded times.
# TYPE fluentbit_hot_reloaded_times gauge
fluentbit_hot_reloaded_times{hostname="5f9da872910b"} 0
Screenshots
Your Environment
- Version used: 3.0.7
- Configuration:
service:
http_server: on
- Environment name and version (e.g. Kubernetes? What version?): Kubernetes 1.26.0, Podman Desktop
- Operating System and version: Rocky Linux 8.7 and Macos 14.5
- Filters and plugins: none (This problem can be reproduced without any filters and plugins)
Additional context