mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Basic SenderBase plugin.
This commit is contained in:
parent
5f432d0d6d
commit
c7ad869541
20
plugins/senderbase/senderbase
Executable file
20
plugins/senderbase/senderbase
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
real_ip_address=${ip_address:-$(hostname -I | head -1)}
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
graph_category mail
|
||||||
|
graph_title SenderBase Reputation for $real_ip_address
|
||||||
|
graph_info Current reputation from senderbase.org. Ranges from -10 (very poor) through 0 (neutral) to 10 (very good).
|
||||||
|
reputation.label Reputation
|
||||||
|
reputation.warning :0
|
||||||
|
reputation.critical :-5
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ip_reversed=$(echo $real_ip_address | sed -re 's/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/\4.\3.\2.\1/')
|
||||||
|
query_host=${ip_reversed}.rf.senderbase.org
|
||||||
|
value=$(dig +short $query_host TXT | sed 's/"//g' | head -1)
|
||||||
|
echo reputation.value ${value:-U}
|
Loading…
Reference in New Issue
Block a user