/var/lib/mrtg/**.rrd does not exist

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

/var/lib/mrtg/**.rrd does not exist

Post by preethu.d »

I am getting the below error when adding interface bandwidth monitoring for all switches.
/var/lib/mrtg/172.16.23.2_22.rrd does not exist.

I executed the below 2 commands and getting the output as "ERROR: Line 26 (3000 Hanover St) in CFG file (/etc/mrtg/conf.d/<IP>.cfg) does not make sense" (attached the screenshot)

ls -l /var/lib/mrtg
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

Please help
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: /var/lib/mrtg/**.rrd does not exist

Post by benjaminsmith »

Hi @preethu.d,

Can you send over the system profile? It will contain that file and we can take a look at it for any errors. Thanks, Benjamin


To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: /var/lib/mrtg/**.rrd does not exist

Post by preethu.d »

Hi

Attached the system profile, please check.

Regards,
Preethu

Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: /var/lib/mrtg/**.rrd does not exist

Post by ssax »

Please edit the config file /etc/mrtg/conf.d/X.X.X.X.cfg and change this:

Code: Select all

3000 Hanover St
Palo Alto, CA 94304
To this:

Code: Select all

# 3000 Hanover St
# Palo Alto, CA 94304
Then run this again:

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Additionally, include the output of these commands:

Code: Select all

ls -ld /var/lib/mrtg
ls -l /var/lib/mrtg
cat /etc/cron.d/mrtg
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: /var/lib/mrtg/**.rrd does not exist

Post by preethu.d »

I have edited the config file, now all interface bandwidth monitors are showing normal status.
Output of the below commands are attached here.

ls -ld /var/lib/mrtg
ls -l /var/lib/mrtg
cat /etc/cron.d/mrtg
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/**.rrd does not exist

Post by ssax »

Please run these commands to fix the permissions on them:

Code: Select all

chown -R apache.nagios /var/lib/mrtg
chmod -R 664 /var/lib/mrtg
That should do it, check it in 15 and see if the bandwidth now shows.
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: /var/lib/mrtg/**.rrd does not exist

Post by preethu.d »

I have executed the below commands. But now it has started showing the same error rrd does not exist.(screenshot attached)

chown -R apache.nagios /var/lib/mrtg
chmod -R 664 /var/lib/mrtg
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/**.rrd does not exist

Post by ssax »

Do this instead:

Code: Select all

chown -R nagios.nagios /var/lib/mrtg
chmod -R 664 /var/lib/mrtg
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: /var/lib/mrtg/**.rrd does not exist

Post by preethu.d »

I have executed both commands , but still it shows the same error.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: /var/lib/mrtg/**.rrd does not exist

Post by ssax »

Please run the following commands as root and then PM me the /tmp/mrtg.txt file.

Code: Select all

cat /etc/cron.d/mrtg > /tmp/mrtg.txt
ls -ld /var/lib/mrtg >> /tmp/mrtg.txt
ls -l /var/lib/mrtg >> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base,log &>> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg &>> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios &>> /tmp/mrtg.txt
{ time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 2>1 ; } 2>> /tmp/mrtg.txt
Locked