[mrtg] Re: More of a Feature Request, than anything else.

Tobias Oetiker oetiker at ee.ethz.ch
Tue Mar 11 23:24:31 MET 2003


Today Jeff Strahl wrote:

> Hello,
> Occasionally, whenever I check the graphs in the morning, I see that MRTG
> has crashed some time during the night.  Whenever I view my MRTG logs to
> investigate the cause of the crash, the problem is always the same....
> ------------------------------------------
> 2003-03-10 20:40:57 -- Error:
>   can't resolve "smr-tx-gw1" to IP address
>  at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 400
> 2003-03-10 20:40:57 -- Can't bless non-reference value at
> /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 833.
> ------------------------------------------
>
> Is there any way to have MRTG simply skip over what it cannot resolve, and
> not break completely?

Hi Jeff,

you might want to try this:
---------------------------------------------------------------
--- mrtg~       Tue Mar 11 07:27:15 2003
+++ mrtg        Tue Mar 11 23:23:18 2003
@@ -1596,6 +1596,10 @@
     my $target = shift;
     my $cfg = shift;
     my $retry = 0;
+    if (not gethostbyname  $$target{Host}){
+        warn "WARNING: Skippng host '$$target{Host}' as it does not resolve to an IP address\n";
+        return undef;
+    }
   RETRY:
     my @ifnum = ();
     my @OID = ();
----------------------------------------------------------------

cheers
tobi


>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Jeff C. Strahl
> Sr. IP Network Engineer
> Packet Networks
> Grande Communications Networks, Inc.
> 401 Carlson Circle
> San Marcos, TX 78666
> Phone - 512.878.5465
> Cell - 830.620.8176
> Fax - 512.878.4284
> Email: jeff.strahl at grandecom.com
>
> We will individually and as a Team:
> 	-	Work cooperatively, delivering what we said we would
> 	-	Be honest and truthful - showing respect for others
> 	-	Be easy to do business with - internally and externally
> 	-	Serve our customers and communities with passion and
> commitment
> 	-	HAVE FUN!
> For you, the world.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
> --
> 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
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, ETZ J97, ETH, CH-8092 Zurich, Switzerland
 / // _ \/ _ \/ /  System Manager Coach Time Lord Developer Designer
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/~oetiker +41(0)1-632-5286

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