[mrtg] Re: Problem with mrtg and ip alias

Fruitman, Corey Corey.Fruitman at allstream.com
Wed Jun 30 19:28:38 MEST 2004


Sounds to me like you're aliasing your NIC at start-up.  Cron doesn't load your profile unless you explicitly tell it to.  That would explain why it works from command line but not from cron.  

You've got a few options...  

1) Add your resource file (.bashrc or wherever the aliasig takes place) to your cron entry before mrtg
2) Add the ifconfig alias before mrtg in cron
3) Run mrtg as a daemon and kick it off from the command line

Option 3 is the easiest, but if the daemon dies and you don't have anything watching the process, you'll obviously lose data.  Check out the RunAsDaemon option in the MRTG configuration reference.

Hope that helps,
Corey.

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]On
Behalf Of rolando ..
Sent: June 30, 2004 11:18 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Problem with mrtg and ip alias


Hi, i have monitoring a server without problems and a cablemodem. I have two 
nic's and one alias:
eth0 -> 123.123.123.123
eth1 -> 1.1.1.1

and the alias

eth0:1 -> 1.2.3.4  #this for the cablemodem, cablemodem have internal alias 
1.2.3.1

When i run mrtg from the command line have no errors:

# mrtg /etc/mrtg/cm.cfg
#

When run from cron, have "no response" error. Some idea?

PD: sorry about poor english =/



] Slack your life!, use Slackware [ &copyleft; ]

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
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

--
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