HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   rrdtool,mailgraph,queuegraph (the easy way) (http://www.howtoforge.com/forums/showthread.php?t=18751)

MTvermoes 27th December 2007 00:31

rrdtool,mailgraph,queuegraph (the easy way)
 
1 Attachment(s)
(Updated attachment 3.Jan.2008)
This is testet on CentOS 5.1 with ISPConfig(stable)+Perfect Setup+dovecot

attached script will install RRDtool +all needed libs with --prefix=/usr
mailgraph.cgi and queuegraph.cgi will be installed in /root/ispconfig/standard_cgis/cgi-bin/
mods to detect spam and virus in maillog are made to
/root/ispconfig/isp/conf/customized_templates/spamassassin.rc.master
/root/ispconfig/isp/conf/spamassassin.rc.master
and
/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master
/root/ispconfig/isp/conf/antivirus.rc.master

Before you start :
Make sure that File::Tail is installed

perl -MCPAN -e shell
install File::Tail
exit

unpack attached file :
cd /usr/src
tar xvzf rmqinstall.tar.gz
cd rmqinstall
/bin/sh setup.sh

You will need to update users spamconf (check this link for info on howto)

You will allso need to copy mailgraph.cgi and queuegraph.cgi to existing websites cgi-bin

queuegraph.cgi will only be usefull if you are running a non Maildir queue

madmucho 31st December 2007 13:05

Im trying do this on mandriva but i have problem during install script runs to end but i thing something is bad.
Code:

--11:13:57--  http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947
          => `attachment.php?attachmentid=389&d=1173267947'
Resolving www.howtoforge.com... 78.47.159.34
Connecting to www.howtoforge.com|78.47.159.34|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 555 [plain/text]

100%[=============================================================>] 555          --.--K/s

11:13:57 (21.17 MB/s) - `attachment.php?attachmentid=389&d=1173267947' saved [555/555]

mv: cannot stat `./antivirus.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `./spamassassin.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master': není souborem ani adresářem
./setup.sh: line 68: ./spamassassin.rc.master.patch: není souborem ani adresářem
./setup.sh: line 69: ./antivirus.rc.master.patch: není souborem ani adresářem
rm: cannot remove `./spamassassin.rc.master.patch': není souborem ani adresářem
rm: cannot remove `./antivirus.rc.master.patch': není souborem ani adresářem
--11:13:57--  http://mailgraph.schweikert.ch/pub/mailgraph-1.14.tar.gz
          => `mailgraph-1.14.tar.gz'
Resolving mailgraph.schweikert.ch... 88.198.52.145
Connecting to mailgraph.schweikert.ch|88.198.52.145|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 22 014 (21K) [application/x-gzip]

i have czech locale, but 'není souborem ani adresářem' is 'isnt file or directory'.

Any idea?

MTvermoes 31st December 2007 16:39

For : madmucho

It is a problem with with wget not saving to the correct filenames.

replace
Code:

wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=388&d=1173267940"
with
Code:

wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=388&d=1173267940" -O antivirus.rc.master.patch.txt
allso replace
Code:

wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947"
with
Code:

wget "http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947"  -O spamassassin.rc.master.patch.txt
Best Regards and a Happy New Year

Mark

Quote:

Originally Posted by madmucho
Im trying do this on mandriva but i have problem during install script runs to end but i thing something is bad.
Code:

--11:13:57--  http://www.howtoforge.com/forums/attachment.php?attachmentid=389&d=1173267947
          => `attachment.php?attachmentid=389&d=1173267947'
Resolving www.howtoforge.com... 78.47.159.34
Connecting to www.howtoforge.com|78.47.159.34|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 555 [plain/text]

100%[=============================================================>] 555          --.--K/s

11:13:57 (21.17 MB/s) - `attachment.php?attachmentid=389&d=1173267947' saved [555/555]

mv: cannot stat `./antivirus.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `./spamassassin.rc.master.patch.txt': není souborem ani adresářem
mv: cannot stat `/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master': není souborem ani adresářem
./setup.sh: line 68: ./spamassassin.rc.master.patch: není souborem ani adresářem
./setup.sh: line 69: ./antivirus.rc.master.patch: není souborem ani adresářem
rm: cannot remove `./spamassassin.rc.master.patch': není souborem ani adresářem
rm: cannot remove `./antivirus.rc.master.patch': není souborem ani adresářem
--11:13:57--  http://mailgraph.schweikert.ch/pub/mailgraph-1.14.tar.gz
          => `mailgraph-1.14.tar.gz'
Resolving mailgraph.schweikert.ch... 88.198.52.145
Connecting to mailgraph.schweikert.ch|88.198.52.145|:80... connected.
HTTP požadavek odeslán, program čeká na odpověď ... 200 OK
Délka: 22 014 (21K) [application/x-gzip]

i have czech locale, but 'není souborem ani adresářem' is 'isnt file or directory'.

Any idea?


madmucho 2nd January 2008 10:49

Thanx, i will prepare mandriva specific howto atachments, is there some changes in path(s). It will be easier for beginners.

MTvermoes 3rd January 2008 18:12

Update
 
Today i have updated the attachment in msg 1.

Fixes:
wget not saving to correct filenames, when getting attachments from howtoforge.
allso patching files :
/root/ispconfig/isp/conf/antivirus.rc.master
/root/ispconfig/isp/conf/customized_templates/antivirus.rc.master
and
/root/ispconfig/isp/conf/spamassassin.rc.master
/root/ispconfig/isp/conf/customized_templates/spamassassin.rc.master

Needed to patch both places on my system to make this work, and allso preserve changes when updating ISPConfig.

/Mark

hvrossum 15th January 2008 17:54

how to Do call mailgraph.cgi
 
Hi,

I followed the steps to install both Mailgraph and Mailqueue. I find both CGI scripts in de cgi-bin dir in the root/ispconfig.

How do I get to work? I copied them to a website under ispconfig but I get a server 500 error when I call for them.
I have tried to put them in de cgi-bin dir which is standardly made when I install a website also in a sub dir cgi-bin under www/webXX/web/ but no luck.

What am i missing

MTvermoes 15th January 2008 21:46

Error 500 is most likely caused by file permissions.
The httpd user would need exe permissions mailgraph.cgi, and read permissions to .rrd files.
Allso a look in the logfile for that server will give you a good hint of what went wrong.
Make sure the first line in mailgraph.cgi points to the location of perl

Try do a :
whereis perl

/Mark

hvrossum 19th January 2008 11:00

Hi Mark,

Where should I put the link to perl

Whereis perl gives
perl: /usr/bin/perl /etc/perl /usr/lib/perl /usr/lib64/perl /usr/local/lib/perl /usr/share/perl /usr/share/man/man1/perl.1.gz

the mailgraph.cgi
--- mailgraph.cgi.orig 2007-08-29 11:06:01.000000000 +0200
+++ mailgraph.cgi 2007-12-26 19:53:33.000000000 +0100
@@ -16,9 +16,9 @@ my $xpoints = 540;
my $points_per_sample = 3;
my $ypoints = 160;
my $ypoints_err = 96;
-my $rrd = 'mailgraph.rrd'; # path to where the RRD database is
-my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD database is
-my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images
+my $rrd = '/var/lib/mailgraph.rrd'; # path to where the RRD database is
+my $rrd_virus = '/var/lib/mailgraph_virus.rrd'; # path to where the Virus RRD database is
+my $tmp_dir = '/tmp'; # temporary directory where to store the images

my @graphs = (
{ title => 'Last Day', seconds => 3600*24, },
@@ -163,7 +163,6 @@ sub print_html()

thanks

Harry

falko 20th January 2008 19:14

/usr/bin/perl is correct.

What's the output of
Code:

ls -la /path/to/mailgraph.cgi
?

hvrossum 20th January 2008 20:31

I think we are getting there but what to do to solve. The output is not very promising

ls: /path/to/mailgraph.cgi: No such file or directory


All times are GMT +2. The time now is 13:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.