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/windows-exporter-metrics.md
+59-21Lines changed: 59 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,15 @@ description: >-
6
6
7
7
# Windows Exporter Metrics
8
8
9
-
[Prometheus Windows Exporter](https://github.com/prometheus-community/windows_exporter) is a popular way to collect system level metrics from microsoft windows, such as CPU / Disk / Network / Process statistics. Fluent Bit 1.9.0 includes windows exporter metrics plugin that builds off the Prometheus design to collect system level metrics without having to manage two separate processes or agents.
9
+
[Prometheus Windows Exporter](https://github.com/prometheus-community/windows_exporter) is a popular way to collect system level metrics from microsoft windows, such as CPU / Disk / Network / Process statistics. Included since Fluent Bit 1.9.0, windows exporter metrics plugin builds off the Prometheus design to collect system level metrics without having to manage two separate processes or agents.
10
10
11
-
The initial release of Windows Exporter Metrics contains a single collector available from Prometheus Windows Exporter and we plan to expand it over time.
11
+
The initial release of Windows Exporter Metrics contains a single collector available from Prometheus Windows Exporter.
12
+
13
+
{% hint style="warning" %}
12
14
13
15
**Important note:** Metrics collected with Windows Exporter Metrics flow through a separate pipeline from logs and current filters do not operate on top of metrics.
14
16
17
+
{% endhint %}
15
18
16
19
## Configuration
17
20
@@ -73,7 +76,39 @@ This input always runs in its own [thread](../../administration/multithreading.m
73
76
74
77
In the following configuration file, the input plugin _windows_exporter_metrics collects _metrics every 2 seconds and exposes them through our [Prometheus Exporter](../outputs/prometheus-exporter.md) output plugin on HTTP/TCP port 2021.
75
78
76
-
```
79
+
{% tabs %}
80
+
{% tab title="fluent-bit.yaml" %}
81
+
82
+
```yaml
83
+
# Node Exporter Metrics + Prometheus Exporter
84
+
# -------------------------------------------
85
+
# The following example collect host metrics on Linux and expose
86
+
# them through a Prometheus HTTP end-point.
87
+
#
88
+
# After starting the service try it with:
89
+
#
90
+
# $ curl http://127.0.0.1:2021/metrics
91
+
#
92
+
service:
93
+
flush: 1
94
+
log_level: info
95
+
96
+
pipeline:
97
+
inputs:
98
+
- name: windows_exporter_metrics
99
+
tag: node_metrics
100
+
scrape_interval: 2
101
+
102
+
outputs:
103
+
- name: prometheus_exporter
104
+
match: node_metrics
105
+
port: 2021
106
+
```
107
+
108
+
{% endtab %}
109
+
{% tab title="fluent-bit.conf" %}
110
+
111
+
```text
77
112
# Node Exporter Metrics + Prometheus Exporter
78
113
# -------------------------------------------
79
114
# The following example collect host metrics on Linux and expose
@@ -97,14 +132,15 @@ In the following configuration file, the input plugin _windows_exporter_metrics
97
132
match node_metrics
98
133
host 0.0.0.0
99
134
port 2021
100
-
101
-
102
135
```
103
136
137
+
{% endtab %}
138
+
{% endtabs %}
139
+
104
140
You can test the expose of the metrics by using _curl:_
105
141
106
-
```bash
107
-
curl http://127.0.0.1:2021/metrics
142
+
```shell
143
+
$ curl http://127.0.0.1:2021/metrics
108
144
```
109
145
110
146
### Service where clause
@@ -122,12 +158,13 @@ Here is how these parameters should work:
122
158
`we.service.where` is handled as a raw WHERE clause.
123
159
For example, when a user specifies the parameter as follows:
124
160
125
-
```
161
+
```text
126
162
we.service.where Status!='OK'
127
163
```
128
164
129
165
This creates a WMI query like so:
130
-
```
166
+
167
+
```sql
131
168
SELECT*FROM Win32_Service WHERE Status!='OK'
132
169
```
133
170
@@ -140,18 +177,19 @@ If multiple key-value pairs are specified, the values will be concatenated with
140
177
Also, if the values contain `%` character then a `LIKE` operator will be used in the clause instead of the `=` operator.
we.service.where NOT Name LIKE 'webthreatdefusersvc%'
197
236
```
198
237
199
238
The WMI query will be called with the translated parameter as:
200
239
201
-
```
240
+
```sql
202
241
SELECT*FROM Win32_Service WHERE (Name='docker'OR Name LIKE'%Svc%'OR Name LIKE'%Service') AND (NOT Name LIKE'UdkUserSvc%'AND Name!='XboxNetApiSvc') AND (NOT Name LIKE'webthreatdefusersvc%')
203
242
```
204
243
205
-
206
244
## Enhancement Requests
207
245
208
246
Our current plugin implements a sub-set of the available collectors in the original Prometheus Windows Exporter, if you would like that we prioritize a specific collector please open a Github issue by using the following template:\
0 commit comments