@cryptotaxi247 / netdata-1 / commits / cbe92ea5e

Active Directory Federation Service (windows.plugin) (#22113)

thiagoftsm committed Apr 6, 2026 at 17:19 UTC cbe92ea5e83914f9c892dc6b87d330bd75538a21
3 files changed +51 -2
src/collectors/windows.plugin/metadata.yaml
+6
@@ -2791,6 +2791,12 @@ modules:
2791 chart_type: line
2792 dimensions:
2793 - name: authentications
2794 + - name: adfs.extranet_account_lockouts
2795 + description: Extranet account lockouts
2796 + unit: lockouts/s
2797 + chart_type: line
2798 + dimensions:
2799 + - name: lockouts
2800 - name: adfs.external_authentications
2801 description: Authentications from external MFA providers
2802 unit: authentications/s
src/collectors/windows.plugin/perflib-adfs.c
+44 -2
@@ -31,6 +31,9 @@ struct adfs_certificate {
31 RRDSET *st_adfs_device_authentications_total;
32 RRDDIM *rd_adfs_device_authentications_total;
33
34 + RRDSET *st_adfs_extranet_account_lockouts_total;
35 + RRDDIM *rd_adfs_extranet_account_lockouts_total;
36 +
37 RRDSET *st_adfs_external_authentications;
38 RRDDIM *rd_adfs_external_authentications_success;
39 RRDDIM *rd_adfs_external_authentications_failure;
@@ -128,6 +131,7 @@ struct adfs_certificate {
131
132 // Auth
133 COUNTER_DATA ADFSDeviceAuthentications;
134 + COUNTER_DATA ADFSExtranetAccountLockouts;
135 COUNTER_DATA ADFSExternalAuthenticationsSuccess;
136 COUNTER_DATA ADFSExternalAuthenticationsFailure;
137 COUNTER_DATA ADFSFederationAuthentications;
@@ -184,6 +188,7 @@ struct adfs_certificate {
188
189 // Auth
190 .st_adfs_device_authentications_total = NULL,
191 + .st_adfs_extranet_account_lockouts_total = NULL,
192 .st_adfs_external_authentications = NULL,
193 .st_adfs_federation_authentications = NULL,
194 .st_adfs_federation_metadata_authentications = NULL,
@@ -226,6 +231,7 @@ struct adfs_certificate {
231
232 // Auth
233 .ADFSDeviceAuthentications.key = "Device Authentications",
234 + .ADFSExtranetAccountLockouts.key = "Extranet Account Lockouts",
235 .ADFSExternalAuthenticationsSuccess.key = "External Authentications",
236 .ADFSExternalAuthenticationsFailure.key = "External Authentication Failures",
237 .ADFSFederationAuthentications.key = "Federated Authentications",
@@ -241,9 +247,9 @@ struct adfs_certificate {
247 .ADFSOauthClientPrivkeyJwtAuthenticationFailure.key = "OAuth Client Private Key Jwt Authentication Failures",
248 .ADFSOauthClientSecretBasicAuthenticationsSuccess.key = "OAuth Client Secret Basic Authentications",
249 .ADFSOauthClientSecretBasicAuthenticationsFailure.key = "OAuth Client Secret Basic Authentication Failures",
244 - .ADFSOauthClientSecretPostAuthenticationsSuccess.key = "OAuth Client Secret Post Authentication",
250 + .ADFSOauthClientSecretPostAuthenticationsSuccess.key = "OAuth Client Secret Post Authentications",
251 .ADFSOauthClientSecretPostAuthenticationsFailure.key = "OAuth Client Secret Post Authentication Failures",
246 - .ADFSOauthClientWindowsAuthenticationsSuccess.key = "OAuth Client Windows Integrated Authentication",
252 + .ADFSOauthClientWindowsAuthenticationsSuccess.key = "OAuth Client Windows Integrated Authentications",
253 .ADFSOauthClientWindowsAuthenticationsFailure.key = "OAuth Client Windows Integrated Authentication Failures",
254 .ADFSOauthLogonCertificateRequestsSuccess.key = "OAuth Logon Certificate Token Requests",
255 .ADFSOauthLogonCertificateRequestsFailure.key = "OAuth Logon Certificate Request Failures",
@@ -500,6 +506,41 @@ void netdata_adfs_device_authentications(PERF_DATA_BLOCK *pDataBlock, PERF_OBJEC
506 rrdset_done(adfs.st_adfs_device_authentications_total);
507 }
508
509 +void netdata_adfs_extranet_account_lockouts(
510 + PERF_DATA_BLOCK *pDataBlock,
511 + PERF_OBJECT_TYPE *pObjectType,
512 + int update_every)
513 +{
514 + if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSExtranetAccountLockouts)) {
515 + return;
516 + }
517 +
518 + if (!adfs.st_adfs_extranet_account_lockouts_total) {
519 + adfs.st_adfs_extranet_account_lockouts_total = rrdset_create_localhost(
520 + "adfs",
521 + "extranet_account_lockouts",
522 + NULL,
523 + "auth",
524 + "adfs.extranet_account_lockouts",
525 + "Extranet account lockouts",
526 + "lockouts/s",
527 + PLUGIN_WINDOWS_NAME,
528 + "PerflibADFS",
529 + PRIO_ADFS_EXTRANET_ACCOUNT_LOCKOUTS_TOTAL,
530 + update_every,
531 + RRDSET_TYPE_LINE);
532 +
533 + adfs.rd_adfs_extranet_account_lockouts_total = rrddim_add(
534 + adfs.st_adfs_extranet_account_lockouts_total, "lockouts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
535 + }
536 +
537 + rrddim_set_by_pointer(
538 + adfs.st_adfs_extranet_account_lockouts_total,
539 + adfs.rd_adfs_extranet_account_lockouts_total,
540 + (collected_number)adfs.ADFSExtranetAccountLockouts.current.Data);
541 + rrdset_done(adfs.st_adfs_extranet_account_lockouts_total);
542 +}
543 +
544 void netdata_adfs_external_authentications(PERF_DATA_BLOCK *pDataBlock, PERF_OBJECT_TYPE *pObjectType, int update_every)
545 {
546 if (!perflibGetObjectCounter(pDataBlock, pObjectType, &adfs.ADFSExternalAuthenticationsSuccess) ||
@@ -1429,6 +1470,7 @@ static bool do_ADFS(PERF_DATA_BLOCK *pDataBlock, int update_every)
1470
1471 // Auth
1472 netdata_adfs_device_authentications,
1473 + netdata_adfs_extranet_account_lockouts,
1474 netdata_adfs_external_authentications,
1475 netdata_adfs_federated_authentications,
1476 netdata_adfs_federation_metadata_authentications,
src/collectors/windows.plugin/windows_plugin.h
+1
@@ -176,6 +176,7 @@ enum PERFLIB_PRIO {
176 PRIO_ADFS_DB_CONFIG_FAILURE_TOTAL,
177 PRIO_ADFS_DB_CONFIG_QUERY_TIME_SECONDS_TOTAL,
178 PRIO_ADFS_DEVICE_AUTHENTICATIONS_TOTAL,
179 + PRIO_ADFS_EXTRANET_ACCOUNT_LOCKOUTS_TOTAL,
180 PRIO_ADFS_EXTERNAL_AUTHENTICATION_TOTAL,
181 PRIO_ADFS_FEDERATION_AUTHENTICATION_TOTAL,
182 PRIO_ADFS_FEDERATION_REQUESTS_AUTHENTICATION_TOTAL,