i think this should fix ntp/smtp based on my testing. now to e2e test.
This commit is contained in:
@ -8,6 +8,6 @@
|
|||||||
QUEUES="incoming active deferred hold"
|
QUEUES="incoming active deferred hold"
|
||||||
|
|
||||||
for i in $QUEUES; do
|
for i in $QUEUES; do
|
||||||
COUNT=`qshape $i | grep TOTAL | awk '{print $2}'`
|
COUNT=$(qshape "$i" | grep TOTAL | awk '{print $2}')
|
||||||
printf "$COUNT\n"
|
printf "$COUNT\n"
|
||||||
done
|
done
|
@ -86,10 +86,10 @@ my ( $received,
|
|||||||
$rardnf,
|
$rardnf,
|
||||||
$rarnfqa,
|
$rarnfqa,
|
||||||
$iuscp,
|
$iuscp,
|
||||||
$msefl,
|
|
||||||
$sce,
|
$sce,
|
||||||
$scp,
|
$scp,
|
||||||
$urr) = split ( /\n/, $old );
|
$urr,
|
||||||
|
$msefl) = split ( /\n/, $old );
|
||||||
|
|
||||||
if ( ! defined( $received ) ){ $received=0; }
|
if ( ! defined( $received ) ){ $received=0; }
|
||||||
if ( ! defined( $delivered ) ){ $delivered=0; }
|
if ( ! defined( $delivered ) ){ $delivered=0; }
|
||||||
@ -142,7 +142,6 @@ my $recipientsC=0;
|
|||||||
my $recipienthdC=0;
|
my $recipienthdC=0;
|
||||||
my $deferralcrC=0;
|
my $deferralcrC=0;
|
||||||
my $deferralhidC=0;
|
my $deferralhidC=0;
|
||||||
my $chrC=0;
|
|
||||||
my $hcrnfqhC=0;
|
my $hcrnfqhC=0;
|
||||||
my $sardnfC=0;
|
my $sardnfC=0;
|
||||||
my $sarnobuC=0;
|
my $sarnobuC=0;
|
||||||
@ -193,14 +192,15 @@ sub newValue{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
my $output=`$pflogsumm /var/log/mail.log`;
|
my $output=`$pflogsumm /var/log/maillog`;
|
||||||
|
|
||||||
#holds client host rejected values till the end when it is compared to the old one
|
|
||||||
my $chrNew=0;
|
|
||||||
|
|
||||||
#holds RBL values till the end when it is compared to the old one
|
#holds RBL values till the end when it is compared to the old one
|
||||||
my $buNew=0;
|
my $buNew=0;
|
||||||
|
|
||||||
|
|
||||||
|
#holds client host rejected values till the end when it is compared to the old one
|
||||||
|
my $chrNew=0;
|
||||||
|
|
||||||
# holds recipient address rejected values till the end when it is compared to the old one
|
# holds recipient address rejected values till the end when it is compared to the old one
|
||||||
my $raruuNew=0;
|
my $raruuNew=0;
|
||||||
|
|
||||||
@ -353,6 +353,7 @@ while ( defined( $outputA[$int] ) ){
|
|||||||
# deferrals Host is down
|
# deferrals Host is down
|
||||||
if ( ( $line =~ /Host is down$/ ) && ( ! $handled ) ){
|
if ( ( $line =~ /Host is down$/ ) && ( ! $handled ) ){
|
||||||
$line=~s/ .*//;
|
$line=~s/ .*//;
|
||||||
|
$deferralcrC=$line;
|
||||||
$deferralhidC=$line;
|
$deferralhidC=$line;
|
||||||
$deferralhid=newValue( $deferralhid, $line );
|
$deferralhid=newValue( $deferralhid, $line );
|
||||||
$handled=1;
|
$handled=1;
|
||||||
@ -429,8 +430,8 @@ while ( defined( $outputA[$int] ) ){
|
|||||||
#Improper use of SMTP command pipelining
|
#Improper use of SMTP command pipelining
|
||||||
if ( ( $line =~ /Improper use of SMTP command pipelining/ ) && ( ! $handled ) ){
|
if ( ( $line =~ /Improper use of SMTP command pipelining/ ) && ( ! $handled ) ){
|
||||||
$line=~s/.*\: //g;
|
$line=~s/.*\: //g;
|
||||||
$iuoscpC=$line;
|
$iuscpC=$line;
|
||||||
$iuoscp=newValue( $iuoscp, $line );
|
$iuscp=newValue( $iuscp, $line );
|
||||||
}
|
}
|
||||||
|
|
||||||
#Message size exceeds fixed limit
|
#Message size exceeds fixed limit
|
||||||
@ -453,16 +454,18 @@ while ( defined( $outputA[$int] ) ){
|
|||||||
$scpC=$line;
|
$scpC=$line;
|
||||||
$scp=newValue( $scp, $line );
|
$scp=newValue( $scp, $line );
|
||||||
}
|
}
|
||||||
|
|
||||||
#unknown reject reason
|
#unknown reject reason
|
||||||
if ( ( $line =~ /unknown reject reason/ ) && ( ! $handled ) ){
|
if ( ( $line =~ /unknown reject reason/ ) && ( ! $handled ) ){
|
||||||
$line=~s/.*\: //g;
|
$line=~s/.*\: //g;
|
||||||
$urrC=$line;
|
$urrC=$line;
|
||||||
$urr=newValue( $urr, $line );
|
$urr=newValue( $urr, $line );
|
||||||
}
|
}
|
||||||
|
|
||||||
$int++;
|
$int++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# final client host rejected total
|
# final client host rejected total
|
||||||
$chr=newValue( $chr, $chrNew );
|
$chr=newValue( $chr, $chrNew );
|
||||||
|
|
||||||
@ -502,8 +505,8 @@ my $data=$received."\n".
|
|||||||
$iuscp."\n".
|
$iuscp."\n".
|
||||||
$sce."\n".
|
$sce."\n".
|
||||||
$scp."\n".
|
$scp."\n".
|
||||||
$urr."\n";
|
$urr."\n".
|
||||||
$msefl."\n".
|
$msefl."\n";
|
||||||
|
|
||||||
print $data;
|
print $data;
|
||||||
|
|
||||||
@ -535,10 +538,10 @@ my $current=$receivedC."\n".
|
|||||||
$rardnfC."\n".
|
$rardnfC."\n".
|
||||||
$rarnfqaC."\n".
|
$rarnfqaC."\n".
|
||||||
$iuscpC."\n".
|
$iuscpC."\n".
|
||||||
$mseflC."\n".
|
|
||||||
$sceC."\n".
|
$sceC."\n".
|
||||||
$scpC."\n".
|
$scpC."\n".
|
||||||
$urrC."\n";
|
$urrC."\n".
|
||||||
|
$mseflC."\n";
|
||||||
|
|
||||||
open(my $fh, ">", $cache) or die "Can't open '".$cache."'";
|
open(my $fh, ">", $cache) or die "Can't open '".$cache."'";
|
||||||
print $fh $current;
|
print $fh $current;
|
@ -49,8 +49,8 @@ cat ../../Agents/librenms/dpkg.sh > /usr/lib/check_mk_agent/local/dpkg.sh
|
|||||||
cat ../../Agents/librenms/ntp-client.sh > /usr/lib/check_mk_agent/local/ntp-client.sh
|
cat ../../Agents/librenms/ntp-client.sh > /usr/lib/check_mk_agent/local/ntp-client.sh
|
||||||
#cat ../../Agents/librenms/ntp-server.sh > /usr/lib/check_mk_agent/local/ntp-server.sh
|
#cat ../../Agents/librenms/ntp-server.sh > /usr/lib/check_mk_agent/local/ntp-server.sh
|
||||||
cat ../../Agents/librenms/os-updates.sh > /usr/lib/check_mk_agent/local/os-updates.sh
|
cat ../../Agents/librenms/os-updates.sh > /usr/lib/check_mk_agent/local/os-updates.sh
|
||||||
cat ../../Agents/librenms/postfix-detailed.sh > /usr/lib/check_mk_agent/local/postfix-detailed.sh
|
cat ../../Agents/librenms/postfixdetailed > /usr/lib/check_mk_agent/local/postfixdetailed
|
||||||
#cat ../../Agents/librenms/postfix-queue.sh > /usr/lib/check_mk_agent/local/postfix-queue.sh
|
cat ../../Agents/librenms/postfix-queues > /usr/lib/check_mk_agent/local/postfix-queues
|
||||||
#cat ../../Agents/librenms/smart.sh > /usr/lib/check_mk_agent/local/smart
|
#cat ../../Agents/librenms/smart.sh > /usr/lib/check_mk_agent/local/smart
|
||||||
#cat ../../Agents/librenms/smart.sh.config > /usr/lib/check_mk_agent/local/smart.config
|
#cat ../../Agents/librenms/smart.sh.config > /usr/lib/check_mk_agent/local/smart.config
|
||||||
|
|
||||||
|
@ -186,6 +186,7 @@ cockpit \
|
|||||||
iptables \
|
iptables \
|
||||||
netfilter-persistent \
|
netfilter-persistent \
|
||||||
iptables-persistent \
|
iptables-persistent \
|
||||||
|
pflogsumm \
|
||||||
postfix
|
postfix
|
||||||
|
|
||||||
export KALI_CHECK
|
export KALI_CHECK
|
||||||
|
Reference in New Issue
Block a user