Skip to content

Adding YAML example to prometheus scrape metrics doc. Updates #1732. #1748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions pipeline/inputs/prometheus-scrape-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,29 @@ The initial release of the Prometheus Scrape metric allows you to collect metric

If an endpoint exposes Prometheus Metrics we can specify the configuration to scrape and then output the metrics. In the following example, we retrieve metrics from the HashiCorp Vault application.

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
inputs:
- name: prometheus_scrape
host: 0.0.0.0
port: 8201
tag: vault
metrics_path: /v1/sys/metrics?format=prometheus
scrape_interval: 10s

outputs:
- name: stdout
match: '*'
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```text
[INPUT]
name prometheus_scrape
host 0.0.0.0
Expand All @@ -30,9 +52,11 @@ If an endpoint exposes Prometheus Metrics we can specify the configuration to sc
[OUTPUT]
name stdout
match *

```

{% endtab %}
{% endtabs %}

**Example Output**

```
Expand Down Expand Up @@ -78,4 +102,4 @@ If an endpoint exposes Prometheus Metrics we can specify the configuration to sc
2022-03-26T23:01:29.836663788Z vault_runtime_sys_bytes = 24724488
2022-03-26T23:01:29.836663788Z vault_runtime_total_gc_pause_ns = 1917611
2022-03-26T23:01:29.836663788Z vault_runtime_total_gc_runs = 19
```
```