|
|
| Author |
Message |
dinfiesta
Joined: 24 Nov 2005 Posts: 8
|
Posted: Mon Dec 05, 2005 9:09 pm Post subject: Re: ok |
|
|
| yianniska wrote: | import is ok but still i cannot get any graphs
when i try to create the graphs
i get this error
RRDTool Says:
ERROR: opening '/var/www/html/cacti0.8.6d/rra/eml2_mess_recv_62.rrd': No such file or directory.
i 've put the scripts to the mail server
i also put the extra lines in my ucdsnmp.conf
but no luck.
could you please help me with this because i find this graphs very
nice
thanks |
I have same issue:
ERROR: opening '/var/www/html/cacti/rra/springfield_mess_recv_71.rrd': No such file or directory
Why it does not create graphics? |
|
| Back to top |
|
 |
HyTeK
Joined: 03 Dec 2005 Posts: 11
|
Posted: Wed Dec 14, 2005 9:53 pm Post subject: |
|
|
any updates to this yet? I really want to use this particular script, but earlier someone stated they were rewriting it for an easier install. I wouldn't mind waiting a bit longer if it isn't to far off from being done.
Any word on that?
Cheers. |
|
| Back to top |
|
 |
stevewest15
Joined: 25 Oct 2005 Posts: 9
|
Posted: Thu Dec 15, 2005 3:25 am Post subject: |
|
|
| warnesj wrote: | | The new version should be a bit easier to setup. | Hopefully testing is going well? Can't wait to see what you got
SW |
|
| Back to top |
|
 |
polosport
Joined: 13 Dec 2005 Posts: 9 Location: Los Angeles, CA
|
Posted: Wed Dec 28, 2005 1:36 pm Post subject: |
|
|
| Is there any update to this? I'm looking forward to getting this working. I was able to get the graph to display, but all the numbers are staying at 0. Any ideas? |
|
| Back to top |
|
 |
