Re: OT: Mail/Spam Stats and MRTG

2005-06-06 Thread Paolo Cravero as2594

Jake Colman wrote:

Does anyone have any suggestions for using mrtg to produce a graph showing
the amount of received email and how much of it was flagged as spam?

I am using mrtg, sendmail, and procmail on all the same server.


You need to write an external program (script) for the SNMPdeamon on 
the server. It returns a single number computed out of sendmail/procmail 
maillog of whatever you want to monitor. Then use MRTG to manipulate the 
value (cumulative vs last-5-minutes).


Here we use Cricket to monitor SpamAssassin performance in 
quasi-real-time. But I didn't set it up myself.


HTHAL,
Paolo

---
SpamAssassin-based email antispam/antivirus solutions
Italian/English-to/from-Croatian translations


Re: OT: Mail/Spam Stats and MRTG

2005-06-06 Thread Ed Kasky

At 08:20 AM Monday, 6/6/2005, Jake Colman wrote -=


Does anyone have any suggestions for using mrtg to produce a graph showing
the amount of received email and how much of it was flagged as spam?

I am using mrtg, sendmail, and procmail on all the same server.


Try this:

http://users.2z.net/rpuhek/scripts_public/spamd/

Ed Kasky
~
Randomly Generated Quote (274 of 477):
Difficulties increase the nearer we approach our goal.
   -Goethe (1749-1832)



RE: OT: Mail/Spam Stats and MRTG

2005-06-06 Thread Ben Story
Does anyone know of any scripts that utilize the SA 3.x log file format
to keep track of what rules fire in nice manager friendly graphs?

--
Benjamin Story, CCNA CCDA
Client Server Technical Analyst
www.dotfoods.com
IT Helpdesk x2312
 
-Original Message-
From: Ed Kasky [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 06, 2005 10:39 AM
To: Jake Colman; users@spamassassin.apache.org
Subject: Re: OT: Mail/Spam Stats and MRTG

At 08:20 AM Monday, 6/6/2005, Jake Colman wrote -=

Does anyone have any suggestions for using mrtg to produce a graph 
showing the amount of received email and how much of it was flagged as
spam?

I am using mrtg, sendmail, and procmail on all the same server.

Try this:

http://users.2z.net/rpuhek/scripts_public/spamd/

Ed Kasky
~
Randomly Generated Quote (274 of 477):
Difficulties increase the nearer we approach our goal.
-Goethe (1749-1832)



Re: OT: Mail/Spam Stats and MRTG

2005-06-06 Thread Jason Philbrook
We uses these scripts with mrtg/postfix/clamav/spamassassin/procmail to 
sample the logfiles each time mrtg runs.

mc1:/usr/local/mis/sbin # cat sacleanratio.mrtg 
#!/bin/bash
tail -n 1000 /var/log/mail |grep spamd |grep clean message |wc -l |sed -e s/
tail -n 1000 /var/log/mail |grep spamd |grep seconds, |wc -l |sed -e s/ *//g
echo 0
echo 0
mc1:/usr/local/mis/sbin # cat saspamratio.mrtg 
#!/bin/bash
tail -n 1000 /var/log/mail |grep spamd |grep identified spam |wc -l |sed -e 
tail -n 1000 /var/log/mail |grep spamd |grep seconds, |wc -l |sed -e s/ *//g
echo 0
echo 0
mc1:/usr/local/mis/sbin # cat satime.mrtg 
#!/bin/bash
tail -n 5000 /var/log/mail |grep spamd |grep seconds |cut -d: -f5 |cut -d  
-ftdc -e 1000 `awk -f /usr/local/mis/sbin/avg.awk  ~/num.txt` * p
echo 0
echo 0
echo 0
mc1:/usr/local/mis/sbin # cat saratio.mrtg 
#!/bin/bash
tail -n 1000 /var/log/mail |grep spamd |grep clean message |wc -l |sed -e s/
tail -n 1000 /var/log/mail |grep spamd |grep identified spam |wc -l |sed -e 
echo 0
echo 0

mc1:/usr/local/mis/sbin # more ../etc/mrtg/load.cfg 
WorkDir: /usr/local/apache/htdocs/mrtg
WithPeak[_]: ymw
#Options[_]: growright, gauge, nopercent, nolegend, nobanner, noo
#AbsMax[_]: 40
XSize[_]: 500
YSize[_]: 160

Target[load]: `cat /proc/loadavg |cut  -d  -f1 ;echo 0 ; echo 0; echo 
0`
ShortLegend[load]: 1 min.
YLegend[load]: CPU Load
Options[load]: growright, gauge, nopercent, nolegend, nobanner, noo
MaxBytes[load]: 30
Unscaled[load]: d
Title[load]: CPU Load Analysis
PageTop[load]: H3Load Analysis/H3

Target[spamd]: `/usr/local/mis/sbin/satime.mrtg`
YLegend[spamd]: MilliSeconds
Options[spamd]: growright, gauge, nopercent, nolegend, nobanner, noo
ShortLegend[spamd]: Millisec
MaxBytes[spamd]: 2
Title[spamd]: Spamd processing time averages
PageTop[spamd]: H3spamd processing time average/H3

Target[cratio]: `/usr/local/mis/sbin/sacleanratio.mrtg`
YLegend[cratio]: Messages
Options[cratio]: growright, gauge, nopercent, nolegend, nobanner, 
dorelpercent, 
integer
ShortLegend[cratio]: Messages
Legend1[cratio]: Clean Messages
Legend2[cratio]: Total Messages
LegendI[cratio]: Clean Messages
LegendO[cratio]: Total Messages
MaxBytes[cratio]: 500
Title[cratio]: Clean versus total email
PageTop[cratio]: H3Clean versus total email/H3


Target[sratio]: `/usr/local/mis/sbin/saspamratio.mrtg`
YLegend[sratio]: Messages
Options[sratio]: growright, gauge, nopercent, nolegend, nobanner, 
dorelpercent, 
integer
ShortLegend[sratio]: Messages
Legend1[sratio]: Spam Messages
Legend2[sratio]: Total Messages
LegendI[sratio]: Spam Messages
LegendO[sratio]: Total Messages
MaxBytes[sratio]: 500
Title[sratio]: Spam versus total email
PageTop[sratio]: H3Spam versus total email/H3


On Mon, Jun 06, 2005 at 11:20:47AM -0400, Jake Colman wrote:
 
 Does anyone have any suggestions for using mrtg to produce a graph showing
 the amount of received email and how much of it was flagged as spam?
 
 I am using mrtg, sendmail, and procmail on all the same server.
 
 Thanks!
 
 ...Jake
 
 -- 
 Jake Colman
 Sr. Applications Developer
 Principia Partners LLC
 Harborside Financial Center
 1001 Plaza Two
 Jersey City, NJ 07311
 (201) 209-2467
 www.principiapartners.com

-- 
/*
Jason Philbrook   |   Midcoast Internet Solutions - Internet Access,
KB1IOJ|  Hosting, and TCP-IP Networks for Midcoast Maine
 http://f64.nu/   | http://www.midcoast.com/
*/