Fix AWK syntax errors in monitoring scripts
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 1m48s

- Remove semicolons from variable initialization in AWK scripts
- Each variable now on separate line to prevent syntax errors
- Fixes "syntax error at or near ," in monitor-attacks.sh and manage-blocked-ips.sh
- Scripts now properly parse HAProxy 3.0.11 threat intelligence data

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-22 19:42:54 -07:00
parent 4c4e99883b
commit 8636b69ee1
2 changed files with 19 additions and 5 deletions

View File

@@ -57,7 +57,11 @@ case "$1" in
echo "show table web" | socat stdio "$SOCKET" | awk '
NR>1 {
ip = $1
auth_fail = 0; authz_fail = 0; scanner = 0; repeat_off = 0; manual_bl = 0
auth_fail = 0
authz_fail = 0
scanner = 0
repeat_off = 0
manual_bl = 0
if ($0 ~ /gpc\(0\)=([0-9]+)/) { match($0, /gpc\(0\)=([0-9]+)/, arr); auth_fail = arr[1] }
if ($0 ~ /gpc\(1\)=([0-9]+)/) { match($0, /gpc\(1\)=([0-9]+)/, arr); authz_fail = arr[1] }