mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 02:18:08 +00:00
Plugin amavis_awk: improve variable names
This commit is contained in:
parent
cdb9a4456f
commit
ba89ed208b
1 changed files with 6 additions and 8 deletions
|
@ -69,15 +69,13 @@ fi
|
|||
|
||||
|
||||
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
|
||||
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
|
||||
awk 'BEGIN { clean_count=0; passed_spam_count=0; blocked_spam_count=0; infected_count=0; total=0 }
|
||||
|
||||
{
|
||||
|
||||
if (index($0, "Passed CLEAN")) { na++ ; total++ }
|
||||
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
|
||||
else if (index($0, "Blocked SPAMMY")) { nc++ ; total++ }
|
||||
else if (index($0, "INFECTED")) { nd++ ; total++ }
|
||||
if (index($0, "Passed CLEAN")) { clean_count++ ; total++ }
|
||||
else if (index($0, "Passed SPAMMY")) { passed_spam_count++ ; total++ }
|
||||
else if (index($0, "Blocked SPAMMY")) { blocked_spam_count++ ; total++ }
|
||||
else if (index($0, "INFECTED")) { infected_count++ ; total++ }
|
||||
}
|
||||
END { print "clean.value " na"\np_spam.value " nb"\nb_spam.value " nc"\nvirus.value " nd"\ntotal.value " total }'
|
||||
|
||||
|
||||
END { print "clean.value " clean_count"\np_spam.value " passed_spam_count"\nb_spam.value " blocked_spam_count"\nvirus.value " infected_count"\ntotal.value " total }'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue