HOWTO: Compile, configure and run MRTG

I guess I should not have a MAILTO entry in that user crontab, right? Otherwise I'll get emails every five minutes.
 
I find it usefull to pipe all output to /dev/null so nothing is outputted, an no emails are sent:

/some/cron/command 1> /dev/null 2> /dev/null

This will send all data on stdout (1) and stderr (2) to a blackhole. Or you could just disable sending emails completely :)

John
 
Quick install for RH9

# cd /home/groovy

# wget http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg.tar.gz

# tar -zxvf mrtg.tar.gz

# cd mrtg*

# ./configure --with-gd=/usr/local/lib

# make

# make install

----------------

# cd /var/www/html/mrtg

# wget http://www.l0rdphi1.com/junk/mrtg.tgz

# tar -zxvf mrtg.tgz

# chmod 755 system

# /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/mrtg.cfg


This will give you the graphs of the rpm version, but with the latest MRTG.

The major change from the original howto is the added configuration switch.
 
Re: Quick install for RH9

interfasys said:
# cd /var/www/html/mrtg

# wget http://www.l0rdphi1.com/junk/mrtg.tgz

# tar -zxvf mrtg.tgz

# chmod 755 system

# /usr/local/mrtg-2/bin/mrtg /var/www/html/mrtg/mrtg.cfg


This will give you the graphs of the rpm version, but with the latest MRTG.

The major change from the original howto is the added configuration switch.

that way you have your cfg open to all users, probably not the worst thing you could do but do you really want your cfg publically accessable?

i always have my cfg in the mrtg directory and set the WorkDir value to /var/www/html/mrtg :)

will update the main thread also

Chris
 
You're right, it might be a better idea to keep the cfg file elsewhere ;) but I don't really care if someone wants to get my cfg file, unless this represents a security risk.
 
i find i pretty much always have to add 1> /dev/null 2> /dev/null to a crontab or i have at least 1000 emails every time i check the mail email account :D
 
set your cron email address to an address that is set to forward all mail into the blackhole :)

Chris
 
Re: HELP

XenoHosting said:
Where do i put LANG="en_US" at im lost

# pico -w /etc/sysconfig/i18n

You need to modify the 'LANG' line there the show the above suggestion.

Chris
 
Re: Re: HELP

ProWebUK said:
# pico -w /etc/sysconfig/i18n

You need to modify the 'LANG' line there the show the above suggestion.

Chris

LANG="en_US"
SUPPORTED="en_US:en_US:en"
SYSFONT="latarcyrheb-sun16"

like that ?
 
Re: Re: Re: HELP

You only need the 1 en_US in supported, apart from that it looks fine :)

SUPPORTED="en_US:en"

Chris
 
Re: Re: Re: Re: HELP

ProWebUK said:
You only need the 1 en_US in supported, apart from that it looks fine :)

SUPPORTED="en_US:en"

Chris
chris i still get the same error


UW PICO(tm) 4.2 File: /etc/sysconfig/i18n

LANG="en_US"
SUPPORTED="en_US"
SYSFONT="latarcyrheb-sun16"
 
Could you paste the exact error your getting when starting mrtg...

Chris
 
ProWebUK said:
Could you paste the exact error your getting when starting mrtg...

Chris

ERROR: Mrtg will most likely not work propperly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case:

env LANG=C /usr/local/mrtg-2/bin/mrtg ...
-----------------------------------------------------------------------
 
Adding LANG=C to /etc/sysconfig/i18n may work..

Ive done a search on the mailing list and that seems to be the only fix.

Chris
 
can't you type (in shell):
Code:
export LANG=C
then simply re-run whatever command you tried? I think that's what I did.
 
l0rdphi1 said:
can't you type (in shell):
Code:
export LANG=C
then simply re-run whatever command you tried? I think that's what I did.

thank you i got it werking but i get theses error now


root@web1 mrtg]# /usr/local/mrtg-2/bin/mrtg /home/xenosite/domains/xeno-hosting.net/public_html/mrtg/mrtg.cfg
ERROR: Target[index][_IN_] ''/home/xenosite/domains/xeno-hosting.net/public_html/mrtg`' (kill): Can't find string terminator "'" anywhere before EOF at (eval 6) line 1.
ERROR: Target[index][_OUT_] ''/home/xenosite/domains/xeno-hosting.net/public_html/mrtg`' (kill): Can't find string terminator "'" anywhere before EOF at (eval 7) line 1.
Use of uninitialized value in numeric lt (<) at /usr/local/mrtg-2/bin/mrtg line 371.
Use of uninitialized value in numeric lt (<) at /usr/local/mrtg-2/bin/mrtg line 375.
 
Back
Top