[mrtg] Re: mrtg with sendmail again

Imran imranbhatti at isb.sdnpk.org
Tue Mar 13 16:36:54 MET 2001



First of all thanks very much for your reply.

first of all i tells you that i install mrtg on local mailserver.
so i need ssh???

and another thing is confusing that is 

LogFormat: rrdtool




if i am used  this cfg file as below
what will be the out put????????
where perlcfg.pl is script i downloaded from your recomended site

Workdir:/usr/local/apache/htdocs/mailstats
LogFormat: rrdtool
PathAdd: /usr/local/bin
Options[^]: perminute,nopercent,integer
Target[mail-msg]: `/usr/local/src/mrtg-2.9.10/bin/perlcfg.pl
ns1-isb.sdnpk.org`
MaxBytes[mail-msg]: 2000000
Title[mail-msg]: SMTP Messages/minute on mail.server.com
PageTop[mail-msg]: SMTP Messages/minute on mail.server.com
Legend1[mail-msg]: SMTP Messages/minute in
Legend2[mail-msg]: SMTP Messages/minute out
LegendI[mail-msg]: SMTP Messages/minute in
LegendO[mail-msg]: SMTP Messages/minute out


i am waiting for your kind response






On Tue, 13 Mar 2001, Daniel R . Kilbourne wrote:

> 
> Imran extolled:
> > 
> > Target[mail]: `/usr/sbin/mailstats`
> > 
> 
> You can not call mailstats directly as a Target and have it work.
> Remember, mrtg needs a certain format for input:
> 	integer
> 	integer
> 	blah
> 	blah
> 
> mailstats returns:
> 
> Statistics from Sat Feb 17 19:30:00 2001
>  M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis  Mailer
>  5       94        393K       19         27K        6       0  esmtp
>  8      675        766K      749       1056K        0       0  local
> =============================================================
>  T      769       1159K      768       1083K        6       0
> netophilia:drk:[9:31am]:~>
> 
> So, you need to parse the output from mailstats before sending it to mrtg.
> 
> What are you looking for? I have perl scripts (didn't write them, don't remember where they came from)
> that will parse out smtp bytes and smtp message numbers. You can snag copies of them from 
> http://netophilia.net/MRTG/scripts if interested.
> 
> One thing to note, however, is that you will need to get ssh working without a password between the mrtg
> machine and the mail server (via .shosts or other method (I think authorized_key file maybe?)).
> 
> So, once you get these perl scripts and get the ssh passwordless stuff going, you need to have your config
> changed thusly:
> 
> 
> Workdir:/path/to/workdir/
> LogFormat: rrdtool
> PathAdd: /usr/local/bin
> Options[^]: perminute,nopercent,integer
> 
> Target[mail-bytes]: `/home/mrtg/configs/scripts/get-smtp-bytes.pl mail.server.com`
> MaxBytes[mail-bytes]: 4000000
> Title[mail-bytes]: SMTP Bytes/minute on mail.server.com
> PageTop[mail-bytes]: SMTP Bytes/minute on mail.server.com
> Legend1[mail-bytes]: SMTP Bytes/minute in
> Legend2[mail-bytes]: SMTP Bytes/minute out
> LegendI[mail-bytes]: SMTP Bytes/minute in
> LegendO[mail-bytes]: SMTP Bytes/minute out
> 
> Target[mail-msg]: `/home/mrtg/configs/scripts/get-smtp-msg.pl mail.server.com`
> MaxBytes[mail-msg]: 2000000
> Title[mail-msg]: SMTP Messages/minute on mail.server.com
> PageTop[mail-msg]: SMTP Messages/minute on mail.server.com
> Legend1[mail-msg]: SMTP Messages/minute in
> Legend2[mail-msg]: SMTP Messages/minute out
> LegendI[mail-msg]: SMTP Messages/minute in
> LegendO[mail-msg]: SMTP Messages/minute out
> 
> 
> Lastly, remember you may need to change a few paths in the .pl files, and if you upgrade sendmail make sure
> to also reinstall mailstats (something our mail people always forget:)
> 
> 
> Run this, and let me know if this is what you are looking for.
> 
> HTH
> 
> 

-- 
Best Regards
 Imran Fazal Bhatti
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     "Only The Shadow Knows                          |
|                      what evil lurks in the                         |
|                          Heart of Men!"                             |
|                        !!! Linux User !!!                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
               This e-mail message is 100% Microsoft free!





--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list