|
|
| Author |
Message |
luuk
Joined: 08 Mar 2004 Posts: 4
|
Posted: Wed Mar 30, 2005 6:08 am Post subject: ASSP antispam statistics |
|
|
Here my export of the ASSP antispam statistics.
| Description: |
|
| Filesize: |
70.01 KB |
| Viewed: |
11311 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
cacti_graph_template_assp_antispam_statistics.xml |
| Filesize: |
21.91 KB |
| Downloaded: |
548 Time(s) |
| Description: |
|
 Download |
| Filename: |
cacti_data_template_assp_statistics.xml |
| Filesize: |
6.8 KB |
| Downloaded: |
445 Time(s) |
|
|
| Back to top |
|
 |
luuk
Joined: 08 Mar 2004 Posts: 4
|
Posted: Wed Mar 30, 2005 6:09 am Post subject: |
|
|
here the perl script
| Description: |
|
 Download |
| Filename: |
asspstats.zip |
| Filesize: |
935 Bytes |
| Downloaded: |
497 Time(s) |
|
|
| Back to top |
|
 |
anTIDot
Joined: 16 Mar 2005 Posts: 7
|
Posted: Thu Mar 31, 2005 2:50 am Post subject: |
|
|
| SENKS
|
|
| Back to top |
|
 |
cybaspace
Joined: 11 Aug 2005 Posts: 2
|
Posted: Thu Aug 11, 2005 11:31 am Post subject: |
|
|
When I try to download the assp script, I download 'download.php' ?
I assume that isn't correct. Anywhere else where I can get that script?
|
|
| Back to top |
|
 |
cybaspace
Joined: 11 Aug 2005 Posts: 2
|
Posted: Thu Aug 11, 2005 11:58 am Post subject: |
|
|
| Ah, the name seems to be wrong. Renamed download.php to download.zip and it works!
|
|
| Back to top |
|
 |
PN
Joined: 10 Jul 2006 Posts: 1
|
Posted: Mon Jul 10, 2006 5:33 am Post subject: ASSP v1.2.3(0) problem ... |
|
|
The previuos script does not seem to work for a newer version of ASSP (current version 1.2.3) since the page has changed to infostats ...
How can I attach to that page from this script ?
We are running ASSP as a service on a windows 2003 server.
When i try to connect i get this message:
http://<user>:<password>@<ipaddress>:55555/infostatsHTTP::Request=HASH(0x82fc89c)HTTP::Response=HASH(0x8485800)
Any clue how to solve this problem ?
|
|
| Back to top |
|
 |
