Skip to content

Commit 91a1ce5

Browse files
committed
Fixed code indents for examples and table formatting in Windows Exporter Metrics input plugin. Part of issue #1954.
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 7626d65 commit 91a1ce5

File tree

1 file changed

+87
-52
lines changed

1 file changed

+87
-52
lines changed

pipeline/inputs/windows-exporter-metrics.md

Lines changed: 87 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,53 @@ Metrics collected with Windows Exporter metrics flow through a separate pipeline
1212

1313
## Configuration
1414

15-
| Key | Description | Default |
16-
| --------------- | ---------------------------------------------------------------------- | --------- |
17-
| `scrape_interval` | The rate at which metrics are collected. | `5 seconds` |
18-
| `we.logical_disk.allow_disk_regex` | Specify the regular expression for logical disk metrics to allow collection of. | `"/.+/"` (all) |
19-
| `we.logical_disk.deny_disk_regex` | Specify the regular expression for logical disk metrics to prevent collection of or ignore. | `NULL` (all) |
20-
| `we.net.allow_nic_regex` | Specify the regular expression for network metrics captured by the name of the NIC. | `"/.+/"` (all) |
21-
| `we.service.where` | Specify the `WHERE` clause for retrieving service metrics. | `NULL` |
22-
| `we.service.include` | Specify the key value pairs for the include condition for the `WHERE` clause of service metrics. | `NULL` |
23-
| `we.service.exclude` | Specify the key value pairs for the exclude condition for the `WHERE` clause of service metrics. | `NULL` |
24-
| `we.process.allow_process_regex` | Specify the regular expression covering the process metrics to collect. | `"/.+/"` (all) |
25-
| `we.process.deny_process_regex` | Specify the regular expression for process metrics to prevent collection of or ignore. | `NULL` (all) |
26-
| `collector.cpu.scrape_interval` | The rate in seconds at which `cpu` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
27-
| `collector.net.scrape_interval` | The rate in seconds at which `net` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
28-
| `collector.logical_disk.scrape_interval` | The rate in seconds at which `logical_disk` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
29-
| `collector.cs.scrape_interval` | The rate in seconds at which `cs` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
30-
| `collector.os.scrape_interval`| The rate in seconds at which `os` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
31-
| `collector.thermalzone.scrape_interval`| The rate in seconds at which `thermalzone` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
32-
| `collector.cpu_info.scrape_interval`| The rate in seconds at which `cpu_info` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
33-
| `collector.logon.scrape_interval` | The rate in seconds at which `logon` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
34-
| `collector.system.scrape_interval` | The rate in seconds at which `system` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
35-
| `collector.service.scrape_interval` | The rate in seconds at which `service` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
36-
| `collector.memory.scrape_interval` | The rate in seconds at which `memory` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
37-
| `collector.paging_file.scrape_interval` | The rate in seconds at which `paging_file` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
38-
| `collector.process.scrape_interval` | The rate in seconds at which `process` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
39-
| `metrics` | Specify which metrics are collected. | `"cpu,cpu_info,os,net,logical_disk,cs,thermalzone,logon,system,service"` |
15+
| Key | Description | Default |
16+
|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
17+
| `scrape_interval` | The rate at which metrics are collected. | `5 seconds` |
18+
| `we.logical_disk.allow_disk_regex` | Specify the regular expression for logical disk metrics to allow collection of. | `"/.+/"` (all) |
19+
| `we.logical_disk.deny_disk_regex` | Specify the regular expression for logical disk metrics to prevent collection of or ignore. | `NULL` (all) |
20+
| `we.net.allow_nic_regex` | Specify the regular expression for network metrics captured by the name of the NIC. | `"/.+/"` (all) |
21+
| `we.service.where` | Specify the `WHERE` clause for retrieving service metrics. | `NULL` |
22+
| `we.service.include` | Specify the key value pairs for the include condition for the `WHERE` clause of service metrics. | `NULL` |
23+
| `we.service.exclude` | Specify the key value pairs for the exclude condition for the `WHERE` clause of service metrics. | `NULL` |
24+
| `we.process.allow_process_regex` | Specify the regular expression covering the process metrics to collect. | `"/.+/"` (all) |
25+
| `we.process.deny_process_regex` | Specify the regular expression for process metrics to prevent collection of or ignore. | `NULL` (all) |
26+
| `collector.cpu.scrape_interval` | The rate in seconds at which `cpu` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
27+
| `collector.net.scrape_interval` | The rate in seconds at which `net` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
28+
| `collector.logical_disk.scrape_interval` | The rate in seconds at which `logical_disk` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
29+
| `collector.cs.scrape_interval` | The rate in seconds at which `cs` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
30+
| `collector.os.scrape_interval` | The rate in seconds at which `os` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
31+
| `collector.thermalzone.scrape_interval` | The rate in seconds at which `thermalzone` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
32+
| `collector.cpu_info.scrape_interval` | The rate in seconds at which `cpu_info` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
33+
| `collector.logon.scrape_interval` | The rate in seconds at which `logon` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
34+
| `collector.system.scrape_interval` | The rate in seconds at which `system` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
35+
| `collector.service.scrape_interval` | The rate in seconds at which `service` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
36+
| `collector.memory.scrape_interval` | The rate in seconds at which `memory` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
37+
| `collector.paging_file.scrape_interval` | The rate in seconds at which `paging_file` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
38+
| `collector.process.scrape_interval` | The rate in seconds at which `process` metrics are collected. Values greater than `0` override the global default. Otherwise, the global default is used. | `0 seconds` |
39+
| `metrics` | Specify which metrics are collected. | `"cpu,cpu_info,os,net,logical_disk,cs,thermalzone,logon,system,service"` |
4040

