From 5acc49a55ca81bb262abf16e87f175c065f0ac11 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 26 Mar 2022 18:30:16 +0100 Subject: [PATCH] Fix counting samba computers auth tries --- zabbix_scripts/check_samba_dc_sudo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix_scripts/check_samba_dc_sudo b/zabbix_scripts/check_samba_dc_sudo index 63cf98e..d6decf9 100644 --- a/zabbix_scripts/check_samba_dc_sudo +++ b/zabbix_scripts/check_samba_dc_sudo @@ -167,7 +167,7 @@ if (defined $ou){ my $subject; if ($type eq 'Authentication'){ # Accounts ending with $ are for computers - $subject = (($event->{$type}->{mappedAccount} || $event->{$type}->{clientAccount} || '')=~ m/\$$/) ? 'computers' : 'users'; + $subject = (($event->{$type}->{mappedAccount} || $event->{$type}->{clientAccount} || '')=~ m/\$(\@.+)?$/) ? 'computers' : 'users'; if ($event->{Authentication}->{status} eq 'NT_STATUS_OK'){ $json->{activity}->{authentications}->{$subject}->{success}++; } else {