Skip to content

Commit d3f0c96

Browse files
authored
Adding YAML example to prometheus scrape metrics doc. (#1748)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent ea27e26 commit d3f0c96

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

pipeline/inputs/prometheus-scrape-metrics.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,29 @@ The initial release of the Prometheus Scrape metric allows you to collect metric
1818

1919
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.
2020

21+
{% tabs %}
22+
{% tab title="fluent-bit.yaml" %}
23+
24+
```yaml
25+
pipeline:
26+
inputs:
27+
- name: prometheus_scrape
28+
host: 0.0.0.0
29+
port: 8201
30+
tag: vault
31+
metrics_path: /v1/sys/metrics?format=prometheus
32+
scrape_interval: 10s
33+
34+
outputs:
35+
- name: stdout
36+
match: '*'
2137
```
38+
39+
{% endtab %}
40+
41+
{% tab title="fluent-bit.conf" %}
42+
43+
```text
2244
[INPUT]
2345
name prometheus_scrape
2446
host 0.0.0.0
@@ -30,9 +52,11 @@ If an endpoint exposes Prometheus Metrics we can specify the configuration to sc
3052
[OUTPUT]
3153
name stdout
3254
match *
33-
3455
```
3556

57+
{% endtab %}
58+
{% endtabs %}
59+
3660
**Example Output**
3761

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

0 commit comments

Comments
 (0)