Skip to content

Commit d6506c4

Browse files
authored
Merge pull request #1821 from fluent/lynettemiles/sc-136197/update-fluent-bit-docs-pipeline-inputs-prometheus
2 parents a590495 + 761a2d3 commit d6506c4

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

pipeline/inputs/prometheus-scrape-metrics.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
# Prometheus Scrape Metrics
1+
# Prometheus Scrape metrics
22

3-
Fluent Bit 1.9 includes additional metrics features to allow you to collect both logs and metrics with the same collector. 
3+
Fluent Bit 1.9 and later includes additional metrics features to let you collect logs and metrics from a Prometheus-based endpoint at a set interval. These metrics can be routed to metric supported endpoints such as [Prometheus Exporter](../outputs/prometheus-exporter.md), [InfluxDB](../outputs/influxdb.md) or [Prometheus Remote Write](../outputs/prometheus-remote-write.md).
44

5-
The initial release of the Prometheus Scrape metric allows you to collect metrics from a Prometheus-based endpoint at a set interval. These metrics can be routed to metric supported endpoints such as [Prometheus Exporter](../outputs/prometheus-exporter.md), [InfluxDB](../outputs/influxdb.md), or [Prometheus Remote Write](../outputs/prometheus-remote-write.md)
5+
## Configuration
66

7-
## Configuration <a href="#configuration" id="configuration"></a>
8-
9-
| Key | Description | Default |
10-
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
11-
| host | The host of the prometheus metric endpoint that you want to scrape | |
12-
| port | The port of the prometheus metric endpoint that you want to scrape | |
13-
| scrape\_interval | The interval to scrape metrics | 10s |
14-
| metrics\_path | <p>The metrics URI endpoint, that must start with a forward slash.<br><br>Note: Parameters can also be added to the path by using <code>?</code></p> | /metrics |
15-
| threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
7+
| Key | Description | Default |
8+
| --- | ----------- | -------- |
9+
| `host` | The host of the Prometheus metric endpoint to scrape. | _none_ |
10+
| `port` | The port of the Prometheus metric endpoint to scrape. | _none_ |
11+
| `scrape_interval` | The interval to scrape metrics. | `10s` |
12+
| `metrics_path` | The metrics URI endpoint, which must start with a forward slash (`/`). Parameters can be added to the path by using `?` | `/metrics` |
13+
| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
1614

1715
## Example
1816

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.
17+
If an endpoint exposes Prometheus Metrics you can specify the configuration to scrape and then output the metrics. The following example retrieves metrics from the HashiCorp Vault application.
2018

2119
{% tabs %}
2220
{% tab title="fluent-bit.yaml" %}
@@ -30,7 +28,7 @@ pipeline:
3028
tag: vault
3129
metrics_path: /v1/sys/metrics?format=prometheus
3230
scrape_interval: 10s
33-
31+
3432
outputs:
3533
- name: stdout
3634
match: '*'
@@ -57,9 +55,9 @@ pipeline:
5755
{% endtab %}
5856
{% endtabs %}
5957

60-
**Example Output**
58+
This returns output similar to:
6159

62-
```
60+
```text
6361
2022-03-26T23:01:29.836663788Z go_memstats_alloc_bytes_total = 31891336
6462
2022-03-26T23:01:29.836663788Z go_memstats_frees_total = 313264
6563
2022-03-26T23:01:29.836663788Z go_memstats_lookups_total = 0
@@ -102,4 +100,4 @@ pipeline:
102100
2022-03-26T23:01:29.836663788Z vault_runtime_sys_bytes = 24724488
103101
2022-03-26T23:01:29.836663788Z vault_runtime_total_gc_pause_ns = 1917611
104102
2022-03-26T23:01:29.836663788Z vault_runtime_total_gc_runs = 19
105-
```
103+
```

0 commit comments

Comments
 (0)