4141
## Collectors available
4242

4343
The following table describes the available collectors as part of this plugin. All collectors are enabled by default and respect the original metrics name, descriptions, and types from Prometheus Windows Exporter, so you can use your current dashboards without any compatibility problem.
4444

4545
The Version column specifies the Fluent Bit version where the collector is available.
4646

47-
| Name | Description | OS | Version |
48-
| ------------- | ------------------------------------------------------------------------------------------------ | ------- | ------- |
49-
| `cpu` | Exposes CPU statistics. | Windows | v1.9 |
50-
| `net` | Exposes Network statistics. | Windows | v2.0.8 |
51-
| `logical_disk` | Exposes `logical_disk` statistics. | Windows | v2.0.8 |
52-
| `cs` | Exposes `cs` statistics. | Windows | v2.0.8 |
53-
| `os` | Exposes OS statistics. | Windows | v2.0.8 |
54-
| `thermalzone` | Exposes `thermalzone` statistics. | Windows | v2.0.8 |
55-
| `cpu_info` | Exposes `cpu_info` statistics. | Windows | v2.0.8 |
56-
| `logon` | Exposes `logon` statistics. | Windows | v2.0.8 |
57-
| `system` | Exposes `system` statistics. | Windows | v2.0.8 |
58-
| `service` | Exposes `service` statistics. | Windows | v2.1.6 |
59-
| `memory` | Exposes `memory` statistics. | Windows | v2.1.9 |
60-
| `paging_file` | Exposes `paging_file` statistics. | Windows | v2.1.9 |
61-
| `process` | Exposes `process` statistics. | Windows | v2.1.9 |
47+
| Name | Description | OS | Version |
48+
|----------------|------------------------------------|---------|---------|
49+
| `cpu` | Exposes CPU statistics. | Windows | v1.9 |
50+
| `net` | Exposes Network statistics. | Windows | v2.0.8 |
51+
| `logical_disk` | Exposes `logical_disk` statistics. | Windows | v2.0.8 |
52+
| `cs` | Exposes `cs` statistics. | Windows | v2.0.8 |
53+
| `os` | Exposes OS statistics. | Windows | v2.0.8 |
54+
| `thermalzone` | Exposes `thermalzone` statistics. | Windows | v2.0.8 |
55+
| `cpu_info` | Exposes `cpu_info` statistics. | Windows | v2.0.8 |
56+
| `logon` | Exposes `logon` statistics. | Windows | v2.0.8 |
57+
| `system` | Exposes `system` statistics. | Windows | v2.0.8 |
58+
| `service` | Exposes `service` statistics. | Windows | v2.1.6 |
59+
| `memory` | Exposes `memory` statistics. | Windows | v2.1.9 |
60+
| `paging_file` | Exposes `paging_file` statistics. | Windows | v2.1.9 |
61+
| `process` | Exposes `process` statistics. | Windows | v2.1.9 |
6262