centyx
Joined: 10 Jan 2006 Posts: 4
|
Posted: Tue Jan 10, 2006 4:40 pm Post subject: incoming/outgoing message tracking with sendmail |
|
|
| Greetings. I'm using these scripts as a starting point, but want to make a few modifications. I have already opted to go with BFD's (http://www.rfxnetworks.com/bfd.php) tlog script for managing the tailing of the log file instead of the time_trigger. This makes more sense to me. What I am trying to figure out now is a way of measuring incoming and outgoing messages in sendmail without having to list the domains on the server. This is not practical, as new domains are added frequently, and the list is quite long. Has anyone found an alternate solution? |
|
| Back to top |
|
 |
centyx
Joined: 10 Jan 2006 Posts: 4
|
Posted: Tue Jan 10, 2006 6:20 pm Post subject: |
|
|
These machines are running Ensim, so I decided to have the scripts look for "mailer=virthostmail" and "stat=Sent" for incoming, and "mailer=esmtp" and "stat=Sent" for outgoing. That fixed that.
Now if only I could get the graph template to import successfully ;-s
Getting the error:
Error: XML: Cacti version does not exist.
Using Cacti 0.8.6g.
EDIT: Upgrading to 0.8.6h fixed that. |
|
| Back to top |
|
 |
centyx
Joined: 10 Jan 2006 Posts: 4
|
Posted: Thu Jan 12, 2006 5:12 pm Post subject: |
|
|
| Has anyone found a way to display the total number of sent/received/spam/virus messages in a comment, similar to the way total bandwidth usage can be displayed? |
|
| Back to top |
|
 |
mandrk
Joined: 12 May 2005 Posts: 21 Location: Romania
|
Posted: Sat Feb 11, 2006 5:40 am Post subject: I have some problem with template |
|
|
I use fedora core3
Everything same to be ok but no graphic.
----------------
RRDTool Says:
ERROR: opening '/var/www/html/monitoring/rra/mydomain_com_mess_recv_225.rrd': No such file or directory
--------------------
In Data source when i use in debug mode:
---------------------
/usr/bin/rrdtool create \
/var/www/html/monitoring/rra/mydomain_com_mess_recv_229.rrd \
--step 300 \
DS:mess_sent:GAUGE:600:0:100000000 \
DS:mess_recv:GAUGE:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
--------------------
i run in /opt the scripts
-----------
./count_recv.sh
.1.3.6.1.4.100.5
gauge
0
./count_sent.sh
.1.3.6.1.4.100.6
gauge
1
------------- |
|
| Back to top |
|
 |
xoyox
Joined: 27 Mar 2006 Posts: 1
|
Posted: Mon Mar 27, 2006 5:39 am Post subject: Error: XML: Hash version does not exist. |
|
|
| When I add your template it says to me :"Error: XML: Hash version does not exist." ?? |
|
| Back to top |
|
 |
Atreillou
Joined: 28 Apr 2006 Posts: 2
|
Posted: Tue May 02, 2006 4:09 am Post subject: |
|
|
hi,
i try to use this script
| Code: |
[root@server]:[/usr/share/cacti/site/scripts/sendmail]#cat recu.sh
#!/bin/sh
echo .1.3.6.1.4.100.5
echo gauge
tail -n 5000 /var/log/mail.info|awk '
BEGIN {
search_time = "^" strftime("%b %e %H:%M:%S", systime() - 5 * 60);
search_sent = "stat=Sent";
search_domain_1 = "@atreillou.com";
recv_count = 0;
}
{
if ($0 ~ search_time && $0 ~ search_sent) time_trigger = 1;
if ($0 ~ search_sent) is_sent_trigger = 1;
if ($0 ~ search_domain_1) is_domain_trigger = 1;
if ($0 ~ search_domain_2) is_domain_trigger = 1;
if (time_trigger && is_sent_trigger && is_domain_trigger) recv_count++;
is_sent_trigger = 0;
is_domain_trigger = 0;
}
END { print recv_count; }'
exit
|
but it's only work when i remove search_time line:
| Code: |
[root@server]:[/usr/share/cacti/site/scripts/sendmail]#diff recu.sh recunodate.sh
6c6
< search_time = "^" strftime("%b %e %H:%M:%S", systime() - 5 * 60);
---
> # search_time = "^" strftime("%b %e %H:%M:%S", systime() - 5 * 60);
|
| Code: |
[root@server]:[/usr/share/cacti/site/scripts/sendmail]#sh recu.sh
.1.3.6.1.4.100.5
gauge
0
[root@server]:[/usr/share/cacti/site/scripts/sendmail]#sh recunodate.sh
.1.3.6.1.4.100.5
gauge
48
|
it's the same problem with mailstats.sh, sent.sh etc
Any idea ?
I sent/receive 10 mail in last 5 minutes for the test
one log line:
| Code: | [root@server]:[/usr/share/cacti/site/scripts/sendmail]#tail -n 1 /var/log/mail.info
May 2 11:08:36 server sendmail[26267]: k422ejU9019740: to=<nicholas@paramed.biz>, delay=06:27:51, xdelay=00:03:09, mailer=esmtp, pri=3118721, relay=paramed.biz. [204.251.15.174], dsn=4.0.0, stat=Deferred: Connection timed out with paramed.biz.
|
|
|
| Back to top |
|
 |
yetdog
Joined: 08 Aug 2005 Posts: 20
|
Posted: Tue May 09, 2006 9:18 am Post subject: |
|
|
Oddly enough, while the script works to collect the data:
[root@MAILER-02]# ./stats2.sh
.1.3.6.1.4.100.6
gauge
Start time: 20060509101112
Year run: 2006
3890
And I put the correct lines into snmpd.conf and restart snmpd:
#Count the number of Spam messages dropped by spamass in the last 5 minutes
pass .1.3.6.1.4.100.6 /bin/sh /path/to/stats2.sh
When I run:
snmpget -v 1 -c public IP_ADDRESS .1.3.6.1.4.100.6
I get this:
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::private.100.6
Weird??!?? Any ideas? |
|
| Back to top |
|
 |
enhan
Joined: 30 May 2006 Posts: 1
|
Posted: Tue May 30, 2006 7:22 pm Post subject: Re: ok |
|
|
| dinfiesta wrote: | | yianniska wrote: | import is ok but still i cannot get any graphs
when i try to create the graphs
i get this error
RRDTool Says:
ERROR: opening '/var/www/html/cacti0.8.6d/rra/eml2_mess_recv_62.rrd': No such file or directory.
i 've put the scripts to the mail server
i also put the extra lines in my ucdsnmp.conf
but no luck.
could you please help me with this because i find this graphs very
nice
thanks |
I have same issue:
ERROR: opening '/var/www/html/cacti/rra/springfield_mess_recv_71.rrd': No such file or directory
Why it does not create graphics? |
Has anyone managed to get this to work, I've done a fair bit with mrtg, rrdtool and cacti as well, but I can't get this to make any graphs, even though the snmp stuff works fine! |
|
| Back to top |
|
 |
renow
Joined: 29 Jun 2006 Posts: 2
|
Posted: Thu Jun 29, 2006 7:51 am Post subject: count_recv.sh missing mails ? |
|
|
Hi,
It seems this script search for a line with 5 minutes before now and a sent mail, but if we don't have sent mail at this moment but just one or more minute(s) later the counter isn't incremented at all.
I'm not very good in awk syntax, maybe there is a nicer way to do that, but I think the script should be :
| Code: | #!/bin/sh
echo .1.3.6.1.4.100.5
echo gauge
tail -n 5000 /var/log/maillog|awk '
BEGIN {
search_time1 = "^" strftime("%b %e %H:%M", systime() - 5 * 60);
search_time2 = "^" strftime("%b %e %H:%M", systime() - 4 * 60);
search_time3 = "^" strftime("%b %e %H:%M", systime() - 3 * 60);
search_time4 = "^" strftime("%b %e %H:%M", systime() - 2 * 60);
search_time5 = "^" strftime("%b %e %H:%M", systime() - 1 * 60);
search_sent = "status=sent"; #for postfix
search_domain_1 = "@domain.com";
search_domain_2 = "@domain.org";
recv_count = 0;
}
{
if (($0 ~ search_time1 || $0 ~ search_time2 || $0 ~ search_time3 || $0 ~ search_time4 || $0 ~ search_time5) && $0 ~ search_sent) time_trigger = 1;
if ($0 ~ search_sent) is_sent_trigger = 1;
if ($0 ~ search_domain_1) is_domain_trigger = 1;
if ($0 ~ search_domain_2) is_domain_trigger = 1;
if (time_trigger && is_sent_trigger && is_domain_trigger) recv_count++;
is_sent_trigger = 0;
is_domain_trigger = 0;
}
END { print recv_count; }'
exit |
Am I wrong ? |
|
| Back to top |
|
 |
renow
Joined: 29 Jun 2006 Posts: 2
|
Posted: Thu Jun 29, 2006 9:00 am Post subject: |
|
|
sorry, I'd missed the page 2 of the post ;-(
I have now the classical issue : no graph...
Here is my log
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="NEOMAIL - E-Mail Statistics" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="# of Messages" \
--slope-mode \
DEF:a="/var/www/htdocs/cacti/rra/neomail_mess_recv_146.rrd":mess_recv:AVERAGE \
DEF:b="/var/www/htdocs/cacti/rra/neomail_viruses_145.rrd":viruses:AVERAGE \
DEF:c="/var/www/htdocs/cacti/rra/neomail_viruses_145.rrd":spam:AVERAGE \
DEF:d="/var/www/htdocs/cacti/rra/neomail_mess_recv_146.rrd":mess_sent:AVERAGE \
CDEF:cdefbd=d,-1,* \
AREA:a#00CF00:"Messages Recieved" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" \
AREA:b#FF0000:"Viruses" \
GPRINT:b:LAST:" Current\:%8.0lf" \
GPRINT:b:AVERAGE:"Average\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf\n" \
AREA:c#EA8F00:"SPAM":STACK \
GPRINT:c:LAST:" Current\:%8.0lf" \
GPRINT:c:AVERAGE:"Average\:%8.0lf" \
GPRINT:c:MAX:"Maximum\:%8.0lf\n" \
COMMENT:"\n" \
AREA:cdefbd#7CB3F1:"Messages Sent" \
GPRINT:d:LAST:" Current\:%8.0lf" \
GPRINT:d:AVERAGE:"Average\:%8.0lf" \
GPRINT:d:MAX:"Maximum\:%8.0lf"
RRDTool Says:
ERROR: opening '/var/www/htdocs/cacti/rra/neomail_mess_recv_146.rrd': No such file or directory |
|
| Back to top |
|
 |
warnesj Cacti User
Joined: 29 May 2005 Posts: 170
|
Posted: Mon Aug 21, 2006 10:04 pm Post subject: |
|
|
Hi all, I'm back! Sorry for being MIA for a while and missed out on all the questions. I'm terribly sorry.
I just wanted to post in this thread that I've finally finished the new version of the scripts and templates. These ones are WAY more effecient! No longer do the scripts beat the hell out of your mail severs to find out what's going on. Also these new scripts can handle servers that have high load, so no more graphs with gaps in them!
I'm just letting the scripts run for the next 24 hours on my servers just to test them for a while. So baring any problems in the next 24 hours, come tommorow I'll create a new post for the new version. Hopefully any outstanding problems will be solved in the new version. But then again, maybe not.  |
|
| Back to top |
|
 |
|