Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jul 22, 2019 5:56 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: ASSP antispam statistics
PostPosted: Wed Mar 30, 2005 6:08 am 
Offline

Joined: Mon Mar 08, 2004 9:01 am
Posts: 4
Here my export of the ASSP antispam statistics.


Attachments:
cacti_graph_template_assp_antispam_statistics.xml [21.91 KiB]
Downloaded 1381 times
cacti_data_template_assp_statistics.xml [6.8 KiB]
Downloaded 1202 times
assp.jpg
assp.jpg [ 70.01 KiB | Viewed 32706 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 6:09 am 
Offline

Joined: Mon Mar 08, 2004 9:01 am
Posts: 4
here the perl script


Attachments:
asspstats.zip [935 Bytes]
Downloaded 1284 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 2:50 am 
Offline

Joined: Wed Mar 16, 2005 4:16 am
Posts: 7
SENKS


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 11:31 am 
Offline

Joined: Thu Aug 11, 2005 11:29 am
Posts: 2
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?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 11:58 am 
Offline

Joined: Thu Aug 11, 2005 11:29 am
Posts: 2
Ah, the name seems to be wrong. Renamed download.php to download.zip and it works!


Top
 Profile  
 
 Post subject: ASSP v1.2.3(0) problem ...
PostPosted: Mon Jul 10, 2006 5:33 am 
Offline

Joined: Mon Jul 10, 2006 5:27 am
Posts: 1
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 ?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 01, 2006 8:22 pm 
Offline

Joined: Sun Oct 01, 2006 2:43 am
Posts: 18
Location: TX USA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 08, 2006 10:56 pm 
Offline

Joined: Sun Oct 01, 2006 2:43 am
Posts: 18
Location: TX USA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 09, 2006 12:11 am 
Offline

Joined: Sun Oct 01, 2006 2:43 am
Posts: 18
Location: TX USA
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 10, 2006 2:00 pm 
Offline

Joined: Tue Oct 10, 2006 1:50 pm
Posts: 6
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 8:08 am 
Offline

Joined: Tue Oct 10, 2006 1:50 pm
Posts: 6
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?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 10:54 am 
Offline

Joined: Tue Oct 10, 2006 1:50 pm
Posts: 6
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 1:20 pm 
Offline

Joined: Sun Oct 01, 2006 2:43 am
Posts: 18
Location: TX USA
Cooper76,

Hey that's great!

Are you using the original asspstats.pl script or did you modify it?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 1:30 pm 
Offline

Joined: Tue Oct 10, 2006 1:50 pm
Posts: 6
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';


Top
 Profile  
 
 Post subject: Please post a working asspstats.pl
PostPosted: Sun Oct 29, 2006 4:10 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 9:54 am
Posts: 47
Hi!

Can you please post your working asspstats.pl in forum?

Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group