MRTG & Hobbit
list Michael Lowery
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. Thanks, Michael
list Henrik Størner
▸
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
list Michael Lowery
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:user-ce4a2c883f75@xymon.invalid]
Sent: Tuesday, April 12, 2005 9:18 AM
To: user-ae9b8668bcde@xymon.invalid
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
list Henrik Størner
▸
In <user-5abdb239fc11@xymon.invalid> "Lowery, Michael" <user-89d72f0c2e3d@xymon.invalid> writes:
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.
timenow=`$BBHOME/bin/touchtime -e`
timediff=`echo "$lasttimestamp $timenow" | $AWK '{ print $2 - $1}'`[snip]
if [ "$timediff" -gt 0 ]
then[cut]
else
ERRMSG="Time stamp in log is on the future !"
fi
I suspect this may happen if you run bbmrtg with BBHOME pointing to
the Hobbit installation - because the "touchtime" utility does not
exist. So you get "timediff" to be negative from the awk command.
If you have GNU date installed, I'd just replace that line with
timenow=`date +%s`
and see if that resolves it.
Regards,
Henrik
list Michael Lowery
Great! Thanks for taking the time to look at that for me! Michael
▸
-----Original Message-----
From: Henrik Storner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Tuesday, April 12, 2005 9:51 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] MRTG & Hobbit
In <user-5abdb239fc11@xymon.invalid> "Lowery,
Michael" <user-89d72f0c2e3d@xymon.invalid> writes:
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.
timenow=`$BBHOME/bin/touchtime -e`
timediff=`echo "$lasttimestamp $timenow" | $AWK '{ print $2 -$1}'` [snip]
if [ "$timediff" -gt 0 ]
then[cut]
else
ERRMSG="Time stamp in log is on the future !"
fi
I suspect this may happen if you run bbmrtg with BBHOME pointing to
the Hobbit installation - because the "touchtime" utility does not
exist. So you get "timediff" to be negative from the awk command.
If you have GNU date installed, I'd just replace that line with
timenow=`date +%s`
and see if that resolves it.
Regards,
Henrik
list Daniel J McDonald
▸
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
This is a bug in bbmrtg.pl You can correct for it by altering the time that bbmrtg.pl runs - delay it by one minute if possible... You never saw this with bb, because bb launched bbmrtg.pl at fairly random times - never syncronized at 5 minute intervals like cron... I've got a decent patch for it somewhere, but I never got around to applying it to 1.7 At some point I'll churn out a 1.8, but I'm in training this week and will have a pile to catch up on when I get back...
▸
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. Thanks, Michael
--
Dan McDonald, CCIE #2495, CNX
Austin Energy
list Jeff Newman
All,
I am using the built-in mrtg hobbit functionality (i.e. not using bb-mrtg)
I used cfgmaker on my server to build my mrtg.cfg. I am running mrtg against
a cisco 6509 switch BTW.
cfgmaker generated the mrtg.cfg with all the interfaces on the switch. A
little tweaking got it generating
graphs correctly. The labels on each graph look mostly correct (i.e.
.fa0_0_0 inbound and .fa0_0_0) {the . in front of
the label name is why I say mostly correct, I don't really care much about
that} so that is all good.
Here's the question.
The fa0_0_0 is useful for my network guy, but doesn't mean anything to me.
Looking at the mrtg.cfg
I see it has in it the info that would be useful to me. Here is a snippet
(question below snippet)
Title[mrtg.Fa0_0_0]: Traffic Analysis for Fa0/0/0 -- RPCFIR1
PageTop[mrtg.Fa0_0_0]: <H1>Traffic Analysis for Fa0/0/0 -- RPCFIR1</H1>
<TABLE>
<TR><TD>System:</TD> <TD>RPCFIR1 in </TD></TR>
<TR><TD>Maintainer:</TD> <TD></TD></TR>
<TR><TD>Description:</TD><TD>FastEthernet0/0/0 OA Link Subnet15
</TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Fa0/0/0</TD></TR>
<TR><TD>Max Speed:</TD> <TD>12.5 MBytes/s</TD></TR>
<TR><TD>Ip:</TD> <TD>167.76.15.2 ()</TD></TR>
</TABLE>
is there a way to either make the title of the graph match the title (or
description) from the snippet above (for each interface)
or just have text in the trends page do it? (i.e. Line from title above,
then show pic, then show title line for next graph, then that graph etc...)
?
Thanks,
Jeff
list Jeff Newman
Anyone? ---------- Forwarded message ---------- Date: Jan 4, 2006 10:33 AM Subject: MRTG & Hobbit
▸
All,
I am using the built-in mrtg hobbit functionality (i.e. not using bb-mrtg)
I used cfgmaker on my server to build my mrtg.cfg. I am running mrtg against
a cisco 6509 switch BTW.
cfgmaker generated the mrtg.cfg with all the interfaces on the switch. A
little tweaking got it generating
graphs correctly. The labels on each graph look mostly correct (i.e.
.fa0_0_0 inbound and .fa0_0_0) {the . in front of
the label name is why I say mostly correct, I don't really care much about
that} so that is all good.
Here's the question.
The fa0_0_0 is useful for my network guy, but doesn't mean anything to me.
Looking at the mrtg.cfg
I see it has in it the info that would be useful to me. Here is a snippet
(question below snippet)
Title[mrtg.Fa0_0_0]: Traffic Analysis for Fa0/0/0 -- RPCFIR1
PageTop[mrtg.Fa0_0_0]: <H1>Traffic Analysis for Fa0/0/0 -- RPCFIR1</H1>
<TABLE>
<TR><TD>System:</TD> <TD>RPCFIR1 in </TD></TR>
<TR><TD>Maintainer:</TD> <TD></TD></TR>
<TR><TD>Description:</TD><TD>FastEthernet0/0/0 OA Link Subnet15
</TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Fa0/0/0</TD></TR>
<TR><TD>Max Speed:</TD> <TD>12.5 MBytes/s</TD></TR>
<TR><TD>Ip:</TD> <TD> 167.76.15.2 ()</TD></TR>
▸
</TABLE>
is there a way to either make the title of the graph match the title (or
description) from the snippet above (for each interface)
or just have text in the trends page do it? (i.e. Line from title above,
then show pic, then show title line for next graph, then that graph etc...)
?
Thanks,
Jeff
list Chris Wopat
▸
cfgmaker generated the mrtg.cfg with all the interfaces on the switch. A
little tweaking got it generating
graphs correctly. The labels on each graph look mostly correct (i.e.
.fa0_0_0 inbound and .fa0_0_0) {the . in front of
the label name is why I say mostly correct, I don't really care much about
that} so that is all good.
Here's the question.
The fa0_0_0 is useful for my network guy, but doesn't mean anything to me.
Looking at the mrtg.cfg
I see it has in it the info that would be useful to me. Here is a snippet
(question below snippet)
Title[mrtg.Fa0_0_0]: Traffic Analysis for Fa0/0/0 -- RPCFIR1
PageTop[mrtg.Fa0_0_0]: <H1>Traffic Analysis for Fa0/0/0 -- RPCFIR1</H1>
<TABLE>
<TR><TD>System:</TD> <TD>RPCFIR1 in </TD></TR>
<TR><TD>Maintainer:</TD> <TD></TD></TR>
<TR><TD>Description:</TD><TD>FastEthernet0/0/0 OA Link Subnet15
</TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Fa0/0/0</TD></TR>
<TR><TD>Max Speed:</TD> <TD>12.5 MBytes/s</TD></TR>
<TR><TD>Ip:</TD> <TD>167.76.15.2 ()</TD></TR>
</TABLE>Hello, New to the list, this "reply" won't show up correctly in the archives. oh well. What in this snippet is useful to you? I'm assuming it's "FastEthernet0/0/0 OA Link Subnet15", correct? MRTG creates these using cfgmaker. The man page of cfgmaker shows to use the "--ifref=SOMETHING" command to use other things as the description of the interface. You probably want: cfgmaker --ifref=descr public at 1.2.3.4 --Chris
list John Wood
I have been wrestling with this for a few days and haven't found anything pertaining to this in the archives - When I do the MRTG integration as described by Henrik, it seems to default to bits /second instead of bytes? Is there a way to change this? Also, is there anyway of showing the percentage and the units of measurement on the graph as on a standard copy of MRTG? Thanks -- John Wood IT Manager Metropolitan Library System