issmsatch
Joined: 01 Oct 2006 Posts: 18 Location: TX USA
|
Posted: Sun Oct 01, 2006 8:22 pm Post subject: |
|
|
Hi. I'm using CactiEZ ISO, Cacti version 0.8.6h. Also running ASSP 1.2.3 on the same box.
I don't have this working yet, but think I'm close. Think it may be the modified script takes to long to return the result?
Had to install the Perl LWP module first (required by asspstats.pl).
After tweaking asspstats.pl and when run from the command line I now get:
totalmessages:140476 smtpconnections:206954 bayesianspams:47896 localmails:4299 whitelistedmail:12681
The infostats page has changed so asspstats.pl script needs 5 lines to be updated:
pre v1.2.3 asspstats.pl:
if ($line2 =~ /optionValue">(\d+)<\/td/i) {
v1.2.3 asspstats.pl:
if ($line2 =~ /2">(\d+)<\/td/i) {
The other things I ran into is that the last line of the original script was:
print "\n smtpcon:$smtpcon totmess:$totmess bayspam:$bayspam locmail:$locmail whitemail:$whitemail\n\n";
I changed mine to match the rrd file info:
print "\n totalmessages:$totmess smtpconnections:$smtpcon bayesianspams:$bayspam localmails:$locmail whitelistedmail:$whitemail\n\n";
I followed the instructions on troubleshooting, used the rrdtool to increase the maximum values, cleared the poller cache, ran both cactid and cmd.ph pollers. Also ran the poller from the command line as apache. The poller and log file both show:
10/01/2006 05:05:06 PM - CMDPHP: Poller[0] Host[1] DS[27] WARNING: Result from CMD not valid. Partial Result:
10/01/2006 05:05:06 PM - CMDPHP: Poller[0] Host[1] DS[27] CMD: perl /var/www/html/scripts/asspstats.pl, output: U
10/01/2006 05:05:06 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (27,'','2006-10-01 17:05:03','U')"
File is still full of NaN's.
I haven't tried hitting the URL from an external Cacti box to see if it that works.
Any ideas?
Thanks for any help.
|
|
| Back to top |
|
 |
issmsatch
Joined: 01 Oct 2006 Posts: 18 Location: TX USA
|
Posted: Sun Oct 08, 2006 10:56 pm Post subject: |
|
|
I need to see if there's a way to increase the time to wait for the response from a script. Sometimes it takes a few seconds to get a response.
I have this working intermittently, here's what I've done so far:
Rebuilt the graph & data templates. (The instructions how to do this were helpful but need to be updated)
I changed the last line of the asspstats.pl script back to the original statement=
print "\n smtpcon:$smtpcon totmess:$totmess bayspam:$bayspam locmail:$locmail whitemail:$whitemail\n\n";
Still needed to change 5 lines in the original asspstats.pl:
if ($line2 =~ /optionValue">(\d+)<\/td/i) {
to:
if ($line2 =~ /2">(\d+)<\/td/i) {
Settings>Log Level = DEBUG.
WTF? It started working! Kind of. For awhile.
Set Log levels to default and it was still working. Then it quit several hours later after logrotate exited abnormally and sylog didn't restart. Now it's not working after a reboot.
The script runs from the command line, the only thing I can think is that it takes 5 to 10 seconds to get a response.
using
rrdtool fetch <your-rra-file>.rra LAST
was helpful to see if the .rra file was or was not updated.
I'll upgrade from 1.2.3 to a newer version within the next couple of weeks and maybe find a kludge that works more consistently. Logrotate & syslog problems have given me some grief too.
|
|
| Back to top |
|
 |
issmsatch
Joined: 01 Oct 2006 Posts: 18 Location: TX USA
|
Posted: Mon Oct 09, 2006 12:11 am Post subject: |
|
|
The script is taking 7 to 10 seconds to provide output. Under Settings, I increased from 25 to 70 seconds, increased threads from 1 to 2. Log file shows the :U 7 seconds after the script was run.
I've done some more searches, but not found any posts related to the "Script and Script Server Timeout Value" not being honored. I took it from 25 to 70 with the same result.
Here's the log event:
10/08/2006 11:55:07 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/assp_whitelistedmail_17.rrd --template 1160369706:U
Seems like the U: would not be in the log until 11:56:10 if it was waiting 70 seconds and not getting a response.
|
|
| Back to top |
|
 |
cooper76
Joined: 10 Oct 2006 Posts: 6
|
Posted: Tue Oct 10, 2006 2:00 pm Post subject: |
|
|
So what are the steps to get this working? I have the asspstats.pl script in the scripts folder and both of the xml files imported in Cacti. Do I need to add a device in Cacti, since the device info is already in the asspstats.pl script?
This is my first time using a third-party script/template.
Thanks
|
|
| Back to top |
|
 |
cooper76
Joined: 10 Oct 2006 Posts: 6
|
Posted: Wed Oct 11, 2006 8:08 am Post subject: |
|
|
Forget about my last post, I seem to have it working. Now the problem that I have is that script is not returning results back to Cacti. This is the error that I'm getting now.
WARNING: Result from CMD not valid. Partial Result:
Anyone seen this before?
|
|
| Back to top |
|
 |
cooper76
Joined: 10 Oct 2006 Posts: 6
|
Posted: Wed Oct 11, 2006 10:54 am Post subject: |
|
|
I got it working and NaN messages are gone. I had to make a change to the asspstats.pl script. I removed all the "/n" from the print statement. So my print looks like this.
print "smtpcon:$smtpcon totmess:$totmess bayspam:$bayspam locmail:$locmail whitemail:$whitemail";
BTW, I'm using the 1.2.4 of ASSP
|
|
| Back to top |
|
 |
issmsatch
Joined: 01 Oct 2006 Posts: 18 Location: TX USA
|
Posted: Wed Oct 11, 2006 1:20 pm Post subject: |
|
|
Cooper76,
Hey that's great!
Are you using the original asspstats.pl script or did you modify it?
|
|
| Back to top |
|
 |
cooper76
Joined: 10 Oct 2006 Posts: 6
|
Posted: Wed Oct 11, 2006 1:30 pm Post subject: |
|
|
I did modified it with your changes:
Changed those 5 lines, like you did
if ($line2 =~ /2">(\d+)<\/td/i) {
And I changed the last line (the "print" line) which I noted in my previous post.
EDIT: I also changed a part of the $starturl line:
before:
$starturl = 'http://'.$username.':'.$passwd.'@'. $ipaddress.':55555/stats';
after:
$starturl = 'http://'.$username.':'.$passwd.'@'. $ipaddress.':55555/infostats';
|
|
| Back to top |
|
 |
pgus
Joined: 10 Feb 2006 Posts: 30
|
Posted: Sun Oct 29, 2006 4:10 pm Post subject: Please post a working asspstats.pl |
|
|
Hi!
Can you please post your working asspstats.pl in forum?
Thanks in advance
|
|
| Back to top |
|
 |
|