Page 1 of 2
/var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Mon Jan 25, 2016 9:51 am
by vijilants
System:
Nagios XI Version : 5.2.3
cedar1 2.6.32-431.29.2.el6.i686 i686
CentOS release 6.5 (Final)
Gnome Installed
Hi,
Can somebody please advise:
I manually added some services for my Cisco router / switch. I did it by copying a bandwidth and sstatus service from the same router, then editing the description and also changing the ifindex to the correct index.
However I am getting the following on each of the six bandwidth services that I copied :
/var/lib/mrtg/10.40.1.231_44.rrd does not exist.
Everything is activated etc
Can someone please advise ? I really dont want to rescan the entire switch.
Many Thanks
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Mon Jan 25, 2016 10:26 am
by hsmith
vijilants wrote:Gnome Installed
I have to warn you that this system is not something we're likely going to be able to support in the event of a failure. We only support minimal installations. Having a desktop installed can interfere with the operation of Nagios XI, and we can't account for changes that it makes to your system.
What's the output of this command?
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Mon Jan 25, 2016 10:42 am
by vijilants
ls -l /var/lib/mrtg/
Thanks for your reply...seee attached
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Mon Jan 25, 2016 11:11 am
by ssax
The MRTG cron job generates those RRD files which usually runs every 5 minutes (you can check /etc/cron.d/mrtg), make sure that the port is setup and not commented out in your /etc/mrtg/conf.d/10.40.1.231.cfg file.
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Mon Jan 25, 2016 11:51 am
by vijilants
ssax wrote:The MRTG cron job generates those RRD files which usually runs every 5 minutes (you can check /etc/cron.d/mrtg), make sure that the port is setup and not commented out in your /etc/mrtg/conf.d/10.40.1.231.cfg file.
Nothing related to 10.40.1.231_44 exists in that file
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Mon Jan 25, 2016 3:17 pm
by tgriep
When the Network Switch / Router wizard is ran, it will add the entries to the /etc/mrtg/conf.d/10.40.1.231.cfg file for you.
You can either copy an existing section in the /etc/mrtg/conf.d/10.40.1.231.cfg, paste it, and edit if for the new port that you created, or you can follow the link below to re-run the Wizard to have it add then for you.
http://assets.nagios.com/downloads/nagi ... Router.pdf
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Tue Jan 26, 2016 3:59 am
by vijilants
tgriep wrote:When the Network Switch / Router wizard is ran, it will add the entries to the /etc/mrtg/conf.d/10.40.1.231.cfg file for you.
You can either copy an existing section in the /etc/mrtg/conf.d/10.40.1.231.cfg, paste it, and edit if for the new port that you created, or you can follow the link below to re-run the Wizard to have it add then for you.
http://assets.nagios.com/downloads/nagi ... Router.pdf
I d1d not run the wizard......this was an existing switch on the Nagios system that had the wizard run on the day that it was originally implemeted.
I needed to add a vew switch ports so rather than rescan the entire switch using the wizard (and having to change every bandwidth parameter etc) I simply used CCM, copied the service profile on an existing service using the copy icon and changed the name / description and ifindex to 44.
The Status services work, however the Bandwidth services as creating this error.
I really don't want to use the wizard as it is too much work to go through evey port and reconfigure tha bandwidth parameters and to configure which port is to be monitored etc.
I did as requested in the document you provided, however there are no references to that IP address in the mrtg.cfg file. In actual fact there is hardly anything in the file...see below
Code: Select all
[root@cedar1 mrtg]# more mrtg.cfg
######################################################################
# 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
WorkDir: /var/lib/mrtg
Include: conf.d/*.cfg
Forks: 4
[root@cedar1 mrtg]#
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Tue Jan 26, 2016 10:12 am
by tgriep
The document is a little misleading, the file you would have to edit is /etc/mrtg/conf.d/10.40.1.231.cfg
In that file you would have to add the new ports that you want to monitor.
After editing the file, you should start to see data after about 20 minutes.
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Tue Jan 26, 2016 11:03 am
by vijilants
tgriep wrote:The document is a little misleading, the file you would have to edit is /etc/mrtg/conf.d/10.40.1.231.cfg
In that file you would have to add the new ports that you want to monitor.
After editing the file, you should start to see data after about 20 minutes.
Thanks for the reply...
Sorry but this is getting very confusing......the document that I was reffered to states to delete all entries with the said IP address.
You said that that the document is misleading.....if it is pointing at the wrong file, the document appear to be incorrect.
When I go to the 10.40.1.231.cfg file it is full of 10.40.1.231 statements. If I follow the document, it states that I have to delete the lot.
Is this correct ?
Or am I supposed to add to it ?
I had a look in that file, and it does not appear to be such a simple process of just changing the ifindex......there is a whole load of description etc that would need editing after copying and pasting a previous entry.
Surely there has to be an easier way of doing this as it appears to defeat the whole object of using the copy process in CCM to create another interface ?
On our network on switches in particular, we are continually adding or deleting ports, so this can be a real pain.
Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist
Posted: Tue Jan 26, 2016 12:28 pm
by tgriep
You are correct, the document is wrong and it will have to be updated. Don't bother using it anymore.
Here is a quick description of what the Network switch / router wizard runs.
When it it is run, it will interrogate the device looking for ports to monitor.
Then it will show the ports that were found at that time and display them so they can be selected/ edited, etc...
When the wizard is finished, it will create the service checks in XI and also configure the MRTG file in the /etc/mrtg/conf.d folder.
The file in the /etc/mrtg/conf.d folder is used to create the bandwidth information for the service check in XI.
It is run by cron every 5 minutes and it updates the RRD file in this folder /var/lib/mrtg.
Then when the Bandwidth check is run in XI, it looks at the corresponding file in /var/lib/mrtg folder and displays the bandwidth.
Problem that you are running to is copying the service check in XI, doesn't create the corresponding entry in the /etc/mrtg/conf.d file, only the wizard does that.
If you don't run the Wizard, you will have to edit the config file in the /etc/mrtg/conf.d folder manually.
The easiest way to do that, is to copy a section of a similar port, paste it and edit the settings, save it out and it should start to capture bandwidth information.
I hope this helps and sorry about the confusion.