6363
## Threading
6464

@@ -70,6 +70,38 @@ This input always runs in its own [thread](../../administration/multithreading.m
7070

7171
In the following configuration file, the input plugin `windows_exporter_metrics` collects `metrics` every two seconds and exposes them through the [Prometheus Exporter](../outputs/prometheus-exporter.md) output plugin on HTTP/TCP port `2021`.
7272

73+
{% tabs %}
74+
{% tab title="fluent-bit.yaml" %}
75+
76+
```yaml
77+
# Node Exporter Metrics + Prometheus Exporter
78+
# -------------------------------------------
79+
# The following example collect host metrics on Linux and expose
80+
# them through a Prometheus HTTP end-point.
81+
#
82+
# After starting the service try it with:
83+
#
84+
# $ curl http://127.0.0.1:2021/metrics
85+
#
86+
service:
87+
flush: 1
88+
log_level: info
89+
90+
pipeline:
91+
inputs:
92+
- name: windows_exporter_metrics
93+
tag: node_metrics
94+
scrape_interval: 2
95+
96+
outputs:
97+
- name: prometheus_exporter
98+
match: node_metrics
99+
port: 2021
100+
```
101+
102+
{% endtab %}
103+
{% tab title="fluent-bit.conf" %}
104+
73105
```text
74106
# Node Exporter Metrics + Prometheus Exporter
75107
# -------------------------------------------
@@ -81,21 +113,24 @@ In the following configuration file, the input plugin `windows_exporter_metrics`
81113
# $ curl http://127.0.0.1:2021/metrics
82114
#
83115
[SERVICE]
84-
flush 1
85-
log_level info
116+
flush 1
117+
log_level info
86118

87119
[INPUT]
88-
name windows_exporter_metrics
89-
tag node_metrics
90-
scrape_interval 2
120+
name windows_exporter_metrics
121+
tag node_metrics
122+
scrape_interval 2
91123

92124
[OUTPUT]
93-
name prometheus_exporter
94-
match node_metrics
95-
host 0.0.0.0
96-
port 2021
125+
name prometheus_exporter
126+
match node_metrics
127+
host 0.0.0.0
128+
port 2021
97129
```
98130

131+
{% endtab %}
132+
{% endtabs %}
133+
99134
You can test the expose of the metrics by using `curl`:
100135

101136
```shell
@@ -104,7 +139,7 @@ curl http://127.0.0.1:2021/metrics
104139

105140
### Service where clause
106141

107-
Windows service collector will retrieve all of the service information for the local node or container.
142+
Windows service collector will retrieve all the service information for the local node or container.
108143
`we.service.where`, `we.service.include`, and `we.service.exclude` can be used to filter the service metrics.
109144

110145
To filter these metrics, users should specify a `WHERE` clause.
@@ -202,6 +237,6 @@ The WMI query will be called with the translated parameter as:
202237

203238
## Enhancement requests
204239

205-
The plugin implements a subset of the available collectors in the original Prometheus Windows Exporter. If you would like a specific collector prioritized, open a Github issue by using the following template:
240+
The plugin implements a subset of the available collectors in the original Prometheus Windows Exporter. If you would like a specific collector prioritized, open a GitHub issue by using the following template:
206241

207-
- [`in_windows_exporter_metrics`](https://github.com/fluent/fluent-bit/issues/new?assignees=\&labels=\&template=feature_request.md\&title=in_windows_exporter_metrics:%20add%20ABC%20collector)
242+
- [`in_windows_exporter_metrics`](https://github.com/fluent/fluent-bit/issues/new?assignees=\&labels=\&template=feature_request.md\&title=in_windows_exporter_metrics:%20add%20ABC%20collector)

0 commit comments

Comments
 (0)