ADFS (windows.plugin) (#19699)
thiagoftsm committed
Mar 8, 2025 at 15:26 UTC
556318463f04d7007fe83f8724d1daec0aeb82a3
5 files changed
+1808
-1
CMakeLists.txt
+1
@@ -1866,6 +1866,7 @@ set(WINDOWS_PLUGIN_FILES
1866
src/collectors/windows.plugin/GetSystemRAM.c
1867
src/collectors/windows.plugin/GetSystemCPU.c
1868
src/collectors/windows.plugin/perflib-adcs.c
1869
+ src/collectors/windows.plugin/perflib-adfs.c
1870
src/collectors/windows.plugin/perflib-rrd.c
1871
src/collectors/windows.plugin/perflib-rrd.h
1872
src/collectors/windows.plugin/perflib-ad.c
src/collectors/windows.plugin/metadata.yaml
+278
@@ -2397,3 +2397,281 @@ modules:
2397
chart_type: line
2398
dimensions:
2399
- name: processing_time
2400
+ - meta:
2401
+ plugin_name: windows.plugin
2402
+ module_name: PerflibADFS
2403
+ monitored_instance:
2404
+ name: Active Directory Federation Service
2405
+ link: "https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/ad-fs-overview"
2406
+ categories:
2407
+ - data-collection.windows-systems
2408
+ icon_filename: "windows.svg"
2409
+ related_resources:
2410
+ integrations:
2411
+ list: []
2412
+ info_provided_to_referring_integrations:
2413
+ description: ""
2414
+ keywords:
2415
+ - windows
2416
+ - microsoft
2417
+ - active directory
2418
+ - adfs
2419
+ - ad
2420
+ most_popular: false
2421
+ overview:
2422
+ data_collection:
2423
+ metrics_description: |
2424
+ This collector monitors Active Directory Federation Services statistics.
2425
+ method_description: |
2426
+ It queries 'AD FS' object from Perflib in order to gather the metrics.
2427
+ supported_platforms:
2428
+ include: ["windows"]
2429
+ exclude: []
2430
+ multi_instance: false
2431
+ additional_permissions:
2432
+ description: ""
2433
+ default_behavior:
2434
+ auto_detection:
2435
+ description: |
2436
+ The collector automatically detects all of the metrics, no further configuration is required.
2437
+ limits:
2438
+ description: ""
2439
+ performance_impact:
2440
+ description: ""
2441
+ setup:
2442
+ prerequisites:
2443
+ list: []
2444
+ configuration:
2445
+ file:
2446
+ name: "netdata.conf"
2447
+ section_name: "[plugin:windows]"
2448
+ description: "The Netdata main configuration file"
2449
+ options:
2450
+ description: ""
2451
+ folding:
2452
+ title: "Config option"
2453
+ enabled: false
2454
+ list:
2455
+ - name: PerflibADFS
2456
+ description: An option to enable or disable the data collection.
2457
+ default_value: yes
2458
+ required: false
2459
+ examples:
2460
+ folding:
2461
+ enabled: true
2462
+ title: ""
2463
+ list: []
2464
+ troubleshooting:
2465
+ problems:
2466
+ list: []
2467
+ alerts: []
2468
+ metrics:
2469
+ folding:
2470
+ title: Metrics
2471
+ enabled: false
2472
+ description: ""
2473
+ availability: []
2474
+ scopes:
2475
+ - name: Federation Service
2476
+ description: "These metrics refer to the Federated Identity and Access Management on host."
2477
+ labels: []
2478
+ metrics:
2479
+ - name: adfs.ad_login_connection_failures
2480
+ description: Connection failures
2481
+ unit: failures/s
2482
+ chart_type: line
2483
+ dimensions:
2484
+ - name: connection
2485
+ - name: adfs.certificate_authentications
2486
+ description: User Certificate authentications
2487
+ unit: authentications/s
2488
+ chart_type: line
2489
+ dimensions:
2490
+ - name: authentications
2491
+ - name: adfs.db_artifact_failures
2492
+ description: Connection failures to the artifact database
2493
+ unit: failures/s
2494
+ chart_type: line
2495
+ dimensions:
2496
+ - name: connection
2497
+ - name: adfs.db_artifact_query_time_seconds
2498
+ description: Time taken for an artifact database query
2499
+ unit: seconds/s
2500
+ chart_type: line
2501
+ dimensions:
2502
+ - name: query_time
2503
+ - name: adfs.db_config_failures
2504
+ description: Connection failures to the configuration database
2505
+ unit: failures/s
2506
+ chart_type: line
2507
+ dimensions:
2508
+ - name: connection
2509
+ - name: adfs.db_config_query_time_seconds
2510
+ description: Time taken for a configuration database query
2511
+ unit: seconds/s
2512
+ chart_type: line
2513
+ dimensions:
2514
+ - name: query_time
2515
+ - name: adfs.device_authentications
2516
+ description: Device authentications
2517
+ unit: authentications/s
2518
+ chart_type: line
2519
+ dimensions:
2520
+ - name: authentications
2521
+ - name: adfs.external_authentications
2522
+ description: Authentications from external MFA providers
2523
+ unit: authentications/s
2524
+ chart_type: line
2525
+ dimensions:
2526
+ - name: success
2527
+ - name: failure
2528
+ - name: adfs.federated_authentications
2529
+ description: Authentications from Federated Sources
2530
+ unit: authentications/s
2531
+ chart_type: line
2532
+ dimensions:
2533
+ - name: authentications
2534
+ - name: adfs.federation_metadata_requests
2535
+ description: Federation Metadata requests
2536
+ unit: requests/s
2537
+ chart_type: line
2538
+ dimensions:
2539
+ - name: requests
2540
+ - name: adfs.oauth_authorization_requests
2541
+ description: Incoming requests to the OAuth Authorization endpoint
2542
+ unit: requests/s
2543
+ chart_type: line
2544
+ dimensions:
2545
+ - name: requests
2546
+ - name: adfs.oauth_client_authentications
2547
+ description: OAuth client credentials requests
2548
+ unit: authentications/s
2549
+ chart_type: line
2550
+ dimensions:
2551
+ - name: success
2552
+ - name: failure
2553
+ - name: adfs.oauth_client_credentials_requests
2554
+ description: OAuth client credentials requests
2555
+ unit: requests/s
2556
+ chart_type: line
2557
+ dimensions:
2558
+ - name: success
2559
+ - name: failure
2560
+ - name: adfs.oauth_client_privkey_jwt_authentications
2561
+ description: OAuth client private key JWT authentications
2562
+ unit: authentications/s
2563
+ chart_type: line
2564
+ dimensions:
2565
+ - name: success
2566
+ - name: failure
2567
+ - name: adfs.oauth_client_secret_basic_authentications
2568
+ description: OAuth client secret basic authentications
2569
+ unit: authentications/s
2570
+ chart_type: line
2571
+ dimensions:
2572
+ - name: success
2573
+ - name: failure
2574
+ - name: adfs.oauth_client_secret_basic_authentications
2575
+ description: OAuth client secret basic authentications
2576
+ unit: authentications/s
2577
+ chart_type: line
2578
+ dimensions:
2579
+ - name: success
2580
+ - name: failure
2581
+ - name: adfs.oauth_client_secret_post_authentications
2582
+ description: OAuth client secret post authentications
2583
+ unit: authentications/s
2584
+ chart_type: line
2585
+ dimensions:
2586
+ - name: success
2587
+ - name: failure
2588
+ - name: adfs.oauth_client_windows_authentications
2589
+ description: OAuth client windows integrated authentications
2590
+ unit: requests/s
2591
+ chart_type: line
2592
+ dimensions:
2593
+ - name: success
2594
+ - name: failure
2595
+ - name: adfs.oauth_logon_certificate_requests
2596
+ description: OAuth logon certificate requests
2597
+ unit: requests/s
2598
+ chart_type: line
2599
+ dimensions:
2600
+ - name: success
2601
+ - name: failure
2602
+ - name: adfs.oauth_password_grant_requests
2603
+ description: OAuth password grant requests
2604
+ unit: requests/s
2605
+ chart_type: line
2606
+ dimensions:
2607
+ - name: success
2608
+ - name: failure
2609
+ - name: adfs.oauth_token_requests_success
2610
+ description: Successful RP token requests over OAuth protocol
2611
+ unit: requests/s
2612
+ chart_type: line
2613
+ dimensions:
2614
+ - name: success
2615
+ - name: adfs.passive_requests
2616
+ description: Passive requests
2617
+ unit: requests/s
2618
+ chart_type: line
2619
+ dimensions:
2620
+ - name: passive
2621
+ - name: adfs.passport_authentications
2622
+ description: Microsoft Passport SSO authentications
2623
+ unit: authentications/s
2624
+ chart_type: line
2625
+ dimensions:
2626
+ - name: passport
2627
+ - name: adfs.password_change_requests
2628
+ description: Password change requests
2629
+ unit: requests/s
2630
+ chart_type: line
2631
+ dimensions:
2632
+ - name: success
2633
+ - name: failure
2634
+ - name: adfs.samlp_token_requests_success
2635
+ description: Successful RP token requests over SAML-P protocol
2636
+ unit: requests/s
2637
+ chart_type: line
2638
+ dimensions:
2639
+ - name: success
2640
+ - name: adfs.sso_authentications
2641
+ description: SSO authentications
2642
+ unit: authentications/s
2643
+ chart_type: line
2644
+ dimensions:
2645
+ - name: success
2646
+ - name: failure
2647
+ - name: adfs.token_requests
2648
+ description: Token access requests
2649
+ unit: requests/s
2650
+ chart_type: line
2651
+ dimensions:
2652
+ - name: requests
2653
+ - name: adfs.userpassword_authentications
2654
+ description: AD U/P authentications
2655
+ unit: authentications/s
2656
+ chart_type: line
2657
+ dimensions:
2658
+ - name: success
2659
+ - name: failure
2660
+ - name: adfs.windows_integrated_authentications
2661
+ description: Windows integrated authentications using Kerberos or NTLM
2662
+ unit: authentications/s
2663
+ chart_type: line
2664
+ dimensions:
2665
+ - name: authentications
2666
+ - name: adfs.wsfed_token_requests_success
2667
+ description: Successful RP token requests over WS-Fed protocol
2668
+ unit: requests/s
2669
+ chart_type: line
2670
+ dimensions:
2671
+ - name: success
2672
+ - name: adfs.wstrust_token_requests_success
2673
+ description: Successful RP token requests over WS-Trust protocol
2674
+ unit: requests/s
2675
+ chart_type: line
2676
+ dimensions:
2677
+ - name: success
\ No newline at end of file
src/collectors/windows.plugin/perflib-adfs.c
new
+1496
@@ -0,0 +1,1496 @@
1
+// SPDX-License-Identifier: GPL-3.0-or-later
2
+
3
+#include "windows_plugin.h"
4
+#include "windows-internals.h"
5
+
6
+struct adfs_certificate {
7
+ bool charts_created;
8
+
9
+ // AD/ADFS
10
+ RRDSET *st_adfs_login_connection_failures;
11
+ RRDDIM *rd_adfs_login_connection_failures;
12
+
13
+ RRDSET *st_adfs_certificate_authentications_total;
14
+ RRDDIM *rd_adfs_certificate_authentications_total;
15
+
16
+ // DB Artifacts
17
+ RRDSET *st_adfs_db_artifact_failure_total;
18
+ RRDDIM *rd_adfs_db_artifact_failure_total;
19
+
20
+ RRDSET *st_adfs_db_artifact_query_time_seconds_total;
21
+ RRDDIM *rd_adfs_db_artifact_query_time_seconds_total;
22
+
23
+ // DB Config
24
+ RRDSET *st_adfs_db_config_failures;
25
+ RRDDIM *rd_adfs_db_config_failures;
26
+
27
+ RRDSET *st_adfs_db_config_query_time_seconds_total;
28
+ RRDDIM *rd_adfs_db_config_query_time_seconds_total;
29
+
30
+ // Auth
31
+ RRDSET *st_adfs_device_authentications_total;
32
+ RRDDIM *rd_adfs_device_authentications_total;
33
+
34
+ RRDSET *st_adfs_external_authentications;
35
+ RRDDIM *rd_adfs_external_authentications_success;
36
+ RRDDIM *rd_adfs_external_authentications_failure;
37
+
38
+ RRDSET *st_adfs_federation_authentications;
39
+ RRDDIM *rd_adfs_federation_authentications;
40
+
41
+ RRDSET *st_adfs_federation_metadata_authentications;
42
+ RRDDIM *rd_adfs_federation_metadata_authentications;
43
+
44
+ // OAuth
45
+ RRDSET *st_adfs_oauth_authorization_requests_total;
46
+ RRDDIM *rd_adfs_oauth_authorization_requests_total;
47
+
48
+ RRDSET *st_adfs_oauth_client_authentications;
49
+ RRDDIM *rd_adfs_oauth_client_authentications_success;
50
+ RRDDIM *rd_adfs_oauth_client_authentications_failure;
51
+
52
+ RRDSET *st_adfs_oauth_client_credentials_requests;
53
+ RRDDIM *rd_adfs_oauth_client_credentials_requests_success;
54
+ RRDDIM *rd_adfs_oauth_client_credentials_requests_failure;
55
+
56
+ RRDSET *st_adfs_oauth_client_privkey_jwt_authentications;
57
+ RRDDIM *rd_adfs_oauth_client_privkey_jwt_authentications_success;
58
+ RRDDIM *rd_adfs_oauth_client_privkey_jwt_authentications_failure;
59
+
60
+ RRDSET *st_adfs_oauth_client_secret_basic_authentications;
61
+ RRDDIM *rd_adfs_oauth_client_secret_basic_authentications_success;
62
+ RRDDIM *rd_adfs_oauth_client_secret_basic_authentications_failure;
63
+
64
+ RRDSET *st_adfs_oauth_client_secret_post_authentications;
65
+ RRDDIM *rd_adfs_oauth_client_secret_post_authentications_success;
66
+ RRDDIM *rd_adfs_oauth_client_secret_post_authentications_failure;
67
+
68
+ RRDSET *st_adfs_oauth_client_windows_authentications;
69
+ RRDDIM *rd_adfs_oauth_client_windows_authentications_success_total;
70
+ RRDDIM *rd_adfs_oauth_client_windows_authentications_failure_total;
71
+
72
+ RRDSET *st_adfs_oauth_logon_certificate_requests;
73
+ RRDDIM *rd_adfs_oauth_logon_certificate_requests_success_total;
74
+ RRDDIM *rd_adfs_oauth_logon_certificate_requests_failure_total;
75
+
76
+ RRDSET *st_adfs_oauth_password_grant_requests;
77
+ RRDDIM *rd_adfs_oauth_password_grant_requests_success;
78
+ RRDDIM *rd_adfs_oauth_password_grant_requests_failure;
79
+
80
+ RRDSET *st_adfs_oauth_token_requests_success;
81
+ RRDDIM *rd_adfs_oauth_token_requests_success;
82
+
83
+ // Requests
84
+ RRDSET *st_adfs_passive_requests_total;
85
+ RRDDIM *rd_adfs_passive_requests_total;
86
+
87
+ RRDSET *st_adfs_passport_authentications_total;
88
+ RRDDIM *rd_adfs_passport_authentications_total;
89
+
90
+ RRDSET *st_adfs_password_change_requests;
91
+ RRDDIM *rd_adfs_password_change_requests_success;
92
+ RRDDIM *rd_adfs_password_change_requests_failure;
93
+
94
+ RRDSET *st_adfs_samlp_token_requests_success_total;
95
+ RRDDIM *rd_adfs_samlp_token_requests_success_total;
96
+
97
+ RRDSET *st_adfs_wstrust_token_requests_success_total;
98
+ RRDDIM *rd_adfs_wstrust_token_requests_success_total;
99
+
100
+ RRDSET *st_adfs_sso_authentications;
101
+ RRDDIM *rd_adfs_sso_authentications_success;
102
+ RRDDIM *rd_adfs_sso_authentications_failure;
103
+
104
+ RRDSET *st_adfs_token_requests_total;
105
+ RRDDIM *rd_adfs_token_requests_total;
106
+
107
+ RRDSET *st_adfs_user_password_authentications;
108
+ RRDDIM *rd_adfs_user_password_authentications_success;
109
+ RRDDIM *rd_adfs_user_password_authentications_failure;
110
+
111
+ RRDSET *st_adfs_windows_integrated_authentications_total;
112
+ RRDDIM *rd_adfs_windows_integrated_authentications_total;
113
+
114
+ RRDSET *st_adfs_wsfed_token_requests_success_total;
115
+ RRDDIM *rd_adfs_wsfed_token_requests_success_total;
116
+
117
+ // AD/ADFS
118
+ COUNTER_DATA ADFSLoginConnectionFailure;
119
+ COUNTER_DATA ADFSCertificateAuthentications;
120
+
121
+ // DB Artifacts
122
+ COUNTER_DATA ADFSDBArtifactFailures;
123
+ COUNTER_DATA ADFSDBArtifactQueryTimeSeconds;
124
+
125
+ // DB Config
126
+ COUNTER_DATA ADFSDBConfigFailures;
127
+ COUNTER_DATA ADFSDBConfigQueryTimeSeconds;
128
+
129
+ // Auth
130
+ COUNTER_DATA ADFSDeviceAuthentications;
131
+ COUNTER_DATA ADFSExternalAuthenticationsSuccess;
132
+ COUNTER_DATA ADFSExternalAuthenticationsFailure;
133
+ COUNTER_DATA ADFSFederationAuthentications;
134
+ COUNTER_DATA ADFSFederationMetadataAuthentications;
135
+ COUNTER_DATA ADFSOauthAuthorizationRequests;
136
+
137
+ // OAUTH
138
+ COUNTER_DATA ADFSOauthClientAuthenticationsSuccess;
139
+ COUNTER_DATA ADFSOauthClientAuthenticationsFailure;
140
+ COUNTER_DATA ADFSOauthClientCredentialsSuccess;
141
+ COUNTER_DATA ADFSOauthClientCredentialsFailure;
142
+ COUNTER_DATA ADFSOauthClientPrivkeyJwtAuthenticationSuccess;
143
+ COUNTER_DATA ADFSOauthClientPrivkeyJwtAuthenticationFailure;
144
+ COUNTER_DATA ADFSOauthClientSecretBasicAuthenticationsSuccess;
145
+ COUNTER_DATA ADFSOauthClientSecretBasicAuthenticationsFailure;
146
+ COUNTER_DATA ADFSOauthClientSecretPostAuthenticationsSuccess;
147
+ COUNTER_DATA ADFSOauthClientSecretPostAuthenticationsFailure;
148
+ COUNTER_DATA ADFSOauthClientWindowsAuthenticationsSuccess;
149
+ COUNTER_DATA ADFSOauthClientWindowsAuthenticationsFailure;
150
+ COUNTER_DATA ADFSOauthLogonCertificateRequestsSuccess;
151
+ COUNTER_DATA ADFSOauthLogonCertificateRequestsFailure;
152
+ COUNTER_DATA ADFSOauthPasswordGrantRequestsSuccess;
153
+ COUNTER_DATA ADFSOauthPasswordGrantRequestsFailure;
154
+ COUNTER_DATA ADFSOauthTokenRequestsSuccess;
155
+
156
+ // Requests
157
+ COUNTER_DATA ADFSPassiveRequests;
158
+ COUNTER_DATA ADFSPassportAuthentications;
159
+ COUNTER_DATA ADFSPasswordChangeRequestsSuccess;
160
+ COUNTER_DATA ADFSPasswordChangeRequestsFailure;
161
+ COUNTER_DATA ADFSSAMLPTokenRequests;
162
+ COUNTER_DATA ADFSWSTrustTokenRequestsSuccess;
163
+ COUNTER_DATA ADFSSSOAuthenticationsSuccess;
164
+ COUNTER_DATA ADFSSSOAuthenticationsFailure;
165
+ COUNTER_DATA ADFSTokenRequests;
166
+ COUNTER_DATA ADFSUserPasswordAuthenticationsSuccess;
167
+ COUNTER_DATA ADFSUserPasswordAuthenticationsFailure;
168
+ COUNTER_DATA ADFSWindowsIntegratedAuthentications;
169
+ COUNTER_DATA ADFSWSFedTokenRequestsSuccess;
170
+} adfs = {
171
+ .charts_created = false,
172
+
173
+ // AD/ADFS
174
+ .st_adfs_login_connection_failures = NULL,
175
+ .st_adfs_certificate_authentications_total = NULL,
176
+
177
+ // DB Artifacts
178
+ .st_adfs_db_artifact_failure_total = NULL,
179
+ .st_adfs_db_artifact_query_time_seconds_total = NULL,
180
+
181
+ // DB Config
182
+ .st_adfs_db_config_failures = NULL,
183
+ .st_adfs_db_config_query_time_seconds_total = NULL,
184
+
185
+ // Auth
186
+ .st_adfs_device_authentications_total = NULL,
187
+ .st_adfs_external_authentications = NULL,
188
+ .st_adfs_federation_authentications = NULL,
189
+ .st_adfs_federation_metadata_authentications = NULL,
190
+
191
+ // OAuth
192
+ .st_adfs_oauth_authorization_requests_total = NULL,
193
+ .st_adfs_oauth_client_authentications = NULL,
194
+ .st_adfs_oauth_client_credentials_requests = NULL,
195
+ .st_adfs_oauth_client_privkey_jwt_authentications = NULL,
196
+ .st_adfs_oauth_client_secret_basic_authentications = NULL,
197
+ .st_adfs_oauth_client_secret_post_authentications = NULL,
198
+ .st_adfs_oauth_client_windows_authentications = NULL,
199
+ .st_adfs_oauth_logon_certificate_requests = NULL,
200
+ .st_adfs_oauth_password_grant_requests = NULL,
201
+ .st_adfs_oauth_token_requests_success = NULL,
202
+
203
+ // Requests
204
+ .st_adfs_passive_requests_total = NULL,
205
+ .st_adfs_passport_authentications_total = NULL,
206
+ .st_adfs_password_change_requests = NULL,
207
+ .st_adfs_samlp_token_requests_success_total = NULL,
208
+ .st_adfs_wstrust_token_requests_success_total = NULL,
209
+ .st_adfs_sso_authentications = NULL,
210
+ .st_adfs_token_requests_total = NULL,
211
+ .st_adfs_user_password_authentications = NULL,
212
+ .st_adfs_windows_integrated_authentications_total = NULL,
213
+ .st_adfs_wsfed_token_requests_success_total = NULL,
214
+
215
+ // AD/ADFS
216
+ .ADFSLoginConnectionFailure.key = "AD Login Connection Failures",
217
+ .ADFSCertificateAuthentications.key = "Certificate Authentications",
218
+
219
+ // DB Artifacts
220
+ .ADFSDBArtifactFailures.key = "Artifact Database Connection Failures",
221
+ .ADFSDBArtifactQueryTimeSeconds.key = "Average Artifact Database Query Time",
222
+
223
+ // DB Config
224
+ .ADFSDBConfigFailures.key = "Configuration Database Connection Failures",
225
+ .ADFSDBConfigQueryTimeSeconds.key = "Average Config Database Query Time",
226
+
227
+ // Auth
228
+ .ADFSDeviceAuthentications.key = "Device Authentications",
229
+ .ADFSExternalAuthenticationsSuccess.key = "External Authentications",
230
+ .ADFSExternalAuthenticationsFailure.key = "External Authentication Failures",
231
+ .ADFSFederationAuthentications.key = "Federated Authentications",
232
+ .ADFSFederationMetadataAuthentications.key = "Federation Metadata Requests",
233
+ .ADFSOauthAuthorizationRequests.key = "OAuth AuthZ Requests",
234
+
235
+ // OAuth
236
+ .ADFSOauthClientAuthenticationsSuccess.key = "OAuth Client Authentications",
237
+ .ADFSOauthClientAuthenticationsFailure.key = "OAuth Client Authentications Failures",
238
+ .ADFSOauthClientCredentialsSuccess.key = "OAuth Client Credentials Requests",
239
+ .ADFSOauthClientCredentialsFailure.key = "OAuth Client Credentials Request Failures",
240
+ .ADFSOauthClientPrivkeyJwtAuthenticationSuccess.key = "OAuth Client Private Key Jwt Authentications",
241
+ .ADFSOauthClientPrivkeyJwtAuthenticationFailure.key = "OAuth Client Private Key Jwt Authentication Failures",
242
+ .ADFSOauthClientSecretBasicAuthenticationsSuccess.key = "OAuth Client Secret Post Authentication",
243
+ .ADFSOauthClientSecretBasicAuthenticationsFailure.key = "OAuth Client Secret Post Authentication Failures",
244
+ .ADFSOauthClientSecretPostAuthenticationsSuccess.key = "OAuth Client Secret Post Authentication",
245
+ .ADFSOauthClientSecretPostAuthenticationsFailure.key = "OAuth Client Secret Post Authentication Failures",
246
+ .ADFSOauthClientWindowsAuthenticationsSuccess.key = "OAuth Client Windows Integrated Authentication",
247
+ .ADFSOauthClientWindowsAuthenticationsFailure.key = "OAuth Client Windows Integrated Authentication Failures",
248
+ .ADFSOauthLogonCertificateRequestsSuccess.key = "OAuth Logon Certificate Token Requests",
249
+ .ADFSOauthLogonCertificateRequestsFailure.key = "OAuth Logon Certificate Request Failures",
250
+ .ADFSOauthPasswordGrantRequestsSuccess.key = "OAuth Password Grant Request Failures",
251
+ .ADFSOauthPasswordGrantRequestsFailure.key = "OAuth Password Grant Request",
252
+ .ADFSOauthTokenRequestsSuccess.key = "OAuth Token Requests",
253
+
254
+ // Requests
255
+ .ADFSPassiveRequests.key = "Passive Requests",
256
+ .ADFSPassportAuthentications.key = "Microsoft Passport Authentications",
257
+ .ADFSPasswordChangeRequestsSuccess.key = "Password Change Successful Requests",
258
+ .ADFSPasswordChangeRequestsFailure.key = "Password Change Failed Requests",
259
+ .ADFSSAMLPTokenRequests.key = "SAML-P Token Requests",
260
+ .ADFSWSTrustTokenRequestsSuccess.key = "WS-Trust Token Requests",
261
+ .ADFSSSOAuthenticationsSuccess.key = "SSO Authentications",
262
+ .ADFSSSOAuthenticationsFailure.key = "SSO Authentication Failures",
263
+ .ADFSTokenRequests.key = "Token Requests",
264
+ .ADFSUserPasswordAuthenticationsSuccess.key = "SSO Authentications",
265
+ .ADFSUserPasswordAuthenticationsFailure.key = "SSO Authentication Failures",
266
+ .ADFSWindowsIntegratedAuthentications.key = "Windows Integrated Authentications",
267
+ .ADFSWSFedTokenRequestsSuccess.key = "WS-Fed Token Requests",
268
+};
269
+
270
+static void initialize(void)
271
+{
272
+ ;
273
+}
274
+
275
+void netdata_adfs_login_connection_failures(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
276
+{
277
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSLoginConnectionFailure)) {
278
+ return;
279
+ }
280
+
281
+ if (!adfs.st_adfs_login_connection_failures) {
282
+ adfs.st_adfs_login_connection_failures = rrdset_create_localhost(
283
+ "adfs",
284
+ "ad_login_connection_failures",
285
+ NULL,
286
+ "ad",
287
+ "adfs.ad_login_connection_failures",
288
+ "Connection failures",
289
+ "failures/s",
290
+ PLUGIN_WINDOWS_NAME,
291
+ "PerflibADFS",
292
+ PRIO_ADFS_LOGIN_CONNECTION_FAILURES_TOTAL,
293
+ update_every,
294
+ RRDSET_TYPE_LINE);
295
+
296
+ adfs.rd_adfs_login_connection_failures =
297
+ rrddim_add(adfs.st_adfs_login_connection_failures, "connection", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
298
+ }
299
+
300
+ rrddim_set_by_pointer(
301
+ adfs.st_adfs_login_connection_failures,
302
+ adfs.rd_adfs_login_connection_failures,
303
+ (collected_number)adfs.ADFSLoginConnectionFailure.current.Data);
304
+ rrdset_done(adfs.st_adfs_login_connection_failures);
305
+}
306
+
307
+void netdata_adfs_certificate_authentications(
308
+ PERF_DATA_BLOCK *pDataBlock,
309
+ PERF_OBJECT_TYPE *pObjectType,
310
+ int update_every)
311
+{
312
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSCertificateAuthentications)) {
313
+ return;
314
+ }
315
+
316
+ if (!adfs.st_adfs_certificate_authentications_total) {
317
+ adfs.st_adfs_certificate_authentications_total = rrdset_create_localhost(
318
+ "adfs",
319
+ "certificate_authentications",
320
+ NULL,
321
+ "ad",
322
+ "adfs.certificate_authentications",
323
+ "User Certificate authentications",
324
+ "authentications/s",
325
+ PLUGIN_WINDOWS_NAME,
326
+ "PerflibADFS",
327
+ PRIO_ADFS_CERTIFICATE_AUTHENTICATION_TOTAL,
328
+ update_every,
329
+ RRDSET_TYPE_LINE);
330
+
331
+ adfs.rd_adfs_certificate_authentications_total = rrddim_add(
332
+ adfs.st_adfs_certificate_authentications_total, "authentications", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
333
+ }
334
+
335
+ rrddim_set_by_pointer(
336
+ adfs.st_adfs_certificate_authentications_total,
337
+ adfs.rd_adfs_certificate_authentications_total,
338
+ (collected_number)adfs.ADFSCertificateAuthentications.current.Data);
339
+ rrdset_done(adfs.st_adfs_certificate_authentications_total);
340
+}
341
+
342
+void netdata_adfs_db_artifacts_failure(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
343
+{
344
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSDBArtifactFailures)) {
345
+ return;
346
+ }
347
+
348
+ if (!adfs.st_adfs_db_artifact_failure_total) {
349
+ adfs.st_adfs_db_artifact_failure_total = rrdset_create_localhost(
350
+ "adfs",
351
+ "db_artifact_failures",
352
+ NULL,
353
+ "db artifact",
354
+ "adfs.db_artifact_failures",
355
+ "Connection failures to the artifact database",
356
+ "failures/s",
357
+ PLUGIN_WINDOWS_NAME,
358
+ "PerflibADFS",
359
+ PRIO_ADFS_DB_ARTIFACT_FAILURE_TOTAL,
360
+ update_every,
361
+ RRDSET_TYPE_LINE);
362
+
363
+ adfs.rd_adfs_db_artifact_failure_total =
364
+ rrddim_add(adfs.st_adfs_db_artifact_failure_total, "connection", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
365
+ }
366
+
367
+ rrddim_set_by_pointer(
368
+ adfs.st_adfs_db_artifact_failure_total,
369
+ adfs.rd_adfs_db_artifact_failure_total,
370
+ (collected_number)adfs.ADFSDBArtifactFailures.current.Data);
371
+ rrdset_done(adfs.st_adfs_db_artifact_failure_total);
372
+}
373
+
374
+void netdata_adfs_db_artifacts_query_time_seconds(
375
+ PERF_DATA_BLOCK *pDataBlock,
376
+ PERF_OBJECT_TYPE *pObjectType,
377
+ int update_every)
378
+{
379
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSDBArtifactQueryTimeSeconds)) {
380
+ return;
381
+ }
382
+
383
+ if (!adfs.st_adfs_db_artifact_query_time_seconds_total) {
384
+ adfs.st_adfs_db_artifact_query_time_seconds_total = rrdset_create_localhost(
385
+ "adfs",
386
+ "db_artifact_query_time_seconds",
387
+ NULL,
388
+ "db artifact",
389
+ "adfs.db_artifact_query_time_seconds",
390
+ "Time taken for an artifact database query",
391
+ "seconds/s",
392
+ PLUGIN_WINDOWS_NAME,
393
+ "PerflibADFS",
394
+ PRIO_ADFS_DB_ARTIFACT_QUERY_TYME_SECONDS_TOTAL,
395
+ update_every,
396
+ RRDSET_TYPE_LINE);
397
+
398
+ adfs.rd_adfs_db_artifact_query_time_seconds_total = rrddim_add(
399
+ adfs.st_adfs_db_artifact_query_time_seconds_total, "query_time", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL);
400
+ }
401
+
402
+ rrddim_set_by_pointer(
403
+ adfs.st_adfs_db_artifact_query_time_seconds_total,
404
+ adfs.rd_adfs_db_artifact_query_time_seconds_total,
405
+ (collected_number)adfs.ADFSDBArtifactQueryTimeSeconds.current.Data);
406
+ rrdset_done(adfs.st_adfs_db_artifact_query_time_seconds_total);
407
+}
408
+
409
+void netdata_adfs_db_config_failure(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
410
+{
411
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSDBConfigFailures)) {
412
+ return;
413
+ }
414
+
415
+ if (!adfs.st_adfs_db_config_failures) {
416
+ adfs.st_adfs_db_config_failures = rrdset_create_localhost(
417
+ "adfs",
418
+ "db_config_failures",
419
+ NULL,
420
+ "db config",
421
+ "adfs.db_config_failures",
422
+ "Connection failures to the configuration database",
423
+ "failures/s",
424
+ PLUGIN_WINDOWS_NAME,
425
+ "PerflibADFS",
426
+ PRIO_ADFS_DB_CONFIG_FAILURE_TOTAL,
427
+ update_every,
428
+ RRDSET_TYPE_LINE);
429
+
430
+ adfs.rd_adfs_db_config_failures =
431
+ rrddim_add(adfs.st_adfs_db_config_failures, "connection", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
432
+ }
433
+
434
+ rrddim_set_by_pointer(
435
+ adfs.st_adfs_db_config_failures,
436
+ adfs.rd_adfs_db_config_failures,
437
+ (collected_number)adfs.ADFSDBConfigFailures.current.Data);
438
+ rrdset_done(adfs.st_adfs_db_config_failures);
439
+}
440
+
441
+void netdata_adfs_db_config_query_time_seconds(
442
+ PERF_DATA_BLOCK *pDataBlock,
443
+ PERF_OBJECT_TYPE *pObjectType,
444
+ int update_every)
445
+{
446
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSDBConfigQueryTimeSeconds)) {
447
+ return;
448
+ }
449
+
450
+ if (!adfs.st_adfs_db_config_query_time_seconds_total) {
451
+ adfs.st_adfs_db_config_query_time_seconds_total = rrdset_create_localhost(
452
+ "adfs",
453
+ "db_config_query_time_seconds",
454
+ NULL,
455
+ "db config",
456
+ "adfs.db_config_query_time_seconds",
457
+ "Time taken for a configuration database query",
458
+ "seconds/s",
459
+ PLUGIN_WINDOWS_NAME,
460
+ "PerflibADFS",
461
+ PRIO_ADFS_DB_CONFIG_QUERY_TYME_SECONDS_TOTAL,
462
+ update_every,
463
+ RRDSET_TYPE_LINE);
464
+
465
+ adfs.rd_adfs_db_config_query_time_seconds_total = rrddim_add(
466
+ adfs.st_adfs_db_config_query_time_seconds_total, "query_time", NULL, 1, 1000, RRD_ALGORITHM_INCREMENTAL);
467
+ }
468
+
469
+ rrddim_set_by_pointer(
470
+ adfs.st_adfs_db_config_query_time_seconds_total,
471
+ adfs.rd_adfs_db_config_query_time_seconds_total,
472
+ (collected_number)adfs.ADFSDBConfigQueryTimeSeconds.current.Data);
473
+ rrdset_done(adfs.st_adfs_db_config_query_time_seconds_total);
474
+}
475
+
476
+void netdata_adfs_device_authentications(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
477
+{
478
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSDeviceAuthentications)) {
479
+ return;
480
+ }
481
+
482
+ if (!adfs.st_adfs_device_authentications_total) {
483
+ adfs.st_adfs_device_authentications_total = rrdset_create_localhost(
484
+ "adfs",
485
+ "device_authentications",
486
+ NULL,
487
+ "auth",
488
+ "adfs.device_authentications",
489
+ "Device authentications",
490
+ "authentications/s",
491
+ PLUGIN_WINDOWS_NAME,
492
+ "PerflibADFS",
493
+ PRIO_ADFS_DEVICE_AUTHENTICATIONS_TOTAL,
494
+ update_every,
495
+ RRDSET_TYPE_LINE);
496
+
497
+ adfs.rd_adfs_device_authentications_total = rrddim_add(
498
+ adfs.st_adfs_device_authentications_total, "authentications", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
499
+ }
500
+
501
+ rrddim_set_by_pointer(
502
+ adfs.st_adfs_device_authentications_total,
503
+ adfs.rd_adfs_device_authentications_total,
504
+ (collected_number)adfs.ADFSDeviceAuthentications.current.Data);
505
+ rrdset_done(adfs.st_adfs_device_authentications_total);
506
+}
507
+
508
+void netdata_adfs_external_authentications(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
509
+{
510
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSExternalAuthenticationsSuccess) ||
511
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSExternalAuthenticationsFailure)) {
512
+ return;
513
+ }
514
+
515
+ if (!adfs.st_adfs_external_authentications) {
516
+ adfs.st_adfs_external_authentications = rrdset_create_localhost(
517
+ "adfs",
518
+ "external_authentications",
519
+ NULL,
520
+ "auth",
521
+ "adfs.external_authentications",
522
+ "Authentications from external MFA providers",
523
+ "authentications/s",
524
+ PLUGIN_WINDOWS_NAME,
525
+ "PerflibADFS",
526
+ PRIO_ADFS_EXTERNAL_AUTHENTICATION_TOTAL,
527
+ update_every,
528
+ RRDSET_TYPE_LINE);
529
+
530
+ adfs.rd_adfs_external_authentications_success =
531
+ rrddim_add(adfs.st_adfs_external_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
532
+
533
+ adfs.rd_adfs_external_authentications_failure =
534
+ rrddim_add(adfs.st_adfs_external_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
535
+ }
536
+
537
+ rrddim_set_by_pointer(
538
+ adfs.st_adfs_external_authentications,
539
+ adfs.rd_adfs_external_authentications_success,
540
+ (collected_number)adfs.ADFSExternalAuthenticationsSuccess.current.Data);
541
+
542
+ rrddim_set_by_pointer(
543
+ adfs.st_adfs_external_authentications,
544
+ adfs.rd_adfs_external_authentications_failure,
545
+ (collected_number)adfs.ADFSExternalAuthenticationsFailure.current.Data);
546
+
547
+ rrdset_done(adfs.st_adfs_external_authentications);
548
+}
549
+
550
+void netdata_adfs_federated_authentications(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
551
+{
552
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSFederationAuthentications)) {
553
+ return;
554
+ }
555
+
556
+ if (!adfs.st_adfs_federation_authentications) {
557
+ adfs.st_adfs_federation_authentications = rrdset_create_localhost(
558
+ "adfs",
559
+ "federated_authentications",
560
+ NULL,
561
+ "auth",
562
+ "adfs.federated_authentications",
563
+ "Authentications from Federated Sources",
564
+ "authentications/s",
565
+ PLUGIN_WINDOWS_NAME,
566
+ "PerflibADFS",
567
+ PRIO_ADFS_FEDERATION_AUTHENTICATION_TOTAL,
568
+ update_every,
569
+ RRDSET_TYPE_LINE);
570
+
571
+ adfs.rd_adfs_federation_authentications = rrddim_add(
572
+ adfs.st_adfs_federation_authentications, "authentications", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
573
+ }
574
+
575
+ rrddim_set_by_pointer(
576
+ adfs.st_adfs_federation_authentications,
577
+ adfs.rd_adfs_federation_authentications,
578
+ (collected_number)adfs.ADFSFederationAuthentications.current.Data);
579
+
580
+ rrdset_done(adfs.st_adfs_external_authentications);
581
+}
582
+
583
+void netdata_adfs_federation_metadata_authentications(
584
+ PERF_DATA_BLOCK *pDataBlock,
585
+ PERF_OBJECT_TYPE *pObjectType,
586
+ int update_every)
587
+{
588
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSFederationMetadataAuthentications)) {
589
+ return;
590
+ }
591
+
592
+ if (!adfs.st_adfs_federation_metadata_authentications) {
593
+ adfs.st_adfs_federation_metadata_authentications = rrdset_create_localhost(
594
+ "adfs",
595
+ "federation_metadata_requests",
596
+ NULL,
597
+ "auth",
598
+ "adfs.federation_metadata_requests",
599
+ "Federation Metadata requests",
600
+ "requests/s",
601
+ PLUGIN_WINDOWS_NAME,
602
+ "PerflibADFS",
603
+ PRIO_ADFS_FEDERATION_REQUESTS_AUTHENTICATION_TOTAL,
604
+ update_every,
605
+ RRDSET_TYPE_LINE);
606
+
607
+ adfs.rd_adfs_federation_metadata_authentications = rrddim_add(
608
+ adfs.st_adfs_federation_metadata_authentications, "requests", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
609
+ }
610
+
611
+ rrddim_set_by_pointer(
612
+ adfs.st_adfs_federation_metadata_authentications,
613
+ adfs.rd_adfs_federation_metadata_authentications,
614
+ (collected_number)adfs.ADFSFederationMetadataAuthentications.current.Data);
615
+
616
+ rrdset_done(adfs.st_adfs_federation_metadata_authentications);
617
+}
618
+
619
+void netdata_adfs_oauth_authorization_requests(
620
+ PERF_DATA_BLOCK *pDataBlock,
621
+ PERF_OBJECT_TYPE *pObjectType,
622
+ int update_every)
623
+{
624
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthAuthorizationRequests)) {
625
+ return;
626
+ }
627
+
628
+ if (!adfs.st_adfs_oauth_authorization_requests_total) {
629
+ adfs.st_adfs_oauth_authorization_requests_total = rrdset_create_localhost(
630
+ "adfs",
631
+ "oauth_authorization_requests",
632
+ NULL,
633
+ "oauth",
634
+ "adfs.oauth_authorization_requests",
635
+ "Incoming requests to the OAuth Authorization endpoint",
636
+ "requests/s",
637
+ PLUGIN_WINDOWS_NAME,
638
+ "PerflibADFS",
639
+ PRIO_ADFS_OAUTH_AUTHORIZED_REQUEST,
640
+ update_every,
641
+ RRDSET_TYPE_LINE);
642
+
643
+ adfs.rd_adfs_oauth_authorization_requests_total = rrddim_add(
644
+ adfs.st_adfs_oauth_authorization_requests_total, "requests", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
645
+ }
646
+
647
+ rrddim_set_by_pointer(
648
+ adfs.st_adfs_oauth_authorization_requests_total,
649
+ adfs.rd_adfs_oauth_authorization_requests_total,
650
+ (collected_number)adfs.ADFSOauthAuthorizationRequests.current.Data);
651
+
652
+ rrdset_done(adfs.st_adfs_oauth_authorization_requests_total);
653
+}
654
+
655
+void netdata_adfs_oauth_client_authentication(
656
+ PERF_DATA_BLOCK *pDataBlock,
657
+ PERF_OBJECT_TYPE *pObjectType,
658
+ int update_every)
659
+{
660
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientAuthenticationsSuccess) ||
661
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientAuthenticationsFailure)) {
662
+ return;
663
+ }
664
+
665
+ if (!adfs.st_adfs_oauth_client_authentications) {
666
+ adfs.st_adfs_oauth_client_authentications = rrdset_create_localhost(
667
+ "adfs",
668
+ "oauth_client_authentications",
669
+ NULL,
670
+ "oauth",
671
+ "adfs.oauth_client_authentications",
672
+ "OAuth client authentications",
673
+ "authentications/s",
674
+ PLUGIN_WINDOWS_NAME,
675
+ "PerflibADFS",
676
+ PRIO_ADFS_OAUTH_CLIENT_AUTHORIZATION_REQUEST,
677
+ update_every,
678
+ RRDSET_TYPE_LINE);
679
+
680
+ adfs.rd_adfs_oauth_client_authentications_success =
681
+ rrddim_add(adfs.st_adfs_oauth_client_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
682
+
683
+ adfs.rd_adfs_oauth_client_authentications_failure = rrddim_add(
684
+ adfs.st_adfs_oauth_client_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
685
+ }
686
+
687
+ rrddim_set_by_pointer(
688
+ adfs.st_adfs_oauth_client_authentications,
689
+ adfs.rd_adfs_oauth_client_authentications_success,
690
+ (collected_number)adfs.ADFSOauthClientAuthenticationsSuccess.current.Data);
691
+
692
+ rrddim_set_by_pointer(
693
+ adfs.st_adfs_oauth_client_authentications,
694
+ adfs.rd_adfs_oauth_client_authentications_failure,
695
+ (collected_number)adfs.ADFSOauthClientAuthenticationsFailure.current.Data);
696
+
697
+ rrdset_done(adfs.st_adfs_oauth_client_authentications);
698
+}
699
+
700
+void netdata_adfs_oauth_client_credentials_requests(
701
+ PERF_DATA_BLOCK *pDataBlock,
702
+ PERF_OBJECT_TYPE *pObjectType,
703
+ int update_every)
704
+{
705
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientCredentialsSuccess) ||
706
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientCredentialsFailure)) {
707
+ return;
708
+ }
709
+
710
+ if (!adfs.st_adfs_oauth_client_credentials_requests) {
711
+ adfs.st_adfs_oauth_client_credentials_requests = rrdset_create_localhost(
712
+ "adfs",
713
+ "oauth_client_credentials_requests",
714
+ NULL,
715
+ "oauth",
716
+ "adfs.oauth_client_credentials_requests",
717
+ "OAuth client credentials requests",
718
+ "requests/s",
719
+ PLUGIN_WINDOWS_NAME,
720
+ "PerflibADFS",
721
+ PRIO_ADFS_OAUTH_CLIENT_CREDENTIAL_REQUEST,
722
+ update_every,
723
+ RRDSET_TYPE_LINE);
724
+
725
+ adfs.rd_adfs_oauth_client_credentials_requests_success = rrddim_add(
726
+ adfs.st_adfs_oauth_client_credentials_requests, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
727
+
728
+ adfs.rd_adfs_oauth_client_credentials_requests_failure = rrddim_add(
729
+ adfs.st_adfs_oauth_client_credentials_requests, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
730
+ }
731
+
732
+ rrddim_set_by_pointer(
733
+ adfs.st_adfs_oauth_client_credentials_requests,
734
+ adfs.rd_adfs_oauth_client_credentials_requests_success,
735
+ (collected_number)adfs.ADFSOauthClientCredentialsSuccess.current.Data);
736
+
737
+ rrddim_set_by_pointer(
738
+ adfs.st_adfs_oauth_client_credentials_requests,
739
+ adfs.rd_adfs_oauth_client_credentials_requests_failure,
740
+ (collected_number)adfs.ADFSOauthClientCredentialsFailure.current.Data);
741
+
742
+ rrdset_done(adfs.st_adfs_oauth_client_credentials_requests);
743
+}
744
+
745
+void netdata_adfs_oauth_client_privkey_jwt_authentications(
746
+ PERF_DATA_BLOCK *pDataBlock,
747
+ PERF_OBJECT_TYPE *pObjectType,
748
+ int update_every)
749
+{
750
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientPrivkeyJwtAuthenticationSuccess) ||
751
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientPrivkeyJwtAuthenticationFailure)) {
752
+ return;
753
+ }
754
+
755
+ if (!adfs.st_adfs_oauth_client_privkey_jwt_authentications) {
756
+ adfs.st_adfs_oauth_client_privkey_jwt_authentications = rrdset_create_localhost(
757
+ "adfs",
758
+ "oauth_client_privkey_jwt_authentications",
759
+ NULL,
760
+ "oauth",
761
+ "adfs.oauth_client_privkey_jwt_authentications",
762
+ "OAuth client private key JWT authentications",
763
+ "authentications/s",
764
+ PLUGIN_WINDOWS_NAME,
765
+ "PerflibADFS",
766
+ PRIO_ADFS_OAUTH_CLIENT_PRV_KEY_JWT_AUTH,
767
+ update_every,
768
+ RRDSET_TYPE_LINE);
769
+
770
+ adfs.rd_adfs_oauth_client_privkey_jwt_authentications_success = rrddim_add(
771
+ adfs.st_adfs_oauth_client_privkey_jwt_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
772
+
773
+ adfs.rd_adfs_oauth_client_privkey_jwt_authentications_failure = rrddim_add(
774
+ adfs.st_adfs_oauth_client_privkey_jwt_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
775
+ }
776
+
777
+ rrddim_set_by_pointer(
778
+ adfs.st_adfs_oauth_client_privkey_jwt_authentications,
779
+ adfs.rd_adfs_oauth_client_privkey_jwt_authentications_success,
780
+ (collected_number)adfs.ADFSOauthClientPrivkeyJwtAuthenticationSuccess.current.Data);
781
+
782
+ rrddim_set_by_pointer(
783
+ adfs.st_adfs_oauth_client_privkey_jwt_authentications,
784
+ adfs.rd_adfs_oauth_client_privkey_jwt_authentications_failure,
785
+ (collected_number)adfs.ADFSOauthClientPrivkeyJwtAuthenticationFailure.current.Data);
786
+
787
+ rrdset_done(adfs.st_adfs_oauth_client_privkey_jwt_authentications);
788
+}
789
+
790
+void netdata_adfs_oauth_client_secret_basic_authentications(
791
+ PERF_DATA_BLOCK *pDataBlock,
792
+ PERF_OBJECT_TYPE *pObjectType,
793
+ int update_every)
794
+{
795
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientSecretBasicAuthenticationsSuccess) ||
796
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientSecretBasicAuthenticationsFailure)) {
797
+ return;
798
+ }
799
+
800
+ if (!adfs.st_adfs_oauth_client_secret_basic_authentications) {
801
+ adfs.st_adfs_oauth_client_secret_basic_authentications = rrdset_create_localhost(
802
+ "adfs",
803
+ "oauth_client_secret_basic_authentications",
804
+ NULL,
805
+ "oauth",
806
+ "adfs.oauth_client_secret_basic_authentications",
807
+ "OAuth client secret basic authentications",
808
+ "authentications/s",
809
+ PLUGIN_WINDOWS_NAME,
810
+ "PerflibADFS",
811
+ PRIO_ADFS_OAUTH_CLIENT_SECRET_BASIC_AUTH,
812
+ update_every,
813
+ RRDSET_TYPE_LINE);
814
+
815
+ adfs.rd_adfs_oauth_client_secret_basic_authentications_success = rrddim_add(
816
+ adfs.st_adfs_oauth_client_secret_basic_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
817
+
818
+ adfs.rd_adfs_oauth_client_secret_basic_authentications_failure = rrddim_add(
819
+ adfs.st_adfs_oauth_client_secret_basic_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
820
+ }
821
+
822
+ rrddim_set_by_pointer(
823
+ adfs.st_adfs_oauth_client_secret_basic_authentications,
824
+ adfs.rd_adfs_oauth_client_secret_basic_authentications_success,
825
+ (collected_number)adfs.ADFSOauthClientSecretBasicAuthenticationsSuccess.current.Data);
826
+
827
+ rrddim_set_by_pointer(
828
+ adfs.st_adfs_oauth_client_secret_basic_authentications,
829
+ adfs.rd_adfs_oauth_client_secret_basic_authentications_failure,
830
+ (collected_number)adfs.ADFSOauthClientSecretBasicAuthenticationsFailure.current.Data);
831
+
832
+ rrdset_done(adfs.st_adfs_oauth_client_secret_basic_authentications);
833
+}
834
+
835
+void netdata_adfs_oauth_client_secret_post_authentications(
836
+ PERF_DATA_BLOCK *pDataBlock,
837
+ PERF_OBJECT_TYPE *pObjectType,
838
+ int update_every)
839
+{
840
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientSecretPostAuthenticationsSuccess) ||
841
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientSecretPostAuthenticationsFailure)) {
842
+ return;
843
+ }
844
+
845
+ if (!adfs.st_adfs_oauth_client_secret_post_authentications) {
846
+ adfs.st_adfs_oauth_client_secret_post_authentications = rrdset_create_localhost(
847
+ "adfs",
848
+ "oauth_client_secret_post_authentications",
849
+ NULL,
850
+ "oauth",
851
+ "adfs.oauth_client_secret_post_authentications",
852
+ "OAuth client secret post authentications",
853
+ "authentications/s",
854
+ PLUGIN_WINDOWS_NAME,
855
+ "PerflibADFS",
856
+ PRIO_ADFS_OAUTH_CLIENT_SECRET_POST_AUTH,
857
+ update_every,
858
+ RRDSET_TYPE_LINE);
859
+
860
+ adfs.rd_adfs_oauth_client_secret_post_authentications_success = rrddim_add(
861
+ adfs.st_adfs_oauth_client_secret_post_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
862
+
863
+ adfs.rd_adfs_oauth_client_secret_post_authentications_failure = rrddim_add(
864
+ adfs.st_adfs_oauth_client_secret_post_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
865
+ }
866
+
867
+ rrddim_set_by_pointer(
868
+ adfs.st_adfs_oauth_client_secret_post_authentications,
869
+ adfs.rd_adfs_oauth_client_secret_post_authentications_success,
870
+ (collected_number)adfs.ADFSOauthClientSecretPostAuthenticationsSuccess.current.Data);
871
+
872
+ rrddim_set_by_pointer(
873
+ adfs.st_adfs_oauth_client_secret_post_authentications,
874
+ adfs.rd_adfs_oauth_client_secret_post_authentications_failure,
875
+ (collected_number)adfs.ADFSOauthClientSecretPostAuthenticationsFailure.current.Data);
876
+
877
+ rrdset_done(adfs.st_adfs_oauth_client_secret_post_authentications);
878
+}
879
+
880
+void netdata_adfs_oauth_client_windows_authentications(
881
+ PERF_DATA_BLOCK *pDataBlock,
882
+ PERF_OBJECT_TYPE *pObjectType,
883
+ int update_every)
884
+{
885
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientWindowsAuthenticationsSuccess) ||
886
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthClientWindowsAuthenticationsFailure)) {
887
+ return;
888
+ }
889
+
890
+ if (!adfs.st_adfs_oauth_client_windows_authentications) {
891
+ adfs.st_adfs_oauth_client_windows_authentications = rrdset_create_localhost(
892
+ "adfs",
893
+ "oauth_client_windows_authentications",
894
+ NULL,
895
+ "oauth",
896
+ "adfs.oauth_client_windows_authentications",
897
+ "OAuth client windows integrated authentications",
898
+ "authentications/s",
899
+ PLUGIN_WINDOWS_NAME,
900
+ "PerflibADFS",
901
+ PRIO_ADFS_OAUTH_CLIENT_WINDOWS_AUTH,
902
+ update_every,
903
+ RRDSET_TYPE_LINE);
904
+
905
+ adfs.rd_adfs_oauth_client_windows_authentications_success_total = rrddim_add(
906
+ adfs.st_adfs_oauth_client_windows_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
907
+
908
+ adfs.rd_adfs_oauth_client_windows_authentications_failure_total = rrddim_add(
909
+ adfs.st_adfs_oauth_client_windows_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
910
+ }
911
+
912
+ rrddim_set_by_pointer(
913
+ adfs.st_adfs_oauth_client_windows_authentications,
914
+ adfs.rd_adfs_oauth_client_windows_authentications_success_total,
915
+ (collected_number)adfs.ADFSOauthClientWindowsAuthenticationsSuccess.current.Data);
916
+
917
+ rrddim_set_by_pointer(
918
+ adfs.st_adfs_oauth_client_windows_authentications,
919
+ adfs.rd_adfs_oauth_client_windows_authentications_failure_total,
920
+ (collected_number)adfs.ADFSOauthClientWindowsAuthenticationsFailure.current.Data);
921
+
922
+ rrdset_done(adfs.st_adfs_oauth_client_windows_authentications);
923
+}
924
+
925
+void netdata_adfs_oauth_logon_certificate_request(
926
+ PERF_DATA_BLOCK *pDataBlock,
927
+ PERF_OBJECT_TYPE *pObjectType,
928
+ int update_every)
929
+{
930
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthLogonCertificateRequestsSuccess) ||
931
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthLogonCertificateRequestsFailure)) {
932
+ return;
933
+ }
934
+
935
+ if (!adfs.st_adfs_oauth_logon_certificate_requests) {
936
+ adfs.st_adfs_oauth_logon_certificate_requests = rrdset_create_localhost(
937
+ "adfs",
938
+ "oauth_client_windows_authentications",
939
+ NULL,
940
+ "oauth",
941
+ "adfs.oauth_client_windows_authentications",
942
+ "OAuth client windows integrated authentications",
943
+ "requests/s",
944
+ PLUGIN_WINDOWS_NAME,
945
+ "PerflibADFS",
946
+ PRIO_ADFS_OAUTH_CLIENT_WINDOWS_AUTH,
947
+ update_every,
948
+ RRDSET_TYPE_LINE);
949
+
950
+ adfs.rd_adfs_oauth_logon_certificate_requests_success_total =
951
+ rrddim_add(adfs.st_adfs_oauth_logon_certificate_requests, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
952
+
953
+ adfs.rd_adfs_oauth_logon_certificate_requests_failure_total =
954
+ rrddim_add(adfs.st_adfs_oauth_logon_certificate_requests, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
955
+ }
956
+
957
+ rrddim_set_by_pointer(
958
+ adfs.st_adfs_oauth_logon_certificate_requests,
959
+ adfs.rd_adfs_oauth_logon_certificate_requests_success_total,
960
+ (collected_number)adfs.ADFSOauthLogonCertificateRequestsSuccess.current.Data);
961
+
962
+ rrddim_set_by_pointer(
963
+ adfs.st_adfs_oauth_logon_certificate_requests,
964
+ adfs.rd_adfs_oauth_logon_certificate_requests_failure_total,
965
+ (collected_number)adfs.ADFSOauthLogonCertificateRequestsFailure.current.Data);
966
+
967
+ rrdset_done(adfs.st_adfs_oauth_logon_certificate_requests);
968
+}
969
+
970
+void netdata_adfs_oauth_password_grant_requests(
971
+ PERF_DATA_BLOCK *pDataBlock,
972
+ PERF_OBJECT_TYPE *pObjectType,
973
+ int update_every)
974
+{
975
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthPasswordGrantRequestsSuccess) ||
976
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthPasswordGrantRequestsFailure)) {
977
+ return;
978
+ }
979
+
980
+ if (!adfs.st_adfs_oauth_password_grant_requests) {
981
+ adfs.st_adfs_oauth_password_grant_requests = rrdset_create_localhost(
982
+ "adfs",
983
+ "oauth_client_windows_authentications",
984
+ NULL,
985
+ "oauth",
986
+ "adfs.oauth_client_windows_authentications",
987
+ "OAuth client windows integrated authentications",
988
+ "authentications/s",
989
+ PLUGIN_WINDOWS_NAME,
990
+ "PerflibADFS",
991
+ PRIO_ADFS_OAUTH_CLIENT_WINDOWS_AUTH,
992
+ update_every,
993
+ RRDSET_TYPE_LINE);
994
+
995
+ adfs.rd_adfs_oauth_password_grant_requests_success =
996
+ rrddim_add(adfs.st_adfs_oauth_password_grant_requests, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
997
+
998
+ adfs.rd_adfs_oauth_password_grant_requests_failure =
999
+ rrddim_add(adfs.st_adfs_oauth_password_grant_requests, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1000
+ }
1001
+
1002
+ rrddim_set_by_pointer(
1003
+ adfs.st_adfs_oauth_password_grant_requests,
1004
+ adfs.rd_adfs_oauth_password_grant_requests_success,
1005
+ (collected_number)adfs.ADFSOauthPasswordGrantRequestsSuccess.current.Data);
1006
+
1007
+ rrddim_set_by_pointer(
1008
+ adfs.st_adfs_oauth_password_grant_requests,
1009
+ adfs.rd_adfs_oauth_password_grant_requests_failure,
1010
+ (collected_number)adfs.ADFSOauthPasswordGrantRequestsFailure.current.Data);
1011
+
1012
+ rrdset_done(adfs.st_adfs_oauth_password_grant_requests);
1013
+}
1014
+
1015
+void netdata_adfs_oauth_token_requests_success(
1016
+ PERF_DATA_BLOCK *pDataBlock,
1017
+ PERF_OBJECT_TYPE *pObjectType,
1018
+ int update_every)
1019
+{
1020
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSOauthTokenRequestsSuccess)) {
1021
+ return;
1022
+ }
1023
+
1024
+ if (!adfs.st_adfs_oauth_token_requests_success) {
1025
+ adfs.st_adfs_oauth_token_requests_success = rrdset_create_localhost(
1026
+ "adfs",
1027
+ "oauth_token_requests_success",
1028
+ NULL,
1029
+ "oauth",
1030
+ "adfs.oauth_token_requests",
1031
+ "Successful RP token requests over OAuth protocol",
1032
+ "requests/s",
1033
+ PLUGIN_WINDOWS_NAME,
1034
+ "PerflibADFS",
1035
+ PRIO_ADFS_OAUTH_TOKEN_REQUESTS_SUCCESS,
1036
+ update_every,
1037
+ RRDSET_TYPE_LINE);
1038
+
1039
+ adfs.rd_adfs_oauth_token_requests_success =
1040
+ rrddim_add(adfs.st_adfs_oauth_token_requests_success, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1041
+ }
1042
+
1043
+ rrddim_set_by_pointer(
1044
+ adfs.st_adfs_oauth_token_requests_success,
1045
+ adfs.rd_adfs_oauth_token_requests_success,
1046
+ (collected_number)adfs.ADFSOauthTokenRequestsSuccess.current.Data);
1047
+
1048
+ rrdset_done(adfs.st_adfs_oauth_token_requests_success);
1049
+}
1050
+
1051
+void netdata_adfs_passive_requests_chart(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1052
+{
1053
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSPassiveRequests)) {
1054
+ return;
1055
+ }
1056
+
1057
+ if (!adfs.st_adfs_passive_requests_total) {
1058
+ adfs.st_adfs_passive_requests_total = rrdset_create_localhost(
1059
+ "adfs",
1060
+ "passive_requests",
1061
+ NULL,
1062
+ "requests",
1063
+ "adfs.passive_requests",
1064
+ "Passive requests",
1065
+ "requests/s",
1066
+ PLUGIN_WINDOWS_NAME,
1067
+ "PerflibADFS",
1068
+ PRIO_ADFS_PASSIVE_REQUESTS,
1069
+ update_every,
1070
+ RRDSET_TYPE_LINE);
1071
+
1072
+ adfs.rd_adfs_passive_requests_total =
1073
+ rrddim_add(adfs.st_adfs_passive_requests_total, "passive", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1074
+ }
1075
+
1076
+ rrddim_set_by_pointer(
1077
+ adfs.st_adfs_passive_requests_total,
1078
+ adfs.rd_adfs_passive_requests_total,
1079
+ (collected_number)adfs.ADFSPassiveRequests.current.Data);
1080
+
1081
+ rrdset_done(adfs.st_adfs_passive_requests_total);
1082
+}
1083
+
1084
+void netdata_adfs_passport_authentications_chart(
1085
+ PERF_DATA_BLOCK *pDataBlock,
1086
+ PERF_OBJECT_TYPE *pObjectType,
1087
+ int update_every)
1088
+{
1089
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSPassportAuthentications)) {
1090
+ return;
1091
+ }
1092
+
1093
+ if (!adfs.st_adfs_passport_authentications_total) {
1094
+ adfs.st_adfs_passport_authentications_total = rrdset_create_localhost(
1095
+ "adfs",
1096
+ "passport_authentications",
1097
+ NULL,
1098
+ "auth",
1099
+ "adfs.passport_authentications",
1100
+ "Microsoft Passport SSO authentications",
1101
+ "authentications/s",
1102
+ PLUGIN_WINDOWS_NAME,
1103
+ "PerflibADFS",
1104
+ PRIO_ADFS_PASSPORT_AUTHENTICATOR,
1105
+ update_every,
1106
+ RRDSET_TYPE_LINE);
1107
+
1108
+ adfs.rd_adfs_passport_authentications_total =
1109
+ rrddim_add(adfs.st_adfs_passport_authentications_total, "passport", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1110
+ }
1111
+
1112
+ rrddim_set_by_pointer(
1113
+ adfs.st_adfs_passport_authentications_total,
1114
+ adfs.rd_adfs_passport_authentications_total,
1115
+ (collected_number)adfs.ADFSPassportAuthentications.current.Data);
1116
+
1117
+ rrdset_done(adfs.st_adfs_passport_authentications_total);
1118
+}
1119
+
1120
+void netdata_adfs_password_change_request(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1121
+{
1122
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSPasswordChangeRequestsSuccess) ||
1123
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSPasswordChangeRequestsFailure)) {
1124
+ return;
1125
+ }
1126
+
1127
+ if (!adfs.st_adfs_password_change_requests) {
1128
+ adfs.st_adfs_password_change_requests = rrdset_create_localhost(
1129
+ "adfs",
1130
+ "password_change_requests",
1131
+ NULL,
1132
+ "auth",
1133
+ "adfs.password_change_requests",
1134
+ "Password change requests",
1135
+ "requests/s",
1136
+ PLUGIN_WINDOWS_NAME,
1137
+ "PerflibADFS",
1138
+ PRIO_ADFS_PASSWORD_CHANGE_REQUEST,
1139
+ update_every,
1140
+ RRDSET_TYPE_LINE);
1141
+
1142
+ adfs.rd_adfs_password_change_requests_success =
1143
+ rrddim_add(adfs.st_adfs_password_change_requests, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1144
+
1145
+ adfs.rd_adfs_password_change_requests_failure =
1146
+ rrddim_add(adfs.st_adfs_password_change_requests, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1147
+ }
1148
+
1149
+ rrddim_set_by_pointer(
1150
+ adfs.st_adfs_password_change_requests,
1151
+ adfs.rd_adfs_password_change_requests_success,
1152
+ (collected_number)adfs.ADFSPasswordChangeRequestsSuccess.current.Data);
1153
+
1154
+ rrddim_set_by_pointer(
1155
+ adfs.st_adfs_password_change_requests,
1156
+ adfs.rd_adfs_password_change_requests_failure,
1157
+ (collected_number)adfs.ADFSPasswordChangeRequestsFailure.current.Data);
1158
+
1159
+ rrdset_done(adfs.st_adfs_password_change_requests);
1160
+}
1161
+
1162
+void netdata_adfs_samlp_token_requests(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1163
+{
1164
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSSAMLPTokenRequests)) {
1165
+ return;
1166
+ }
1167
+
1168
+ if (!adfs.st_adfs_samlp_token_requests_success_total) {
1169
+ adfs.st_adfs_samlp_token_requests_success_total = rrdset_create_localhost(
1170
+ "adfs",
1171
+ "samlp_token_requests_success",
1172
+ NULL,
1173
+ "requests",
1174
+ "adfs.samlp_token_requests_success",
1175
+ "Successful RP token requests over SAML-P protocol",
1176
+ "requests/s",
1177
+ PLUGIN_WINDOWS_NAME,
1178
+ "PerflibADFS",
1179
+ PRIO_ADFS_SAMLP_TOKEN_REQUESTS,
1180
+ update_every,
1181
+ RRDSET_TYPE_LINE);
1182
+
1183
+ adfs.rd_adfs_samlp_token_requests_success_total = rrddim_add(
1184
+ adfs.st_adfs_samlp_token_requests_success_total, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1185
+ }
1186
+
1187
+ rrddim_set_by_pointer(
1188
+ adfs.st_adfs_samlp_token_requests_success_total,
1189
+ adfs.rd_adfs_samlp_token_requests_success_total,
1190
+ (collected_number)adfs.ADFSSAMLPTokenRequests.current.Data);
1191
+
1192
+ rrdset_done(adfs.st_adfs_samlp_token_requests_success_total);
1193
+}
1194
+
1195
+void netdata_adfs_wstrust_token_requests(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1196
+{
1197
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSWSTrustTokenRequestsSuccess)) {
1198
+ return;
1199
+ }
1200
+
1201
+ if (!adfs.st_adfs_wstrust_token_requests_success_total) {
1202
+ adfs.st_adfs_wstrust_token_requests_success_total = rrdset_create_localhost(
1203
+ "adfs",
1204
+ "wstrust_token_requests_success",
1205
+ NULL,
1206
+ "requests",
1207
+ "adfs.wstrust_token_requests_success",
1208
+ "Successful RP token requests over WS-Trust protocol",
1209
+ "requests/s",
1210
+ PLUGIN_WINDOWS_NAME,
1211
+ "PerflibADFS",
1212
+ PRIO_ADFS_TRUST_TOKEN_SUCCESS,
1213
+ update_every,
1214
+ RRDSET_TYPE_LINE);
1215
+
1216
+ adfs.rd_adfs_wstrust_token_requests_success_total = rrddim_add(
1217
+ adfs.st_adfs_wstrust_token_requests_success_total, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1218
+ }
1219
+
1220
+ rrddim_set_by_pointer(
1221
+ adfs.st_adfs_wstrust_token_requests_success_total,
1222
+ adfs.rd_adfs_wstrust_token_requests_success_total,
1223
+ (collected_number)adfs.ADFSWSTrustTokenRequestsSuccess.current.Data);
1224
+
1225
+ rrdset_done(adfs.st_adfs_wstrust_token_requests_success_total);
1226
+}
1227
+
1228
+void netdata_adfs_sso_authentications(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1229
+{
1230
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSSSOAuthenticationsSuccess) ||
1231
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSSSOAuthenticationsFailure)) {
1232
+ return;
1233
+ }
1234
+
1235
+ if (!adfs.st_adfs_sso_authentications) {
1236
+ adfs.st_adfs_sso_authentications = rrdset_create_localhost(
1237
+ "adfs",
1238
+ "sso_authentications",
1239
+ NULL,
1240
+ "auth",
1241
+ "adfs.sso_authentications",
1242
+ "SSO authentications",
1243
+ "authentications/s",
1244
+ PLUGIN_WINDOWS_NAME,
1245
+ "PerflibADFS",
1246
+ PRIO_ADFS_SSO_AUTH,
1247
+ update_every,
1248
+ RRDSET_TYPE_LINE);
1249
+
1250
+ adfs.rd_adfs_sso_authentications_success =
1251
+ rrddim_add(adfs.st_adfs_sso_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1252
+
1253
+ adfs.rd_adfs_sso_authentications_failure =
1254
+ rrddim_add(adfs.st_adfs_sso_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1255
+ }
1256
+
1257
+ rrddim_set_by_pointer(
1258
+ adfs.st_adfs_sso_authentications,
1259
+ adfs.rd_adfs_sso_authentications_success,
1260
+ (collected_number)adfs.ADFSSSOAuthenticationsSuccess.current.Data);
1261
+
1262
+ rrddim_set_by_pointer(
1263
+ adfs.st_adfs_sso_authentications,
1264
+ adfs.rd_adfs_sso_authentications_failure,
1265
+ (collected_number)adfs.ADFSSSOAuthenticationsFailure.current.Data);
1266
+
1267
+ rrdset_done(adfs.st_adfs_sso_authentications);
1268
+}
1269
+
1270
+void netdata_adfs_token_request(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1271
+{
1272
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSTokenRequests)) {
1273
+ return;
1274
+ }
1275
+
1276
+ if (!adfs.st_adfs_token_requests_total) {
1277
+ adfs.st_adfs_token_requests_total = rrdset_create_localhost(
1278
+ "adfs",
1279
+ "token_requests",
1280
+ NULL,
1281
+ "requests",
1282
+ "adfs.token_requests",
1283
+ "Token access requests",
1284
+ "requests/s",
1285
+ PLUGIN_WINDOWS_NAME,
1286
+ "PerflibADFS",
1287
+ PRIO_ADFS_TRUST_TOKEN_SUCCESS,
1288
+ update_every,
1289
+ RRDSET_TYPE_LINE);
1290
+
1291
+ adfs.rd_adfs_token_requests_total =
1292
+ rrddim_add(adfs.st_adfs_token_requests_total, "requests", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1293
+ }
1294
+
1295
+ rrddim_set_by_pointer(
1296
+ adfs.st_adfs_token_requests_total,
1297
+ adfs.rd_adfs_token_requests_total,
1298
+ (collected_number)adfs.ADFSTokenRequests.current.Data);
1299
+
1300
+ rrdset_done(adfs.st_adfs_token_requests_total);
1301
+}
1302
+
1303
+void netdata_adfs_user_pass_auth(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1304
+{
1305
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSUserPasswordAuthenticationsSuccess) ||
1306
+ !perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSUserPasswordAuthenticationsFailure)) {
1307
+ return;
1308
+ }
1309
+
1310
+ if (!adfs.st_adfs_user_password_authentications) {
1311
+ adfs.st_adfs_user_password_authentications = rrdset_create_localhost(
1312
+ "adfs",
1313
+ "userpassword_authentications",
1314
+ NULL,
1315
+ "auth",
1316
+ "adfs.userpassword_authentications",
1317
+ "AD U/P authentications",
1318
+ "authentications/s",
1319
+ PLUGIN_WINDOWS_NAME,
1320
+ "PerflibADFS",
1321
+ PRIO_ADFS_USER_PASS_AUTH,
1322
+ update_every,
1323
+ RRDSET_TYPE_LINE);
1324
+
1325
+ adfs.rd_adfs_user_password_authentications_success =
1326
+ rrddim_add(adfs.st_adfs_user_password_authentications, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1327
+
1328
+ adfs.rd_adfs_user_password_authentications_failure =
1329
+ rrddim_add(adfs.st_adfs_user_password_authentications, "failure", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1330
+ }
1331
+
1332
+ rrddim_set_by_pointer(
1333
+ adfs.st_adfs_user_password_authentications,
1334
+ adfs.rd_adfs_user_password_authentications_success,
1335
+ (collected_number)adfs.ADFSUserPasswordAuthenticationsSuccess.current.Data);
1336
+
1337
+ rrddim_set_by_pointer(
1338
+ adfs.st_adfs_user_password_authentications,
1339
+ adfs.rd_adfs_user_password_authentications_failure,
1340
+ (collected_number)adfs.ADFSUserPasswordAuthenticationsFailure.current.Data);
1341
+
1342
+ rrdset_done(adfs.st_adfs_user_password_authentications);
1343
+}
1344
+
1345
+void netdata_windows_integrated_auth(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1346
+{
1347
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSWindowsIntegratedAuthentications)) {
1348
+ return;
1349
+ }
1350
+
1351
+ if (!adfs.st_adfs_windows_integrated_authentications_total) {
1352
+ adfs.st_adfs_windows_integrated_authentications_total = rrdset_create_localhost(
1353
+ "adfs",
1354
+ "windows_integrated_authentications",
1355
+ NULL,
1356
+ "auth",
1357
+ "adfs.windows_integrated_authentications",
1358
+ "Windows integrated authentications using Kerberos or NTLM",
1359
+ "authentications/s",
1360
+ PLUGIN_WINDOWS_NAME,
1361
+ "PerflibADFS",
1362
+ PRIO_ADFS_TRUST_TOKEN_SUCCESS,
1363
+ update_every,
1364
+ RRDSET_TYPE_LINE);
1365
+
1366
+ adfs.rd_adfs_windows_integrated_authentications_total = rrddim_add(
1367
+ adfs.st_adfs_windows_integrated_authentications_total,
1368
+ "authentications",
1369
+ NULL,
1370
+ 1,
1371
+ 1,
1372
+ RRD_ALGORITHM_INCREMENTAL);
1373
+ }
1374
+
1375
+ rrddim_set_by_pointer(
1376
+ adfs.st_adfs_windows_integrated_authentications_total,
1377
+ adfs.rd_adfs_windows_integrated_authentications_total,
1378
+ (collected_number)adfs.ADFSWindowsIntegratedAuthentications.current.Data);
1379
+
1380
+ rrdset_done(adfs.st_adfs_windows_integrated_authentications_total);
1381
+}
1382
+
1383
+void netdata_wsfed_token_requests(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
1384
+{
1385
+ if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSWSFedTokenRequestsSuccess)) {
1386
+ return;
1387
+ }
1388
+
1389
+ if (!adfs.st_adfs_wsfed_token_requests_success_total) {
1390
+ adfs.st_adfs_wsfed_token_requests_success_total = rrdset_create_localhost(
1391
+ "adfs",
1392
+ "wsfed_token_requests_success",
1393
+ NULL,
1394
+ "requests",
1395
+ "adfs.wsfed_token_requests_success",
1396
+ "Successful RP token requests over WS-Fed protocol",
1397
+ "requests/s",
1398
+ PLUGIN_WINDOWS_NAME,
1399
+ "PerflibADFS",
1400
+ PRIO_ADFS_WSFED_TOKEN_REQUESTS,
1401
+ update_every,
1402
+ RRDSET_TYPE_LINE);
1403
+
1404
+ adfs.rd_adfs_wsfed_token_requests_success_total = rrddim_add(
1405
+ adfs.st_adfs_wsfed_token_requests_success_total, "success", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
1406
+ }
1407
+
1408
+ rrddim_set_by_pointer(
1409
+ adfs.st_adfs_wsfed_token_requests_success_total,
1410
+ adfs.rd_adfs_wsfed_token_requests_success_total,
1411
+ (collected_number)adfs.ADFSWSFedTokenRequestsSuccess.current.Data);
1412
+
1413
+ rrdset_done(adfs.st_adfs_wsfed_token_requests_success_total);
1414
+}
1415
+
1416
+static bool do_ADFS(PERF_DATA_BLOCK *pDataBlock, int update_every)
1417
+{
1418
+ PERF_OBJECT_TYPE *pObjectType = perflibFindObjectTypeByName(pDataBlock, "AD FS");
1419
+ if (!pObjectType)
1420
+ return false;
1421
+
1422
+ static void (*doADFS[])(PERF_DATA_BLOCK *, PERF_OBJECT_TYPE *, int) = {
1423
+ // ADFS/AD
1424
+ netdata_adfs_login_connection_failures,
1425
+ netdata_adfs_certificate_authentications,
1426
+
1427
+ // DB Artifacts
1428
+ netdata_adfs_db_artifacts_failure,
1429
+ netdata_adfs_db_artifacts_query_time_seconds,
1430
+
1431
+ // DB Config
1432
+ netdata_adfs_db_config_failure,
1433
+ netdata_adfs_db_config_query_time_seconds,
1434
+
1435
+ // Auth
1436
+ netdata_adfs_device_authentications,
1437
+ netdata_adfs_external_authentications,
1438
+ netdata_adfs_federated_authentications,
1439
+ netdata_adfs_federation_metadata_authentications,
1440
+
1441
+ // OAuth
1442
+ netdata_adfs_oauth_authorization_requests,
1443
+ netdata_adfs_oauth_client_authentication,
1444
+ netdata_adfs_oauth_client_credentials_requests,
1445
+ netdata_adfs_oauth_client_privkey_jwt_authentications,
1446
+ netdata_adfs_oauth_client_secret_basic_authentications,
1447
+ netdata_adfs_oauth_client_secret_post_authentications,
1448
+ netdata_adfs_oauth_client_windows_authentications,
1449
+ netdata_adfs_oauth_logon_certificate_request,
1450
+ netdata_adfs_oauth_password_grant_requests,
1451
+ netdata_adfs_oauth_token_requests_success,
1452
+
1453
+ // Requests
1454
+ netdata_adfs_passive_requests_chart,
1455
+ netdata_adfs_passport_authentications_chart,
1456
+ netdata_adfs_password_change_request,
1457
+ netdata_adfs_samlp_token_requests,
1458
+ netdata_adfs_wstrust_token_requests,
1459
+ netdata_adfs_sso_authentications,
1460
+ netdata_adfs_token_request,
1461
+ netdata_adfs_user_pass_auth,
1462
+ netdata_windows_integrated_auth,
1463
+ netdata_wsfed_token_requests,
1464
+
1465
+ // This must be the end
1466
+ NULL};
1467
+
1468
+ DWORD i;
1469
+ for (i = 0; doADFS[i]; i++) {
1470
+ doADFS[i](pDataBlock, pObjectType, update_every);
1471
+ }
1472
+
1473
+ return true;
1474
+}
1475
+
1476
+int do_PerflibADFS(int update_every, usec_t dt __maybe_unused)
1477
+{
1478
+ static bool initialized = false;
1479
+
1480
+ if (unlikely(!initialized)) {
1481
+ initialize();
1482
+ initialized = true;
1483
+ }
1484
+
1485
+ DWORD id = RegistryFindIDByName("AD FS");
1486
+ if (id == PERFLIB_REGISTRY_NAME_NOT_FOUND)
1487
+ return -1;
1488
+
1489
+ PERF_DATA_BLOCK *pDataBlock = perflibGetPerformanceData(id);
1490
+ if (!pDataBlock)
1491
+ return -1;
1492
+
1493
+ do_ADFS(pDataBlock, update_every);
1494
+
1495
+ return 0;
1496
+}
src/collectors/windows.plugin/windows_plugin.c
+2
@@ -46,6 +46,8 @@ static struct proc_module {
46
47
{.name = "PerflibADCS", .dim = "PerflibADCS", .enabled = CONFIG_BOOLEAN_YES, .func = do_PerflibADCS},
48
49
+ {.name = "PerflibADFS", .dim = "PerflibADFS", .enabled = CONFIG_BOOLEAN_YES, .func = do_PerflibADFS},
50
+
51
// the terminator of this array
52
{.name = NULL, .dim = NULL, .func = NULL}};
53
src/collectors/windows.plugin/windows_plugin.h
+31
-1
@@ -30,6 +30,7 @@ int do_PerflibMSSQL(int update_every, usec_t dt);
30
int do_PerflibNetFramework(int update_every, usec_t dt);
31
int do_PerflibAD(int update_every, usec_t dt);
32
int do_PerflibADCS(int update_every, usec_t dt);
33
+int do_PerflibADFS(int update_every, usec_t dt);
34
35
enum PERFLIB_PRIO {
36
PRIO_WEBSITE_IIS_REQUESTS_RATE = 21000, // PRIO selected, because APPS is using 20YYY
@@ -149,7 +150,36 @@ enum PERFLIB_PRIO {
150
PRIO_ADCS_CERT_REQ_POLICY_MODULE_PROCESS_TIME,
151
PRIO_ADCS_CERT_CHALLENGE_RESP_PROCESSING_TIME,
152
PRIO_ADCS_CERT_SIGNED_CERTIFICATE_TIMESTAMP_LIST,
152
- PRIO_ADCS_CERT_SIGNED_CERTIFICATE_TIMESTAMP_PROC_TIME_LIST
153
+ PRIO_ADCS_CERT_SIGNED_CERTIFICATE_TIMESTAMP_PROC_TIME_LIST,
154
+
155
+ PRIO_ADFS_LOGIN_CONNECTION_FAILURES_TOTAL,
156
+ PRIO_ADFS_CERTIFICATE_AUTHENTICATION_TOTAL,
157
+ PRIO_ADFS_DB_ARTIFACT_FAILURE_TOTAL,
158
+ PRIO_ADFS_DB_ARTIFACT_QUERY_TYME_SECONDS_TOTAL,
159
+ PRIO_ADFS_DB_CONFIG_FAILURE_TOTAL,
160
+ PRIO_ADFS_DB_CONFIG_QUERY_TYME_SECONDS_TOTAL,
161
+ PRIO_ADFS_DEVICE_AUTHENTICATIONS_TOTAL,
162
+ PRIO_ADFS_EXTERNAL_AUTHENTICATION_TOTAL,
163
+ PRIO_ADFS_FEDERATION_AUTHENTICATION_TOTAL,
164
+ PRIO_ADFS_FEDERATION_REQUESTS_AUTHENTICATION_TOTAL,
165
+
166
+ PRIO_ADFS_OAUTH_AUTHORIZED_REQUEST,
167
+ PRIO_ADFS_OAUTH_CLIENT_AUTHORIZATION_REQUEST,
168
+ PRIO_ADFS_OAUTH_CLIENT_CREDENTIAL_REQUEST,
169
+ PRIO_ADFS_OAUTH_CLIENT_PRV_KEY_JWT_AUTH,
170
+ PRIO_ADFS_OAUTH_CLIENT_SECRET_BASIC_AUTH,
171
+ PRIO_ADFS_OAUTH_CLIENT_SECRET_POST_AUTH,
172
+ PRIO_ADFS_OAUTH_CLIENT_WINDOWS_AUTH,
173
+ PRIO_ADFS_OAUTH_TOKEN_REQUESTS_SUCCESS,
174
+
175
+ PRIO_ADFS_PASSIVE_REQUESTS,
176
+ PRIO_ADFS_PASSPORT_AUTHENTICATOR,
177
+ PRIO_ADFS_PASSWORD_CHANGE_REQUEST,
178
+ PRIO_ADFS_SAMLP_TOKEN_REQUESTS,
179
+ PRIO_ADFS_SSO_AUTH,
180
+ PRIO_ADFS_TRUST_TOKEN_SUCCESS,
181
+ PRIO_ADFS_USER_PASS_AUTH,
182
+ PRIO_ADFS_WSFED_TOKEN_REQUESTS
183
};
184
185
int do_PerflibHyperV(int update_every, usec_t dt);