mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Minor fixes for dspam_ plugin
This commit is contained in:
parent
4a7a0de134
commit
8cf82404ac
1 changed files with 8 additions and 2 deletions
|
@ -234,13 +234,17 @@ update_statefile() {
|
||||||
|
|
||||||
debug starting $dspam_stats -t -S
|
debug starting $dspam_stats -t -S
|
||||||
local t_start=$(date +%s)
|
local t_start=$(date +%s)
|
||||||
$dspam_stats -t -S | while read a b c d e f g h i j k l x; do
|
$dspam_stats -t -S | while read a b c d e f g h i j k l m x; do
|
||||||
|
|
||||||
# example of output format (3.9.1 rc1) for each user:
|
# example of output format (3.9.1 rc1) for each user:
|
||||||
#username@example.org
|
#username@example.org
|
||||||
# TP: 0 TN: 2147 FP: 0 FN: 53 SC: 0 NC: 0
|
# TP: 0 TN: 2147 FP: 0 FN: 53 SC: 0 NC: 0
|
||||||
# SHR: 0.00% HSR: 0.00% OCA: 97.59%
|
# SHR: 0.00% HSR: 0.00% OCA: 97.59%
|
||||||
|
|
||||||
|
# or for short user names:
|
||||||
|
#vmail TP: 1141 TN: 459 FP: 0 FN: 5 SC: 0 NC: 0
|
||||||
|
# SHR: 99.56% HSR: 0.00% OCA: 99.69%
|
||||||
|
|
||||||
case $a in
|
case $a in
|
||||||
TP:)
|
TP:)
|
||||||
# the 2nd line
|
# the 2nd line
|
||||||
|
@ -262,6 +266,8 @@ update_statefile() {
|
||||||
*)
|
*)
|
||||||
# the 1st line
|
# the 1st line
|
||||||
local uid=$a
|
local uid=$a
|
||||||
|
# data from 2nd line is also here
|
||||||
|
[ "$b" = "TP:" ] && local tp=$c tn=$e fp=$g fn=$i sc=$k nc=$m
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -495,7 +501,7 @@ print_fetch() {
|
||||||
if [ -n "$pattern" ]; then
|
if [ -n "$pattern" ]; then
|
||||||
debug env.pattern was set, so use it: $pattern
|
debug env.pattern was set, so use it: $pattern
|
||||||
continue
|
continue
|
||||||
elif [ $target == "ALL" ]; then
|
elif [ $target = "ALL" ]; then
|
||||||
local pattern="-v TOTAL"
|
local pattern="-v TOTAL"
|
||||||
debug target=ALL: need pattern for all users, but not for TOTAL: $pattern
|
debug target=ALL: need pattern for all users, but not for TOTAL: $pattern
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue