[hobbit] MRTG & Hobbit

Lowery, Michael mlowery at alliedtechgroup.com
Tue Apr 12 16:24:31 CEST 2005


Bbmrtg.sh has this in it, but I don't know how to determine what it's
doing and why it's reporting the error.

        # If MRTG hasn't updated the file in $BBSLEEP seconds then
        # don't do anything as to possibly have BBDISPLAY generate a
purple
        # status at one point if MRTG doesn't update the log in 30
minutes.
                
        timenow=`$BBHOME/bin/touchtime -e`
        timediff=`echo "$lasttimestamp $timenow" | $AWK '{ print $2 - $1
}'`
                  
        if [ "$timediff" -gt 0 ]
        then
                # Do we have a stale  MRTG .log file ? No update ...
                # Will provoke a purple after a while
                if [ "$timediff" -gt "$MRTGSTALESECS" -a "$PURPLECHECK"
= 			"TRUE" ]
                then    
                        continue
                fi   
                ERRMSG=""
                
                if [ "$currin" -ge "$redlevelinmax" -o "$currout" -ge
"$redleveloutmax" ]
                then
                        COLOR="red"
                elif [ "$currin" -lt "$redlevelinmin" -o "$currout" -lt
"$redleveloutmin" ]
                then
                        COLOR="red"
                elif [ "$currin" -ge "$yellowlevelinmax" -o "$currout"
-ge 			"$yellowleveloutmax" ]
                then
                        COLOR="yellow"
                elif [ "$currin" -lt "$yellowlevelinmin" -o "$currout"
-lt 			"$yellowleveloutmin" ]
                then
                        COLOR="yellow"
   if [ "$timediff" -gt 0 ]
        then
                # Do we have a stale  MRTG .log file ? No update ...
                # Will provoke a purple after a while
                if [ "$timediff" -gt "$MRTGSTALESECS" -a "$PURPLECHECK"
= 			"TRUE" ]
                then
                        continue
                fi
                ERRMSG=""
                
                if [ "$currin" -ge "$redlevelinmax" -o "$currout" -ge
"$redleveloutmax" ]
                then
                        COLOR="red"
                elif [ "$currin" -lt "$redlevelinmin" -o "$currout" -lt
"$redleveloutmin" ]
                then    
                        COLOR="red"
                elif [ "$currin" -ge "$yellowlevelinmax" -o "$currout"
-ge 			"$yellowleveloutmax" ]
                then
                        COLOR="yellow"
                elif [ "$currin" -lt "$yellowlevelinmin" -o "$currout"
-lt 			"$yellowleveloutmin" ]
                then
                        COLOR="yellow"
                fi
        else
                ERRMSG="Time stamp in log is on the future !"
        fi
                
        rm -f $BBTMP/BBMRTG.$$

-----Original Message-----
From: Henrik Stoerner [mailto:henrik at hswn.dk] 
Sent: Tuesday, April 12, 2005 9:18 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] MRTG & Hobbit

On Tue, Apr 12, 2005 at 09:11:16AM -0500, Lowery, Michael wrote:
> This may not be directly Hobbit related, but...
> 
> I get the message "Time stamp in log is on the future !" on each of my
> MRTG pages.  I was not getting this when running bigbrother, so I'm
> wondering what would cause this or if there is something I can do to
> keep that from appearing.  MRTG is working fine, just this annoying
> message.

No idea, really.

It would have been nice to know *which* logfile holds this futuristic
timestamp. Any mention of that ? Any output from the mrtg cron-job ?


Regards,
Henrik

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk





More information about the Xymon mailing list