Adjust Windows plugin (#21597)
thiagoftsm committed
Jan 21, 2026 at 20:01 UTC
373967c45c56d973a6df2f36e04e764828b47d0c
13 files changed
+320
-318
src/collectors/all.h
+1
-1
@@ -460,7 +460,7 @@
460
#define NETDATA_CHART_PRIO_SENSOR_LUX 70010
461
#define NETDATA_CHART_PRIO_SENSOR_TEMPERATURE 70011
462
#define NETDATA_CHART_PRIO_SENSOR_VOLTAGE 70012
463
-#define NETDATA_CHART_PRIO_SENSOR_RESISTENCE 70013
463
+#define NETDATA_CHART_PRIO_SENSOR_RESISTANCE 70013
464
#define NETDATA_CHART_PRIO_SENSOR_AMBIENT_PRESSURE 70014
465
#define NETDATA_CHART_PRIO_SENSOR_LATITUDE 70015
466
#define NETDATA_CHART_PRIO_SENSOR_LONGITUDE 70016
src/collectors/windows.plugin/GetSensors.c
+3
-3
@@ -208,9 +208,9 @@ static struct win_sensor_config {
208
{
209
.title = "Electrical resistence",
210
.units = "Ohms",
211
- .context = "system.hw.sensor.resistence.input",
212
- .family = "Resistence",
213
- .priority = NETDATA_CHART_PRIO_SENSOR_RESISTENCE,
211
+ .context = "system.hw.sensor.resistance.input",
212
+ .family = "Resistance",
213
+ .priority = NETDATA_CHART_PRIO_SENSOR_RESISTANCE,
214
},
215
{
216
.title = "Electrical capacitance",
src/collectors/windows.plugin/GetServicesStatus.c
+48
-15
@@ -23,6 +23,12 @@ struct win_service {
23
24
static DICTIONARY *win_services = NULL;
25
26
+static void win_service_cleanup(struct win_service *s)
27
+{
28
+ freez(s->service_name);
29
+ s->service_name = NULL;
30
+}
31
+
32
void dict_win_service_insert_cb(const DICTIONARY_ITEM *item, void *value, void *data __maybe_unused)
33
{
34
struct win_service *ptr = value;
@@ -31,12 +37,27 @@ void dict_win_service_insert_cb(const DICTIONARY_ITEM *item, void *value, void *
37
ptr->service_name = strdupz(name);
38
}
39
40
+void dict_win_service_delete_cb(const DICTIONARY_ITEM *item __maybe_unused, void *value, void *data __maybe_unused)
41
+{
42
+ struct win_service *s = value;
43
+ win_service_cleanup(s);
44
+}
45
+
46
+void do_GetServicesStatus_cleanup(void)
47
+{
48
+ if (win_services) {
49
+ dictionary_destroy(win_services);
50
+ win_services = NULL;
51
+ }
52
+}
53
+
54
static void initialize(void)
55
{
56
win_services = dictionary_create_advanced(
57
DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_FIXED_SIZE, NULL, sizeof(struct win_service));
58
59
dictionary_register_insert_callback(win_services, dict_win_service_insert_cb, NULL);
60
+ dictionary_register_delete_callback(win_services, dict_win_service_delete_cb, NULL);
61
}
62
63
static BOOL fill_dictionary_with_content()
@@ -70,17 +91,29 @@ static BOOL fill_dictionary_with_content()
91
}
92
93
if (GetLastError() != ERROR_MORE_DATA) {
94
+ nd_log(NDLS_COLLECTORS, NDLP_ERR, "Failed to query service status (error: %lu)", GetLastError());
95
goto endServiceCollection;
96
}
97
98
buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bytes_needed);
99
if (!buffer) {
100
+ nd_log(NDLS_COLLECTORS, NDLP_ERR, "Failed to allocate memory for service enumeration");
101
ret = FALSE;
102
goto endServiceCollection;
103
}
104
82
- if (!EnumServicesStatusEx(ndSCMH, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_STATE_ALL,
83
- (LPBYTE)buffer, bytes_needed, &bytes_needed, &total_services, NULL, NULL)) {
105
+ if (!EnumServicesStatusEx(
106
+ ndSCMH,
107
+ SC_ENUM_PROCESS_INFO,
108
+ SERVICE_WIN32,
109
+ SERVICE_STATE_ALL,
110
+ (LPBYTE)buffer,
111
+ bytes_needed,
112
+ &bytes_needed,
113
+ &total_services,
114
+ NULL,
115
+ NULL)) {
116
+ nd_log(NDLS_COLLECTORS, NDLP_ERR, "Failed to enumerate services (error: %lu)", GetLastError());
117
goto endServiceCollection;
118
}
119
@@ -133,8 +166,7 @@ static RRDDIM *win_service_select_dim(struct win_service *p, uint32_t selector)
166
}
167
}
168
136
-static int
137
-dict_win_services_charts_cb(const DICTIONARY_ITEM *item __maybe_unused, void *value, void *data __maybe_unused)
169
+static int dict_win_services_charts_cb(const DICTIONARY_ITEM *item __maybe_unused, void *value, void *data)
170
{
171
struct win_service *p = value;
172
int *update_every = data;
@@ -157,6 +189,9 @@ dict_win_services_charts_cb(const DICTIONARY_ITEM *item __maybe_unused, void *va
189
*update_every,
190
RRDSET_TYPE_LINE);
191
192
+ if (unlikely(!p->st_service_state))
193
+ return 1;
194
+
195
p->rd_service_state_running = rrddim_add(p->st_service_state, "running", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
196
197
p->rd_service_state_stopped = rrddim_add(p->st_service_state, "stopped", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
@@ -180,21 +215,19 @@ dict_win_services_charts_cb(const DICTIONARY_ITEM *item __maybe_unused, void *va
215
rrdlabels_add(p->st_service_state->rrdlabels, "service", p->service_name, RRDLABEL_SRC_AUTO);
216
}
217
183
- if (p->st_service_state) {
218
#define NETDATA_WINDOWS_SERVICE_STATE_TOTAL_STATES (8)
185
- uint32_t current_state = (uint32_t)p->ServiceState.current.Data;
186
- for (uint32_t i = 1; i <= NETDATA_WINDOWS_SERVICE_STATE_TOTAL_STATES; i++) {
187
- RRDDIM *dim = win_service_select_dim(p, i);
188
- if (!dim)
189
- continue;
190
- uint32_t chart_value = (current_state == i) ? 1 : 0;
191
-
192
- rrddim_set_by_pointer(p->st_service_state, dim, (collected_number)chart_value);
193
- }
219
+ uint32_t current_state = (uint32_t)p->ServiceState.current.Data;
220
+ for (uint32_t i = 1; i <= NETDATA_WINDOWS_SERVICE_STATE_TOTAL_STATES; i++) {
221
+ RRDDIM *dim = win_service_select_dim(p, i);
222
+ if (!dim)
223
+ continue;
224
+ uint32_t chart_value = (current_state == i) ? 1 : 0;
225
195
- rrdset_done(p->st_service_state);
226
+ rrddim_set_by_pointer(p->st_service_state, dim, (collected_number)chart_value);
227
}
228
229
+ rrdset_done(p->st_service_state);
230
+
231
return 1;
232
}
233
src/collectors/windows.plugin/GetSystemCPU.c
+19
-3
@@ -3,12 +3,30 @@
3
#include "windows_plugin.h"
4
#include "windows-internals.h"
5
6
+static RRDSET *st = NULL;
7
+static RRDDIM *rd_user = NULL, *rd_kernel = NULL, *rd_idle = NULL;
8
+
9
+void do_GetSystemCPU_cleanup(void)
10
+{
11
+ if (rd_user)
12
+ rrddim_free(st, rd_user);
13
+ if (rd_kernel)
14
+ rrddim_free(st, rd_kernel);
15
+ if (rd_idle)
16
+ rrddim_free(st, rd_idle);
17
+ if (st)
18
+ rrdset_free(st);
19
+
20
+ rd_user = rd_kernel = rd_idle = NULL;
21
+ st = NULL;
22
+}
23
+
24
int do_GetSystemCPU(int update_every, usec_t dt __maybe_unused)
25
{
26
FILETIME idleTime, kernelTime, userTime;
27
28
if (GetSystemTimes(&idleTime, &kernelTime, &userTime) == 0) {
11
- netdata_log_error("GetSystemTimes() failed.");
29
+ nd_log(NDLS_COLLECTORS, NDLP_ERR, "GetSystemTimes() failed.");
30
return 1;
31
}
32
@@ -19,8 +37,6 @@ int do_GetSystemCPU(int update_every, usec_t dt __maybe_unused)
37
// kernel includes idle
38
kernel -= idle;
39
22
- static RRDSET *st = NULL;
23
- static RRDDIM *rd_user = NULL, *rd_kernel = NULL, *rd_idle = NULL;
40
if (!st) {
41
st = rrdset_create_localhost(
42
"system",
src/collectors/windows.plugin/GetSystemRAM.c
+4
-4
@@ -13,7 +13,7 @@ int do_GetSystemRAM(int update_every, usec_t dt __maybe_unused)
13
memStat.dwLength = sizeof(memStat);
14
15
if (!GlobalMemoryStatusEx(&memStat)) {
16
- netdata_log_error("GlobalMemoryStatusEx() failed.");
16
+ nd_log(NDLS_COLLECTORS, NDLP_ERR, "GlobalMemoryStatusEx() failed (error: %lu)", GetLastError());
17
return 1;
18
}
19
@@ -25,9 +25,9 @@ int do_GetSystemRAM(int update_every, usec_t dt __maybe_unused)
25
}
26
27
{
28
- DWORDLONG total_bytes = memStat.ullTotalPageFile;
29
- DWORDLONG free_bytes = memStat.ullAvailPageFile;
30
- DWORDLONG used_bytes = total_bytes - free_bytes;
28
+ ULONGLONG total_bytes = memStat.ullTotalPageFile;
29
+ ULONGLONG free_bytes = memStat.ullAvailPageFile;
30
+ ULONGLONG used_bytes = total_bytes - free_bytes;
31
common_mem_swap(free_bytes, used_bytes, update_every);
32
}
33
src/collectors/windows.plugin/metadata.yaml
+2
-14
@@ -1299,8 +1299,8 @@ modules:
1299
chart_type: line
1300
dimensions:
1301
- name: input
1302
- - name: system.hw.sensor.resistence.input
1303
- description: Electrical resistence
1302
+ - name: system.hw.sensor.resistance.input
1303
+ description: Electrical resistance
1304
unit: "Ohms"
1305
chart_type: line
1306
dimensions:
@@ -3102,18 +3102,6 @@ modules:
3102
chart_type: line
3103
dimensions:
3104
- name: request
3105
- - name: ad.dra_replication_sync_objects_remaining
3106
- description: DRA replication full sync objects remaining
3107
- unit: objects
3108
- chart_type: line
3109
- dimensions:
3110
- - name: object
3111
- - name: ad.dra_replication_sync_objects_remaining
3112
- description: DRA replication full sync objects remaining
3113
- unit: objects
3114
- chart_type: line
3115
- dimensions:
3116
- - name: object
3105
- name: ad.name_cache_hits
3106
description: Name cache hits
3107
unit: hits/s
src/collectors/windows.plugin/perflib-ad.c
+105
-142
@@ -120,27 +120,25 @@ static void netdata_ad_cache_lookups(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TY
120
121
if (unlikely(!st_name_cache_lookups_total)) {
122
st_name_cache_lookups_total = rrdset_create_localhost(
123
- "ad",
124
- "name_cache_lookups",
125
- NULL,
126
- "database",
127
- "ad.name_cache_lookups",
128
- "Name cache lookups",
129
- "lookups/s",
130
- PLUGIN_WINDOWS_NAME,
131
- "PerflibAD",
132
- PRIO_AD_CACHE_LOOKUP_TOTAL,
133
- update_every,
134
- RRDSET_TYPE_LINE);
123
+ "ad",
124
+ "name_cache_lookups",
125
+ NULL,
126
+ "database",
127
+ "ad.name_cache_lookups",
128
+ "Name cache lookups",
129
+ "lookups/s",
130
+ PLUGIN_WINDOWS_NAME,
131
+ "PerflibAD",
132
+ PRIO_AD_CACHE_LOOKUP_TOTAL,
133
+ update_every,
134
+ RRDSET_TYPE_LINE);
135
136
rd_name_cache_lookups_total =
137
- rrddim_add(st_name_cache_lookups_total, "lookups", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
137
+ rrddim_add(st_name_cache_lookups_total, "lookups", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
138
}
139
140
rrddim_set_by_pointer(
141
- st_name_cache_lookups_total,
142
- rd_name_cache_lookups_total,
143
- (collected_number)nameCacheLookupsTotal.current.Data);
141
+ st_name_cache_lookups_total, rd_name_cache_lookups_total, (collected_number)nameCacheLookupsTotal.current.Data);
142
rrdset_done(st_name_cache_lookups_total);
143
}
144
@@ -157,25 +155,24 @@ static void netdata_ad_cache_hits(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE
155
156
if (unlikely(!st_name_cache_hits_total)) {
157
st_name_cache_hits_total = rrdset_create_localhost(
160
- "ad",
161
- "name_cache_hits",
162
- NULL,
163
- "database",
164
- "ad.name_cache_hits",
165
- "Name cache hits",
166
- "hits/s",
167
- PLUGIN_WINDOWS_NAME,
168
- "PerflibAD",
169
- PRIO_AD_CACHE_HITS_TOTAL,
170
- update_every,
171
- RRDSET_TYPE_LINE);
158
+ "ad",
159
+ "name_cache_hits",
160
+ NULL,
161
+ "database",
162
+ "ad.name_cache_hits",
163
+ "Name cache hits",
164
+ "hits/s",
165
+ PLUGIN_WINDOWS_NAME,
166
+ "PerflibAD",
167
+ PRIO_AD_CACHE_HITS_TOTAL,
168
+ update_every,
169
+ RRDSET_TYPE_LINE);
170
173
- rd_name_cache_hits_total =
174
- rrddim_add(st_name_cache_hits_total, "hits", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
171
+ rd_name_cache_hits_total = rrddim_add(st_name_cache_hits_total, "hits", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
172
}
173
174
rrddim_set_by_pointer(
178
- st_name_cache_hits_total, rd_name_cache_hits_total, (collected_number)nameCacheHitsTotal.current.Data);
175
+ st_name_cache_hits_total, rd_name_cache_hits_total, (collected_number)nameCacheHitsTotal.current.Data);
176
rrdset_done(st_name_cache_hits_total);
177
}
178
@@ -192,25 +189,24 @@ static void netdata_ad_searches(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *p
189
190
if (unlikely(!st_ldap_searches_total)) {
191
st_ldap_searches_total = rrdset_create_localhost(
195
- "ad",
196
- "ldap_searches",
197
- NULL,
198
- "ldap",
199
- "ad.ldap_searches",
200
- "LDAP client search operations",
201
- "searches/s",
202
- PLUGIN_WINDOWS_NAME,
203
- "PerflibAD",
204
- PRIO_AD_LDAP_SEARCHES_TOTAL,
205
- update_every,
206
- RRDSET_TYPE_LINE);
192
+ "ad",
193
+ "ldap_searches",
194
+ NULL,
195
+ "ldap",
196
+ "ad.ldap_searches",
197
+ "LDAP client search operations",
198
+ "searches/s",
199
+ PLUGIN_WINDOWS_NAME,
200
+ "PerflibAD",
201
+ PRIO_AD_LDAP_SEARCHES_TOTAL,
202
+ update_every,
203
+ RRDSET_TYPE_LINE);
204
208
- rd_ldap_searches_total =
209
- rrddim_add(st_ldap_searches_total, "searches", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
205
+ rd_ldap_searches_total = rrddim_add(st_ldap_searches_total, "searches", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
206
}
207
208
rrddim_set_by_pointer(
213
- st_ldap_searches_total, rd_ldap_searches_total, (collected_number)ldapSearchesTotal.current.Data);
209
+ st_ldap_searches_total, rd_ldap_searches_total, (collected_number)ldapSearchesTotal.current.Data);
210
rrdset_done(st_ldap_searches_total);
211
}
212
@@ -292,7 +288,7 @@ static void netdata_ad_compressed_traffic(PERF_DATA_BLOCK *pDataBlock, PERF_OBJE
288
.key = "DRA Outbound Bytes Compressed (Between Sites, After Compression)/sec"};
289
290
static COUNTER_DATA replicationDataInboundIntraSiteBytesTotal = {
295
- .key = "DRA Outbound Bytes Compressed (Between Sites, After Compression)/sec"};
291
+ .key = "DRA Inbound Bytes Compressed (Within Site, After Compression)/sec"};
292
static COUNTER_DATA replicationDataOutboundIntraSiteBytesTotal = {
293
.key = "DRA Outbound Bytes Not Compressed (Within Site)/sec"};
294
@@ -316,7 +312,7 @@ static void netdata_ad_compressed_traffic(PERF_DATA_BLOCK *pDataBlock, PERF_OBJE
312
NULL,
313
"replication",
314
"ad.dra_replication_intersite_compressed_traffic",
319
- "DRA replication compressed traffic withing site",
315
+ "DRA replication compressed traffic between sites",
316
"bytes/s",
317
PLUGIN_WINDOWS_NAME,
318
"PerflibAD",
@@ -354,7 +350,7 @@ intraChart:
350
NULL,
351
"replication",
352
"ad.dra_replication_intrasite_compressed_traffic",
357
- "DRA replication compressed traffic between sites",
353
+ "DRA replication compressed traffic within site",
354
"bytes/s",
355
PLUGIN_WINDOWS_NAME,
356
"PerflibAD",
@@ -384,14 +380,11 @@ static void netdata_ad_sync(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObje
380
{
381
static COUNTER_DATA replicationSyncPending = {.key = "DRA Pending Replication Synchronizations"};
382
static COUNTER_DATA replicationSyncRequestsTotal = {.key = "DRA Sync Requests Made"};
387
- static COUNTER_DATA replicationPendingSyncs = {.key = "DRA Pending Replication Synchronizations"};
383
384
static RRDSET *st_dra_replication_pending_syncs = NULL;
385
static RRDDIM *rd_dra_replication_pending_syncs = NULL;
386
static RRDSET *st_dra_replication_sync_requests = NULL;
387
static RRDDIM *rd_dra_replication_sync_requests = NULL;
393
- static RRDSET *st_dra_replication_sync_objects_remaining = NULL;
394
- static RRDDIM *rd_dra_replication_sync_objects_remaining = NULL;
388
389
if (!perflibGetObjectCounter(pDataBlock, pObjectType, &replicationSyncPending)) {
390
goto totalSyncChart;
@@ -424,7 +417,7 @@ static void netdata_ad_sync(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObje
417
418
totalSyncChart:
419
if (!perflibGetObjectCounter(pDataBlock, pObjectType, &replicationSyncRequestsTotal)) {
427
- goto RemainingSyncChart;
420
+ return;
421
}
422
423
if (unlikely(!st_dra_replication_sync_requests)) {
@@ -451,36 +444,6 @@ totalSyncChart:
444
rd_dra_replication_sync_requests,
445
(collected_number)replicationSyncRequestsTotal.current.Data);
446
rrdset_done(st_dra_replication_sync_requests);
454
-
455
-RemainingSyncChart:
456
- if (!perflibGetObjectCounter(pDataBlock, pObjectType, &replicationPendingSyncs)) {
457
- return;
458
- }
459
-
460
- if (unlikely(!st_dra_replication_sync_objects_remaining)) {
461
- st_dra_replication_sync_objects_remaining = rrdset_create_localhost(
462
- "ad",
463
- "dra_replication_sync_objects_remaining",
464
- NULL,
465
- "replication",
466
- "ad.dra_replication_sync_objects_remaining",
467
- "DRA replication full sync objects remaining",
468
- "objects",
469
- PLUGIN_WINDOWS_NAME,
470
- "PerflibAD",
471
- PRIO_AD_SYNC_OBJECTS_REMAINING,
472
- update_every,
473
- RRDSET_TYPE_LINE);
474
-
475
- rd_dra_replication_sync_objects_remaining =
476
- rrddim_add(st_dra_replication_sync_objects_remaining, "object", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
477
- }
478
-
479
- rrddim_set_by_pointer(
480
- st_dra_replication_sync_objects_remaining,
481
- rd_dra_replication_sync_objects_remaining,
482
- (collected_number)replicationPendingSyncs.current.Data);
483
- rrdset_done(st_dra_replication_sync_objects_remaining);
447
}
448
449
static void
@@ -497,27 +460,27 @@ netdata_ad_service_threads_in_use(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE
460
461
if (unlikely(!st_directory_services_threads)) {
462
st_directory_services_threads = rrdset_create_localhost(
500
- "ad",
501
- "ds_threads",
502
- NULL,
503
- "threads",
504
- "ad.ds_threads",
505
- "Directory Service threads",
506
- "threads",
507
- PLUGIN_WINDOWS_NAME,
508
- "PerflibAD",
509
- PRIO_AD_THREADS_IN_USE,
510
- update_every,
511
- RRDSET_TYPE_LINE);
463
+ "ad",
464
+ "ds_threads",
465
+ NULL,
466
+ "threads",
467
+ "ad.ds_threads",
468
+ "Directory Service threads",
469
+ "threads",
470
+ PLUGIN_WINDOWS_NAME,
471
+ "PerflibAD",
472
+ PRIO_AD_THREADS_IN_USE,
473
+ update_every,
474
+ RRDSET_TYPE_LINE);
475
476
rd_directory_services_threads =
514
- rrddim_add(st_directory_services_threads, "thread", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
477
+ rrddim_add(st_directory_services_threads, "thread", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
478
}
479
480
rrddim_set_by_pointer(
518
- st_directory_services_threads,
519
- rd_directory_services_threads,
520
- (collected_number)directoryServiceThreads.current.Data);
481
+ st_directory_services_threads,
482
+ rd_directory_services_threads,
483
+ (collected_number)directoryServiceThreads.current.Data);
484
rrdset_done(st_directory_services_threads);
485
}
486
@@ -533,27 +496,27 @@ static void netdata_ad_bind_time(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *
496
497
if (unlikely(!st_ldap_last_bind_time_seconds_total)) {
498
st_ldap_last_bind_time_seconds_total = rrdset_create_localhost(
536
- "ad",
537
- "ldap_last_bind_time",
538
- NULL,
539
- "bind",
540
- "ad.ldap_last_bind_time",
541
- "LDAP last successful bind time",
542
- "seconds",
543
- PLUGIN_WINDOWS_NAME,
544
- "PerflibAD",
545
- PRIO_AD_BIND_TIME,
546
- update_every,
547
- RRDSET_TYPE_LINE);
499
+ "ad",
500
+ "ldap_last_bind_time",
501
+ NULL,
502
+ "bind",
503
+ "ad.ldap_last_bind_time",
504
+ "LDAP last successful bind time",
505
+ "seconds",
506
+ PLUGIN_WINDOWS_NAME,
507
+ "PerflibAD",
508
+ PRIO_AD_BIND_TIME,
509
+ update_every,
510
+ RRDSET_TYPE_LINE);
511
512
rd_ldap_last_bind_time_seconds_total =
550
- rrddim_add(st_ldap_last_bind_time_seconds_total, "last_bind", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
513
+ rrddim_add(st_ldap_last_bind_time_seconds_total, "last_bind", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
514
}
515
516
rrddim_set_by_pointer(
554
- st_ldap_last_bind_time_seconds_total,
555
- rd_ldap_last_bind_time_seconds_total,
556
- (collected_number)ldapLastBindTimeSecondsTotal.current.Data);
517
+ st_ldap_last_bind_time_seconds_total,
518
+ rd_ldap_last_bind_time_seconds_total,
519
+ (collected_number)ldapLastBindTimeSecondsTotal.current.Data);
520
rrdset_done(st_ldap_last_bind_time_seconds_total);
521
}
522
@@ -644,27 +607,27 @@ static void netdata_ad_atq_latency(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE
607
608
if (unlikely(!st_atq_average_request_latency)) {
609
st_atq_average_request_latency = rrdset_create_localhost(
647
- "ad",
648
- "atq_average_request_latency",
649
- NULL,
650
- "queue",
651
- "ad.atq_average_request_latency",
652
- "Average request processing time",
653
- "seconds",
654
- PLUGIN_WINDOWS_NAME,
655
- "PerflibAD",
656
- PRIO_AD_AVG_REQUEST_LATENCY,
657
- update_every,
658
- RRDSET_TYPE_LINE);
610
+ "ad",
611
+ "atq_average_request_latency",
612
+ NULL,
613
+ "queue",
614
+ "ad.atq_average_request_latency",
615
+ "Average request processing time",
616
+ "seconds",
617
+ PLUGIN_WINDOWS_NAME,
618
+ "PerflibAD",
619
+ PRIO_AD_AVG_REQUEST_LATENCY,
620
+ update_every,
621
+ RRDSET_TYPE_LINE);
622
623
rd_atq_average_request_latency =
661
- rrddim_add(st_atq_average_request_latency, "time", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
624
+ rrddim_add(st_atq_average_request_latency, "time", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
625
}
626
627
rrddim_set_by_pointer(
665
- st_atq_average_request_latency,
666
- rd_atq_average_request_latency,
667
- (collected_number)atqAverageRequestLatency.current.Data);
628
+ st_atq_average_request_latency,
629
+ rd_atq_average_request_latency,
630
+ (collected_number)atqAverageRequestLatency.current.Data);
631
rrdset_done(st_atq_average_request_latency);
632
}
633
@@ -744,17 +707,17 @@ static bool do_AD(PERF_DATA_BLOCK *pDataBlock, int update_every)
707
return false;
708
709
static void (*doAD[])(PERF_DATA_BLOCK *, PERF_OBJECT_TYPE *, int) = {
747
- netdata_ad_directory,
748
- netdata_ad_cache_lookups,
749
- netdata_ad_properties,
750
- netdata_ad_compressed_traffic,
751
- netdata_ad_sync,
752
- netdata_ad_cache_hits,
753
- netdata_ad_service_threads_in_use,
754
- netdata_ad_bind,
755
- netdata_ad_searches,
756
- netdata_ad_atq_latency,
757
- netdata_ad_op_total,
710
+ netdata_ad_directory,
711
+ netdata_ad_cache_lookups,
712
+ netdata_ad_properties,
713
+ netdata_ad_compressed_traffic,
714
+ netdata_ad_sync,
715
+ netdata_ad_cache_hits,
716
+ netdata_ad_service_threads_in_use,
717
+ netdata_ad_bind,
718
+ netdata_ad_searches,
719
+ netdata_ad_atq_latency,
720
+ netdata_ad_op_total,
721
722
// This must be the end
723
NULL};
src/collectors/windows.plugin/perflib-adcs.c
+24
-30
@@ -210,7 +210,7 @@ static void netdata_adcs_retrievals(
210
rrdset_done(ac->st_adcs_retrievals_total);
211
}
212
213
-static void netdata_adcs_failed_requets(
213
+static void netdata_adcs_failed_requests(
214
struct adcs_certificate *ac,
215
PERF_DATA_BLOCK *pDataBlock,
216
PERF_OBJECT_TYPE *pObjectType,
@@ -250,7 +250,7 @@ static void netdata_adcs_failed_requets(
250
rrdset_done(ac->st_adcs_failed_requests_total);
251
}
252
253
-static void netdata_adcs_issued_requets(
253
+static void netdata_adcs_issued_requests(
254
struct adcs_certificate *ac,
255
PERF_DATA_BLOCK *pDataBlock,
256
PERF_OBJECT_TYPE *pObjectType,
@@ -290,7 +290,7 @@ static void netdata_adcs_issued_requets(
290
rrdset_done(ac->st_adcs_issued_requests_total);
291
}
292
293
-static void netdata_adcs_pending_requets(
293
+static void netdata_adcs_pending_requests(
294
struct adcs_certificate *ac,
295
PERF_DATA_BLOCK *pDataBlock,
296
PERF_OBJECT_TYPE *pObjectType,
@@ -398,15 +398,9 @@ static void netdata_adcs_retrieval_processing(
398
RRDSET_TYPE_LINE);
399
400
ac->rd_adcs_retrievals_processing_time_seconds = rrddim_add(
401
- ac->st_adcs_retrievals_processing_time_seconds,
402
- "processing_time",
403
- NULL,
404
- 1,
405
- 1000,
406
- RRD_ALGORITHM_ABSOLUTE);
401
+ ac->st_adcs_retrievals_processing_time_seconds, "processing_time", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
402
408
- rrdlabels_add(
409
- ac->st_adcs_retrievals_processing_time_seconds->rrdlabels, "cert", ac->name, RRDLABEL_SRC_AUTO);
403
+ rrdlabels_add(ac->st_adcs_retrievals_processing_time_seconds->rrdlabels, "cert", ac->name, RRDLABEL_SRC_AUTO);
404
}
405
406
rrddim_set_by_pointer(
@@ -423,7 +417,7 @@ static void netdata_adcs_crypto_signing_time(
417
int update_every)
418
{
419
char id[RRD_ID_LENGTH_MAX + 1];
426
- if (!perflibGetObjectCounter(pDataBlock, pObjectType, &ac->ADCSRetrievalsProcessingTime)) {
420
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &ac->ADCSRequestCryptoSigningTime)) {
421
return;
422
}
423
@@ -445,7 +439,7 @@ static void netdata_adcs_crypto_signing_time(
439
440
ac->rd_adcs_request_cryptographic_signing_time_seconds = rrddim_add(
441
ac->st_adcs_request_cryptographic_signing_time_seconds,
448
- "singing_time",
442
+ "signing_time",
443
NULL,
444
1,
445
1000,
@@ -554,7 +548,7 @@ static void netdata_adcs_challenge_response_processing_time(
548
rrdset_done(ac->st_adcs_challenge_response_processing_time_seconds);
549
}
550
557
-static void netdata_adcs_signed_certificate_timetamp_list(
551
+static void netdata_adcs_signed_certificate_timestamp_list(
552
struct adcs_certificate *ac,
553
PERF_DATA_BLOCK *pDataBlock,
554
PERF_OBJECT_TYPE *pObjectType,
@@ -583,7 +577,7 @@ static void netdata_adcs_signed_certificate_timetamp_list(
577
578
ac->rd_adcs_signed_certificate_timestamp_lists_total = rrddim_add(
579
ac->st_adcs_signed_certificate_timestamp_lists_total,
586
- "processing_time",
580
+ "signed_timestamp_list",
581
NULL,
582
1,
583
1,
@@ -600,7 +594,7 @@ static void netdata_adcs_signed_certificate_timetamp_list(
594
rrdset_done(ac->st_adcs_signed_certificate_timestamp_lists_total);
595
}
596
603
-static void netdata_adcs_signed_certificate_timetamp_list_processing(
597
+static void netdata_adcs_signed_certificate_timestamp_list_processing(
598
struct adcs_certificate *ac,
599
PERF_DATA_BLOCK *pDataBlock,
600
PERF_OBJECT_TYPE *pObjectType,
@@ -657,19 +651,19 @@ static bool do_ADCS(PERF_DATA_BLOCK *pDataBlock, int update_every)
651
return false;
652
653
static void (*doADCS[])(struct adcs_certificate *, PERF_DATA_BLOCK *, PERF_OBJECT_TYPE *, int) = {
660
- netdata_adcs_requests,
661
- netdata_adcs_requests_processing_time,
662
- netdata_adcs_retrievals,
663
- netdata_adcs_failed_requets,
664
- netdata_adcs_issued_requets,
665
- netdata_adcs_pending_requets,
666
- netdata_adcs_challenge_response,
667
- netdata_adcs_retrieval_processing,
668
- netdata_adcs_crypto_signing_time,
669
- netdata_adcs_policy_mod_processing_time,
670
- netdata_adcs_challenge_response_processing_time,
671
- netdata_adcs_signed_certificate_timetamp_list,
672
- netdata_adcs_signed_certificate_timetamp_list_processing,
654
+ netdata_adcs_requests,
655
+ netdata_adcs_requests_processing_time,
656
+ netdata_adcs_retrievals,
657
+ netdata_adcs_failed_requests,
658
+ netdata_adcs_issued_requests,
659
+ netdata_adcs_pending_requests,
660
+ netdata_adcs_challenge_response,
661
+ netdata_adcs_retrieval_processing,
662
+ netdata_adcs_crypto_signing_time,
663
+ netdata_adcs_policy_mod_processing_time,
664
+ netdata_adcs_challenge_response_processing_time,
665
+ netdata_adcs_signed_certificate_timestamp_list,
666
+ netdata_adcs_signed_certificate_timestamp_list_processing,
667
668
// This must be the end
669
NULL};
@@ -688,7 +682,7 @@ static bool do_ADCS(PERF_DATA_BLOCK *pDataBlock, int update_every)
682
683
struct adcs_certificate *ptr = dictionary_set(adcs_certificates, windows_shared_buffer, NULL, sizeof(*ptr));
684
691
- for (int j = 0; doADCS[j] ;j++)
685
+ for (int j = 0; doADCS[j]; j++)
686
doADCS[j](ptr, pDataBlock, pObjectType, update_every);
687
}
688
src/collectors/windows.plugin/perflib-adfs.c
+1
-1
@@ -453,7 +453,7 @@ void netdata_adfs_db_config_query_time_seconds(
453
"seconds/s",
454
PLUGIN_WINDOWS_NAME,
455
"PerflibADFS",
456
- PRIO_ADFS_DB_CONFIG_QUERY_TYME_SECONDS_TOTAL,
456
+ PRIO_ADFS_DB_CONFIG_QUERY_TIME_SECONDS_TOTAL,
457
update_every,
458
RRDSET_TYPE_LINE);
459
src/collectors/windows.plugin/perflib-exchange.c
+87
-83
@@ -229,7 +229,7 @@ static void netdata_exchange_active_ping_cmd(COUNTER_DATA *value, int update_eve
229
RRDSET_TYPE_LINE);
230
231
rd_exchange_active_ping_cmds =
232
- rrddim_add(st_exchange_active_ping_cmds, "pending", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
232
+ rrddim_add(st_exchange_active_ping_cmds, "pending", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
233
}
234
235
rrddim_set_by_pointer(
@@ -693,18 +693,18 @@ static void netdata_exchange_proxy_mailbox_server_locator(struct exchange_proxy
693
snprintfz(id, RRD_ID_LENGTH_MAX, "exchange_proxy_%s_mailbox_server_locator_avg_latency_sec", proxy);
694
695
ep->st_exchange_http_proxy_server_location_avg_latency = rrdset_create_localhost(
696
- "exchange",
697
- id,
698
- NULL,
699
- "proxy",
700
- "exchange.http_proxy_mailbox_server_locator_avg_latency_sec",
701
- "Average latency of MailboxServerLocator web service calls.",
702
- "seconds",
703
- PLUGIN_WINDOWS_NAME,
704
- "PerflibExchange",
705
- PRIO_EXCHANGE_PROXY_SERVER_LOCATOR_AVG_LATENCY,
706
- update_every,
707
- RRDSET_TYPE_LINE);
696
+ "exchange",
697
+ id,
698
+ NULL,
699
+ "proxy",
700
+ "exchange.http_proxy_mailbox_server_locator_avg_latency_sec",
701
+ "Average latency of MailboxServerLocator web service calls.",
702
+ "seconds",
703
+ PLUGIN_WINDOWS_NAME,
704
+ "PerflibExchange",
705
+ PRIO_EXCHANGE_PROXY_SERVER_LOCATOR_AVG_LATENCY,
706
+ update_every,
707
+ RRDSET_TYPE_LINE);
708
709
ep->rd_exchange_http_proxy_server_location_avg_latency = rrddim_add(
710
ep->st_exchange_http_proxy_server_location_avg_latency, "latency", NULL, 1, 1000, RRD_ALGORITHM_ABSOLUTE);
@@ -761,18 +761,18 @@ static void netdata_exchange_proxy_request_total(struct exchange_proxy *ep, char
761
snprintfz(id, RRD_ID_LENGTH_MAX, "exchange_proxy_%s_requests_total", proxy);
762
763
ep->st_exchange_http_proxy_requests_total = rrdset_create_localhost(
764
- "exchange",
765
- id,
766
- NULL,
767
- "proxy",
768
- "exchange.http_proxy_requests",
769
- "Number of proxy requests processed each second.",
770
- "requests",
771
- PLUGIN_WINDOWS_NAME,
772
- "PerflibExchange",
773
- PRIO_EXCHANGE_PROXY_REQUESTS_TOTAL,
774
- update_every,
775
- RRDSET_TYPE_LINE);
764
+ "exchange",
765
+ id,
766
+ NULL,
767
+ "proxy",
768
+ "exchange.http_proxy_requests",
769
+ "Number of proxy requests processed each second.",
770
+ "requests",
771
+ PLUGIN_WINDOWS_NAME,
772
+ "PerflibExchange",
773
+ PRIO_EXCHANGE_PROXY_REQUESTS_TOTAL,
774
+ update_every,
775
+ RRDSET_TYPE_LINE);
776
777
ep->rd_exchange_http_proxy_requests_total =
778
rrddim_add(ep->st_exchange_http_proxy_requests_total, "requests", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
@@ -912,7 +912,7 @@ static void netdata_exchange_workload_queued_tasks(struct exchange_workload *ew,
912
RRDSET_TYPE_LINE);
913
914
ew->rd_exchange_workload_queued_tasks =
915
- rrddim_add(ew->st_exchange_workload_queued_tasks, "queued", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
915
+ rrddim_add(ew->st_exchange_workload_queued_tasks, "queued", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
916
917
rrdlabels_add(ew->st_exchange_workload_queued_tasks->rrdlabels, "workload", workload, RRDLABEL_SRC_AUTO);
918
}
@@ -1068,7 +1068,8 @@ static void netdata_exchange_queue_active_mailbox(struct exchange_queue *eq, cha
1068
rrdset_done(eq->st_exchange_queue_active_mailbox);
1069
}
1070
1071
-static void netdata_exchange_queue_external_active_remote_delivery(struct exchange_queue *eq, char *mailbox, int update_every)
1071
+static void
1072
+netdata_exchange_queue_external_active_remote_delivery(struct exchange_queue *eq, char *mailbox, int update_every)
1073
{
1074
if (unlikely(!eq->st_exchange_queue_external_active_remote_delivery)) {
1075
char id[RRD_ID_LENGTH_MAX + 1];
@@ -1088,10 +1089,11 @@ static void netdata_exchange_queue_external_active_remote_delivery(struct exchan
1089
update_every,
1090
RRDSET_TYPE_LINE);
1091
1091
- eq->rd_exchange_queue_external_active_remote_delivery =
1092
- rrddim_add(eq->st_exchange_queue_external_active_remote_delivery, "active", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1092
+ eq->rd_exchange_queue_external_active_remote_delivery = rrddim_add(
1093
+ eq->st_exchange_queue_external_active_remote_delivery, "active", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1094
1094
- rrdlabels_add(eq->st_exchange_queue_external_active_remote_delivery->rrdlabels, "mailbox", mailbox, RRDLABEL_SRC_AUTO);
1095
+ rrdlabels_add(
1096
+ eq->st_exchange_queue_external_active_remote_delivery->rrdlabels, "mailbox", mailbox, RRDLABEL_SRC_AUTO);
1097
}
1098
1099
rrddim_set_by_pointer(
@@ -1101,36 +1103,38 @@ static void netdata_exchange_queue_external_active_remote_delivery(struct exchan
1103
rrdset_done(eq->st_exchange_queue_external_active_remote_delivery);
1104
}
1105
1104
-static void netdata_exchange_queue_internal_active_remote_delivery(struct exchange_queue *eq, char *mailbox, int update_every)
1106
+static void
1107
+netdata_exchange_queue_internal_active_remote_delivery(struct exchange_queue *eq, char *mailbox, int update_every)
1108
{
1109
if (unlikely(!eq->st_exchange_queue_internal_active_remote_delivery)) {
1110
char id[RRD_ID_LENGTH_MAX + 1];
1111
snprintfz(id, RRD_ID_LENGTH_MAX, "exchange_transport_queues_%s_internal_active_remote_delivery", mailbox);
1112
1113
eq->st_exchange_queue_internal_active_remote_delivery = rrdset_create_localhost(
1111
- "exchange",
1112
- id,
1113
- NULL,
1114
- "queue",
1115
- "exchange.transport_queues_internal_active_remote_delivery",
1116
- "Internal Active Remote Delivery Queue length.",
1117
- "messages",
1118
- PLUGIN_WINDOWS_NAME,
1119
- "PerflibExchange",
1120
- PRIO_EXCHANGE_QUEUE_INTERNAL_ACTIVE_REMOTE_DELIVERY,
1121
- update_every,
1122
- RRDSET_TYPE_LINE);
1123
-
1124
- eq->rd_exchange_queue_internal_active_remote_delivery =
1125
- rrddim_add(eq->st_exchange_queue_internal_active_remote_delivery, "active", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1126
-
1127
- rrdlabels_add(eq->st_exchange_queue_internal_active_remote_delivery->rrdlabels, "mailbox", mailbox, RRDLABEL_SRC_AUTO);
1114
+ "exchange",
1115
+ id,
1116
+ NULL,
1117
+ "queue",
1118
+ "exchange.transport_queues_internal_active_remote_delivery",
1119
+ "Internal Active Remote Delivery Queue length.",
1120
+ "messages",
1121
+ PLUGIN_WINDOWS_NAME,
1122
+ "PerflibExchange",
1123
+ PRIO_EXCHANGE_QUEUE_INTERNAL_ACTIVE_REMOTE_DELIVERY,
1124
+ update_every,
1125
+ RRDSET_TYPE_LINE);
1126
+
1127
+ eq->rd_exchange_queue_internal_active_remote_delivery = rrddim_add(
1128
+ eq->st_exchange_queue_internal_active_remote_delivery, "active", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1129
+
1130
+ rrdlabels_add(
1131
+ eq->st_exchange_queue_internal_active_remote_delivery->rrdlabels, "mailbox", mailbox, RRDLABEL_SRC_AUTO);
1132
}
1133
1134
rrddim_set_by_pointer(
1131
- eq->st_exchange_queue_internal_active_remote_delivery,
1132
- eq->rd_exchange_queue_internal_active_remote_delivery,
1133
- (collected_number)eq->exchangeTransportQueuesInternalActiveRemoteDelivery.current.Data);
1135
+ eq->st_exchange_queue_internal_active_remote_delivery,
1136
+ eq->rd_exchange_queue_internal_active_remote_delivery,
1137
+ (collected_number)eq->exchangeTransportQueuesInternalActiveRemoteDelivery.current.Data);
1138
rrdset_done(eq->st_exchange_queue_internal_active_remote_delivery);
1139
}
1140
@@ -1141,29 +1145,29 @@ static void netdata_exchange_queue_unreachable(struct exchange_queue *eq, char *
1145
snprintfz(id, RRD_ID_LENGTH_MAX, "exchange_transport_queues_%s_unreachable", mailbox);
1146
1147
eq->st_exchange_queue_unreachable = rrdset_create_localhost(
1144
- "exchange",
1145
- id,
1146
- NULL,
1147
- "queue",
1148
- "exchange.transport_queues_unreachable",
1149
- "Unreachable Queue length.",
1150
- "messages",
1151
- PLUGIN_WINDOWS_NAME,
1152
- "PerflibExchange",
1153
- PRIO_EXCHANGE_QUEUE_UNREACHABLE,
1154
- update_every,
1155
- RRDSET_TYPE_LINE);
1148
+ "exchange",
1149
+ id,
1150
+ NULL,
1151
+ "queue",
1152
+ "exchange.transport_queues_unreachable",
1153
+ "Unreachable Queue length.",
1154
+ "messages",
1155
+ PLUGIN_WINDOWS_NAME,
1156
+ "PerflibExchange",
1157
+ PRIO_EXCHANGE_QUEUE_UNREACHABLE,
1158
+ update_every,
1159
+ RRDSET_TYPE_LINE);
1160
1161
eq->rd_exchange_queue_unreachable =
1158
- rrddim_add(eq->st_exchange_queue_unreachable, "unreachable", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1162
+ rrddim_add(eq->st_exchange_queue_unreachable, "unreachable", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1163
1164
rrdlabels_add(eq->st_exchange_queue_unreachable->rrdlabels, "mailbox", mailbox, RRDLABEL_SRC_AUTO);
1165
}
1166
1167
rrddim_set_by_pointer(
1164
- eq->st_exchange_queue_unreachable,
1165
- eq->rd_exchange_queue_unreachable,
1166
- (collected_number)eq->exchangeTransportQueuesUnreachable.current.Data);
1168
+ eq->st_exchange_queue_unreachable,
1169
+ eq->rd_exchange_queue_unreachable,
1170
+ (collected_number)eq->exchangeTransportQueuesUnreachable.current.Data);
1171
rrdset_done(eq->st_exchange_queue_unreachable);
1172
}
1173
@@ -1174,29 +1178,29 @@ static void netdata_exchange_queue_poison(struct exchange_queue *eq, char *mailb
1178
snprintfz(id, RRD_ID_LENGTH_MAX, "exchange_transport_queues_%s_poison", mailbox);
1179
1180
eq->st_exchange_queue_poison = rrdset_create_localhost(
1177
- "exchange",
1178
- id,
1179
- NULL,
1180
- "queue",
1181
- "exchange.transport_queues_poison",
1182
- "Poison Queue Length.",
1183
- "messages",
1184
- PLUGIN_WINDOWS_NAME,
1185
- "PerflibExchange",
1186
- PRIO_EXCHANGE_QUEUE_POISON,
1187
- update_every,
1188
- RRDSET_TYPE_LINE);
1181
+ "exchange",
1182
+ id,
1183
+ NULL,
1184
+ "queue",
1185
+ "exchange.transport_queues_poison",
1186
+ "Poison Queue Length.",
1187
+ "messages",
1188
+ PLUGIN_WINDOWS_NAME,
1189
+ "PerflibExchange",
1190
+ PRIO_EXCHANGE_QUEUE_POISON,
1191
+ update_every,
1192
+ RRDSET_TYPE_LINE);
1193
1194
eq->rd_exchange_queue_poison =
1191
- rrddim_add(eq->st_exchange_queue_poison, "poison", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1195
+ rrddim_add(eq->st_exchange_queue_poison, "poison", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
1196
1197
rrdlabels_add(eq->st_exchange_queue_poison->rrdlabels, "mailbox", mailbox, RRDLABEL_SRC_AUTO);
1198
}
1199
1200
rrddim_set_by_pointer(
1197
- eq->st_exchange_queue_poison,
1198
- eq->rd_exchange_queue_poison,
1199
- (collected_number)eq->exchangeTransportQueuesPoison.current.Data);
1201
+ eq->st_exchange_queue_poison,
1202
+ eq->rd_exchange_queue_poison,
1203
+ (collected_number)eq->exchangeTransportQueuesPoison.current.Data);
1204
rrdset_done(eq->st_exchange_queue_poison);
1205
}
1206
src/collectors/windows.plugin/perflib-hyperv.c
+11
-11
@@ -379,7 +379,7 @@ struct hypervisor_root_partition {
379
RRDSET *st_IOTLBFlushesSec;
380
RRDSET *st_AddressSpaces;
381
RRDSET *st_VirtualTLBPages;
382
- RRDSET *st_VirtualTLBFlushEntiresSec;
382
+ RRDSET *st_VirtualTLBFlushEntriesSec;
383
384
DEFINE_RD(DeviceSpacePages4K);
385
DEFINE_RD(DeviceSpacePages2M);
@@ -398,7 +398,7 @@ struct hypervisor_root_partition {
398
DEFINE_RD(IOTLBFlushesSec);
399
DEFINE_RD(AddressSpaces);
400
DEFINE_RD(VirtualTLBPages);
401
- DEFINE_RD(VirtualTLBFlushEntiresSec);
401
+ DEFINE_RD(VirtualTLBFlushEntriesSec);
402
403
COUNTER_DATA DeviceSpacePages4K;
404
COUNTER_DATA DeviceSpacePages2M;
@@ -415,7 +415,7 @@ struct hypervisor_root_partition {
415
COUNTER_DATA IOTLBFlushesSec;
416
COUNTER_DATA AddressSpaces;
417
COUNTER_DATA VirtualTLBPages;
418
- COUNTER_DATA VirtualTLBFlushEntiresSec;
418
+ COUNTER_DATA VirtualTLBFlushEntriesSec;
419
};
420
421
// Initialize the keys for the root partition metrics
@@ -439,7 +439,7 @@ void initialize_hyperv_root_partition_keys(struct hypervisor_root_partition *p)
439
p->IOTLBFlushesSec.key = "I/O TLB Flushes/sec";
440
p->AddressSpaces.key = "Address Spaces";
441
p->VirtualTLBPages.key = "Virtual TLB Pages";
442
- p->VirtualTLBFlushEntiresSec.key = "Virtual TLB Flush Entries/sec";
442
+ p->VirtualTLBFlushEntriesSec.key = "Virtual TLB Flush Entries/sec";
443
}
444
445
// Callback function for inserting root partition metrics into the dictionary
@@ -496,7 +496,7 @@ static bool do_hyperv_root_partition(PERF_DATA_BLOCK *pDataBlock, int update_eve
496
GET_INSTANCE_COUNTER(IOTLBFlushesSec);
497
GET_INSTANCE_COUNTER(AddressSpaces);
498
GET_INSTANCE_COUNTER(VirtualTLBPages);
499
- GET_INSTANCE_COUNTER(VirtualTLBFlushEntiresSec);
499
+ GET_INSTANCE_COUNTER(VirtualTLBFlushEntriesSec);
500
501
// Create charts
502
if (!p->charts_created) {
@@ -689,13 +689,13 @@ static bool do_hyperv_root_partition(PERF_DATA_BLOCK *pDataBlock, int update_eve
689
690
p->rd_VirtualTLBPages = rrddim_add(p->st_VirtualTLBPages, "used", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
691
692
- p->st_VirtualTLBFlushEntiresSec = rrdset_create_localhost(
692
+ p->st_VirtualTLBFlushEntriesSec = rrdset_create_localhost(
693
"root_partition_virtual_tlb_flush_entries",
694
windows_shared_buffer,
695
NULL,
696
HYPERV,
697
HYPERV ".root_partition_virtual_tlb_flush_entries",
698
- "Root partition flushes of the entire virtual TLB",
698
+ "Root partition flushes of entire virtual TLB",
699
"flushes/s",
700
_COMMON_PLUGIN_NAME,
701
_COMMON_PLUGIN_MODULE_NAME,
@@ -703,8 +703,8 @@ static bool do_hyperv_root_partition(PERF_DATA_BLOCK *pDataBlock, int update_eve
703
update_every,
704
RRDSET_TYPE_LINE);
705
706
- p->rd_VirtualTLBFlushEntiresSec =
707
- rrddim_add(p->st_VirtualTLBFlushEntiresSec, "flushes", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
706
+ p->rd_VirtualTLBFlushEntriesSec =
707
+ rrddim_add(p->st_VirtualTLBFlushEntriesSec, "flushes", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
708
}
709
710
// Set the data for each dimension
@@ -728,7 +728,7 @@ static bool do_hyperv_root_partition(PERF_DATA_BLOCK *pDataBlock, int update_eve
728
SETP_DIM_VALUE(st_IOTLBFlushesSec, IOTLBFlushesSec);
729
SETP_DIM_VALUE(st_AddressSpaces, AddressSpaces);
730
SETP_DIM_VALUE(st_VirtualTLBPages, VirtualTLBPages);
731
- SETP_DIM_VALUE(st_VirtualTLBFlushEntiresSec, VirtualTLBFlushEntiresSec);
731
+ SETP_DIM_VALUE(st_VirtualTLBFlushEntriesSec, VirtualTLBFlushEntriesSec);
732
733
// Mark the charts as done
734
rrdset_done(p->st_device_space_pages);
@@ -742,7 +742,7 @@ static bool do_hyperv_root_partition(PERF_DATA_BLOCK *pDataBlock, int update_eve
742
rrdset_done(p->st_AddressSpaces);
743
rrdset_done(p->st_DeviceDMAErrors);
744
rrdset_done(p->st_VirtualTLBPages);
745
- rrdset_done(p->st_VirtualTLBFlushEntiresSec);
745
+ rrdset_done(p->st_VirtualTLBFlushEntriesSec);
746
}
747
748
return true;
src/collectors/windows.plugin/windows_plugin.c
+5
-2
@@ -60,11 +60,14 @@ static struct proc_module {
60
.dim = "PerflibServices",
61
.enabled = CONFIG_BOOLEAN_YES,
62
.update_every = 30 * UPDATE_EVERY_MIN,
63
- .func = do_GetServicesStatus},
63
+ .func = do_GetServicesStatus,
64
+ .rd = NULL,
65
+ .thread = NULL,
66
+ .cleanup = do_GetServicesStatus_cleanup},
67
68
// the same is provided by PerflibProcessor, with more detailed analysis
69
//{.name = "GetSystemCPU", .dim = "GetSystemCPU", .enabled = CONFIG_BOOLEAN_YES,
67
- // .update_every = UPDATE_EVERY_MIN, .func = do_GetSystemCPU},
70
+ // .update_every = UPDATE_EVERY_MIN, .func = do_GetSystemCPU, .cleanup = do_GetSystemCPU_cleanup},
71
72
{.name = "PerflibProcesses",
73
.dim = "PerflibProcesses",
src/collectors/windows.plugin/windows_plugin.h
+10
-9
@@ -55,15 +55,17 @@ int do_PerflibASP(int update_every, usec_t dt __maybe_unused);
55
void do_PerflibMSSQL_cleanup();
56
void do_GetHardwareInfo_cleanup();
57
void do_Sensors_cleanup();
58
+void do_GetServicesStatus_cleanup();
59
+void do_GetSystemCPU_cleanup();
60
61
enum MSSQL_REPLICATION_WARNINGS {
60
- MSSQL_REPLICATON_EXPIRATION = 1<<0,
61
- MSSQL_REPLICATON_LATENCY = 1<<1,
62
- MSSQL_REPLICATON_MERGEEXPIRATION = 1<<2,
63
- MSSQL_REPLICATON_MERGEFASTDURATION = 1<<3,
64
- MSSQL_REPLICATON_MERGELOWDURATION = 1<<4,
65
- MSSQL_REPLICATON_MERGEFASTRUNSPEED = 1<<5,
66
- MSSQL_REPLICATON_MERGELOWRUNSPEED = 1<<6
62
+ MSSQL_REPLICATON_EXPIRATION = 1 << 0,
63
+ MSSQL_REPLICATON_LATENCY = 1 << 1,
64
+ MSSQL_REPLICATON_MERGEEXPIRATION = 1 << 2,
65
+ MSSQL_REPLICATON_MERGEFASTDURATION = 1 << 3,
66
+ MSSQL_REPLICATON_MERGELOWDURATION = 1 << 4,
67
+ MSSQL_REPLICATON_MERGEFASTRUNSPEED = 1 << 5,
68
+ MSSQL_REPLICATON_MERGELOWRUNSPEED = 1 << 6
69
};
70
71
enum PERFLIB_PRIO {
@@ -213,7 +215,6 @@ enum PERFLIB_PRIO {
215
PRIO_AD_CACHE_HITS_TOTAL,
216
PRIO_AD_REPLICATION_INTRASITE_COMPRESSED,
217
PRIO_AD_REPLICATION_INTERSITE_COMPRESSED,
216
- PRIO_AD_SYNC_OBJECTS_REMAINING,
218
PRIO_AD_REPLICATION_PROPERTY_UPDATED,
219
PRIO_AD_REPLICATION_PROPERTY_FILTERED,
220
PRIO_AD_SYNC_PENDING,
@@ -244,7 +245,7 @@ enum PERFLIB_PRIO {
245
PRIO_ADFS_DB_ARTIFACT_FAILURE_TOTAL,
246
PRIO_ADFS_DB_ARTIFACT_QUERY_TIME_SECONDS_TOTAL,
247
PRIO_ADFS_DB_CONFIG_FAILURE_TOTAL,
247
- PRIO_ADFS_DB_CONFIG_QUERY_TYME_SECONDS_TOTAL,
248
+ PRIO_ADFS_DB_CONFIG_QUERY_TIME_SECONDS_TOTAL,
249
PRIO_ADFS_DEVICE_AUTHENTICATIONS_TOTAL,
250
PRIO_ADFS_EXTERNAL_AUTHENTICATION_TOTAL,
251
PRIO_ADFS_FEDERATION_AUTHENTICATION_TOTAL,