Page 1 of 3

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

Posted: Wed Jan 27, 2021 4:25 am
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

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

Posted: Wed Jan 27, 2021 4:01 pm
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

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

Posted: Thu Jan 28, 2021 12:14 am
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.

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

Posted: Thu Jan 28, 2021 6:46 pm
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

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

Posted: Fri Jan 29, 2021 7:25 am
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

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

Posted: Fri Jan 29, 2021 5:44 pm
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.

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

Posted: Mon Feb 01, 2021 12:37 am
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

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

Posted: Mon Feb 01, 2021 6:12 pm
by ssax
Do this instead:

Code: Select all

chown -R nagios.nagios /var/lib/mrtg
chmod -R 664 /var/lib/mrtg

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

Posted: Wed Feb 03, 2021 5:06 am
by preethu.d
I have executed both commands , but still it shows the same error.

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

Posted: Wed Feb 03, 2021 6:38 pm
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