ASSP antispam statistics
Moderators: Developers, Moderators
ASSP antispam statistics
Here my export of the ASSP antispam statistics.
- Attachments
-
- assp.jpg (70.01 KiB) Viewed 39933 times
-
- cacti_data_template_assp_statistics.xml
- (6.8 KiB) Downloaded 1642 times
-
- cacti_graph_template_assp_antispam_statistics.xml
- (21.91 KiB) Downloaded 1796 times
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 ?
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 ?
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.
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.
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.
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.
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.
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.
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
This is my first time using a third-party script/template.
Thanks
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
print "smtpcon:$smtpcon totmess:$totmess bayspam:$bayspam locmail:$locmail whitemail:$whitemail";
BTW, I'm using the 1.2.4 of ASSP
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';
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';
Please post a working asspstats.pl
Hi!
Can you please post your working asspstats.pl in forum?
Thanks in advance
Can you please post your working asspstats.pl in forum?
Thanks in advance
Who is online
Users browsing this forum: No registered users and 3 guests