Page 3 of 3

Re: gaps in all bandwidth graphs

Posted: Thu Dec 27, 2012 4:08 pm
by zaji_nms
[root@nagiosxi tmp]# cat /etc/mrtg/mrtg.cfg|head -n 40
######################################################################
# Multi Router Traffic Grapher -- Example Configuration File
######################################################################
# This file is for use with mrtg-2.0
#
# Note:
#
# * Keywords must start at the begin of a line.
#
# * Lines which follow a keyword line which do start
# with a blank are appended to the keyword line
#
# * Empty Lines are ignored
#
# * Lines starting with a # sign are comments.

# Where should the logfiles, and webpages be created?

# Minimal mrtg.cfg
#--------------------

HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg

#Target[r1]: 2:[email protected]
#MaxBytes[r1]: 1250000
#Title[r1]: Traffic Analysis
#PageTop[r1]: <H1>Stats for our Ethernet</H1>

WorkDir: /var/lib/mrtg


#### ADDED BY NAGIOSXI (USER: nagiosadmin, DATE: 2012-11-29 15:22:53) ####
# Created by
# /usr/bin/cfgmaker --show-op-down --zero-speed=100000000 --snmp-options=:::::2 --noreversedns public@frw-3750-1

ast login: Thu Dec 27 18:59:12 2012 from 172.16.30.5
[root@nagiosxi ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
2012-12-28 00:07:26: ERROR: Target[tec-7200_1678][_IN_] ' $target->[957]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_1678][_OUT_] ' $target->[957]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_2267][_IN_] ' $target->[1190]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_2267][_OUT_] ' $target->[1190]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_4984][_IN_] ' $target->[2031]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_4984][_OUT_] ' $target->[2031]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5001][_IN_] ' $target->[2042]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5001][_OUT_] ' $target->[2042]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5027][_IN_] ' $target->[2061]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5027][_OUT_] ' $target->[2061]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5038][_IN_] ' $target->[2070]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5038][_OUT_] ' $target->[2070]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5056][_IN_] ' $target->[2083]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5056][_OUT_] ' $target->[2083]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200-3_366][_IN_] ' $target->[2380]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200-3_366][_OUT_] ' $target->[2380]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200-3_1099][_IN_] ' $target->[2746]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200-3_1099][_OUT_] ' $target->[2746]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200-3_
........

Re: gaps in all bandwidth graphs

Posted: Fri Dec 28, 2012 10:54 am
by scottwilkerson
Usually when you install rrdcached your /etc/mrtg/mrtg.cfg should have a line at the top similar to

Code: Select all

LibAdd: /opt/rrdtool-1.4.4/lib/perl/5.10.1

Re: gaps in all bandwidth graphs

Posted: Fri Dec 28, 2012 11:13 am
by zaji_nms
Scott
This lIne was there but on the bottom of the file mrtg.cfg .... i moved it to the top.


LibAdd: /opt/rrdtool-1.4.4/lib/perl/5.10.1

We Need this graphs to work, currently it looks something like this .. the gaps duration are increased.

Re: gaps in all bandwidth graphs

Posted: Thu Jan 03, 2013 9:35 am
by zaji_nms
Hi Scott,
The Graph worked after i replaced the MRTG file from a Test instance, my question now is how to find out what in MRTG.cfg file could have caused this problem.

Re: gaps in all bandwidth graphs

Posted: Thu Jan 03, 2013 10:18 am
by nscott
In the above snippet

Code: Select all

2012-12-28 00:07:26: ERROR: Target[tec-7200_2267][_OUT_] ' $target->[1190]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_4984][_IN_] ' $target->[2031]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_4984][_OUT_] ' $target->[2031]{$mode} ' did not eval into defined data
2012-12-28 00:07:26: ERROR: Target[tec-7200_5001][_IN_] ' $target->[2042]{$mode} ' did not eval into defined data
The 1190, 2031, 2042 should be line numbers in your config that were yielding undefined data. What was happening on those lines?

Re: gaps in all bandwidth graphs

Posted: Thu Jan 03, 2013 1:59 pm
by zaji_nms
Hi Scott
On line 1190,2031 there was </tr>


<tr>
<td>Max Speed:</td>
<td>12.5 MBytes/s</td>
</tr>

On line 2042 (hight lighted with Red)

</tr>
<tr>
<td>Max Speed:</td>
<td>1250.0 kBytes/s</td>
</tr>
</table>
</div>

Re: gaps in all bandwidth graphs

Posted: Thu Jan 03, 2013 2:04 pm
by zaji_nms
Scott,
Is there are way to regenerate mrtg.cfg from XI again. I spend a lot of time investigating this problem. I had no idea the Bandwidth data from process.pl will be 0=IN and 0=Out. Will this happen if we have services prefdata check for 1minute 3 minute and 5 minutes interval.

Re: gaps in all bandwidth graphs

Posted: Thu Jan 03, 2013 5:30 pm
by nscott
My question about the lines, thank you for answering the questions, but I'm afraid your prompt and correct response doesn't help because that is simply the HTML it is using the generate the header.

As for your latest questions, do you mean you are worried about losing past performance data if you delete the current MRTG config? The answer is you would not lose performance data, however the non-loss of performance data is contingent upon you naming these items the exact same as you had named them before. Depending on the number of items you are monitoring it would require a fair amount of work. However, if you are up for the task you would need to:

0) Make a backup (Always) [Backup mrtg.cfg and the nagios and nagiosql database.]
1) Delete the mrtg.cfg
2) Clear out /usr/local/nagiosxi/tmp
3) Remove the hosts and services using the Nagios Core Config Manager
4) Re-add them using the Nagios XI Router/Switch Wizard

Re: gaps in all bandwidth graphs

Posted: Fri Jan 04, 2013 10:42 am
by slansing
Hello zaji,

To re-build the mrtg.cfg file run the following:

Code: Select all

cfgmaker {community}@{SNMP agent host IP} > /etc/mrtg/mrtg.cfg 
To re-build item specific .cfg files please see the following:

http://oss.oetiker.ch/mrtg/doc/cfgmaker.en.html

Re: gaps in all bandwidth graphs

Posted: Mon Jan 07, 2013 8:46 am
by zaji_nms
The Problem has been resolved, thanks for your help.