/var/lib/mrtg/10.40.1.231_44.rrd does not exist

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

/var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

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

Code: Select all

ls -l /var/lib/mrtg/
Former Nagios Employee.
me.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post by vijilants »

ls -l /var/lib/mrtg/
Thanks for your reply...seee attached
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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]# 
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: /var/lib/mrtg/10.40.1.231_44.rrd does not exist

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked