Processor Metadata (Windows Plugin) (#19171)
* processor_metadata: Add processor metadata * meta fixes * add cpu alert --------- Co-authored-by: ilyam8 <ilya@netdata.cloud>
thiagoftsm committed
Dec 9, 2024 at 18:43 UTC
9e6a757e7ae02bb4a5fa0d34f322ec5b2af81e9a
2 files changed
+151
-27
src/collectors/windows.plugin/metadata.yaml
+133
-27
@@ -2,10 +2,10 @@ plugin_name: windows.plugin
2
modules:
3
- meta:
4
plugin_name: windows.plugin
5
- module_name: PerflibProcesses
5
+ module_name: PerflibProcessor
6
monitored_instance:
7
- name: System statistics
8
- link: "https://learn.microsoft.com/en-us/windows/win32/procthread/processes-and-threads"
7
+ name: Processor
8
+ link: "https://learn.microsoft.com/en-us/windows-hardware/design/minimum/windows-processor-requirements"
9
categories:
10
- data-collection.windows-systems
11
icon_filename: "windows.svg"
@@ -15,16 +15,17 @@ modules:
15
info_provided_to_referring_integrations:
16
description: ""
17
keywords:
18
- - process counts
19
- - threads
20
- - context switch
18
+ - windows
19
+ - microsoft
20
+ - processor
21
+ - CPU
22
most_popular: false
23
overview:
24
data_collection:
25
metrics_description: |
25
- This collector monitors the current number of processes, threads, and context switches on Windows systems.
26
+ This collector monitors processors statistics on host.
27
method_description: |
27
- It queries the 'System' object from Perflib in order to gather the metrics.
28
+ It queries Processor object from Perflib in order to gather the metrics.
29
supported_platforms:
30
include: ["windows"]
31
exclude: []
@@ -53,7 +54,7 @@ modules:
54
title: "Config option"
55
enabled: false
56
list:
56
- - name: PerflibProcesses
57
+ - name: PerflibProcessor
58
description: An option to enable or disable the data collection.
59
default_value: yes
60
required: false
@@ -65,7 +66,11 @@ modules:
66
troubleshooting:
67
problems:
68
list: []
68
- alerts: []
69
+ alerts:
70
+ - name: 10min_cpu_usage
71
+ metric: system.cpu
72
+ info: "Average CPU utilization over the last 10 minutes"
73
+ link: https://github.com/netdata/netdata/blob/master/src/health/health.d/cpu.conf
74
metrics:
75
folding:
76
title: Metrics
@@ -74,27 +79,33 @@ modules:
79
availability: []
80
scopes:
81
- name: global
77
- description: "These metrics refer to the entire monitored instance."
82
+ description: "These metrics refer to the entire system."
83
labels: []
84
metrics:
80
- - name: system.processes
81
- description: System Processes
82
- unit: "processes"
83
- chart_type: line
84
- dimensions:
85
- - name: running
86
- - name: system.threads
87
- description: System Threads
88
- unit: "threads"
89
- chart_type: line
85
+ - name: system.cpu
86
+ description: Total CPU utilization
87
+ unit: percentage
88
+ chart_type: stacked
89
dimensions:
91
- - name: threads
92
- - name: system.ctxt
93
- description: CPU Context Switches
94
- unit: "context switches/s"
95
- chart_type: line
90
+ - name: interrupts
91
+ - name: user
92
+ - name: privileged
93
+ - name: dpc
94
+ - name: CPU
95
+ description: "These metrics provide information about individual CPU cores."
96
+ labels:
97
+ - name: cpu
98
+ description: The identifier of the CPU core. On Windows systems, CPU cores are labeled as 'cpu0', 'cpu1', etc.
99
+ metrics:
100
+ - name: cpu.cpu
101
+ description: Core utilization
102
+ unit: percentage
103
+ chart_type: stacked
104
dimensions:
97
- - name: switches
105
+ - name: interrupts
106
+ - name: user
107
+ - name: privileged
108
+ - name: dpc
109
- meta:
110
plugin_name: windows.plugin
111
module_name: PerflibMemory
@@ -192,6 +203,101 @@ modules:
203
dimensions:
204
- name: paged
205
- name: pool-paged
206
+ - meta:
207
+ plugin_name: windows.plugin
208
+ module_name: PerflibProcesses
209
+ monitored_instance:
210
+ name: System statistics
211
+ link: "https://learn.microsoft.com/en-us/windows/win32/procthread/processes-and-threads"
212
+ categories:
213
+ - data-collection.windows-systems
214
+ icon_filename: "windows.svg"
215
+ related_resources:
216
+ integrations:
217
+ list: []
218
+ info_provided_to_referring_integrations:
219
+ description: ""
220
+ keywords:
221
+ - process counts
222
+ - threads
223
+ - context switch
224
+ most_popular: false
225
+ overview:
226
+ data_collection:
227
+ metrics_description: |
228
+ This collector monitors the current number of processes, threads, and context switches on Windows systems.
229
+ method_description: |
230
+ It queries the 'System' object from Perflib in order to gather the metrics.
231
+ supported_platforms:
232
+ include: ["windows"]
233
+ exclude: []
234
+ multi_instance: false
235
+ additional_permissions:
236
+ description: ""
237
+ default_behavior:
238
+ auto_detection:
239
+ description: |
240
+ The collector automatically detects all of the metrics, no further configuration is required.
241
+ limits:
242
+ description: ""
243
+ performance_impact:
244
+ description: ""
245
+ setup:
246
+ prerequisites:
247
+ list: []
248
+ configuration:
249
+ file:
250
+ name: "netdata.conf"
251
+ section_name: "[plugin:windows]"
252
+ description: "The Netdata main configuration file"
253
+ options:
254
+ description: ""
255
+ folding:
256
+ title: "Config option"
257
+ enabled: false
258
+ list:
259
+ - name: PerflibProcesses
260
+ description: An option to enable or disable the data collection.
261
+ default_value: yes
262
+ required: false
263
+ examples:
264
+ folding:
265
+ enabled: true
266
+ title: ""
267
+ list: []
268
+ troubleshooting:
269
+ problems:
270
+ list: []
271
+ alerts: []
272
+ metrics:
273
+ folding:
274
+ title: Metrics
275
+ enabled: false
276
+ description: ""
277
+ availability: []
278
+ scopes:
279
+ - name: global
280
+ description: "These metrics refer to the entire monitored instance."
281
+ labels: []
282
+ metrics:
283
+ - name: system.processes
284
+ description: System Processes
285
+ unit: "processes"
286
+ chart_type: line
287
+ dimensions:
288
+ - name: running
289
+ - name: system.threads
290
+ description: System Threads
291
+ unit: "threads"
292
+ chart_type: line
293
+ dimensions:
294
+ - name: threads
295
+ - name: system.ctxt
296
+ description: CPU Context Switches
297
+ unit: "context switches/s"
298
+ chart_type: line
299
+ dimensions:
300
+ - name: switches
301
- meta:
302
plugin_name: windows.plugin
303
module_name: PerflibThermalZone
src/health/health.d/cpu.conf
+18
@@ -47,6 +47,24 @@ host labels: _os=linux
47
info: Average CPU steal time over the last 20 minutes
48
to: silent
49
50
+## Windows
51
+
52
+ template: 10min_cpu_usage
53
+ on: system.cpu
54
+ class: Utilization
55
+ type: System
56
+ component: CPU
57
+host labels: _os=windows
58
+ lookup: average -10m unaligned of irq,user,system,dpc
59
+ units: %
60
+ every: 1m
61
+ warn: $this > (($status >= $WARNING) ? (75) : (85))
62
+ crit: $this > (($status == $CRITICAL) ? (85) : (95))
63
+ delay: up 1m down 15m multiplier 1.5 max 1h
64
+ summary: System CPU utilization
65
+ info: Average CPU utilization over the last 10 minutes
66
+ to: sysadmin
67
+
68
## FreeBSD
69
template: 10min_cpu_usage
70
on: system.cpu