You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/inputs/prometheus-scrape-metrics.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,29 @@ The initial release of the Prometheus Scrape metric allows you to collect metric
18
18
19
19
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.
20
20
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: '*'
21
37
```
38
+
39
+
{% endtab %}
40
+
41
+
{% tab title="fluent-bit.conf" %}
42
+
43
+
```text
22
44
[INPUT]
23
45
name prometheus_scrape
24
46
host 0.0.0.0
@@ -30,9 +52,11 @@ If an endpoint exposes Prometheus Metrics we can specify the configuration to sc
30
52
[OUTPUT]
31
53
name stdout
32
54
match *
33
-
34
55
```
35
56
57
+
{% endtab %}
58
+
{% endtabs %}
59
+
36
60
**Example Output**
37
61
38
62
```
@@ -78,4 +102,4 @@ If an endpoint exposes Prometheus Metrics we can specify the configuration to sc
0 commit comments