/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

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

Post by preethu.d »

I have executed the command and attached the /tmp/mrtg.txt file.
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 »

Delete the lock file:

Code: Select all

rm /var/lib/mrtg/mrtg.lock
This looks like it has the same issue:

Code: Select all

ERROR: Line 26 (3000 Hanover St) in CFG file (/etc/mrtg/conf.d/100.100.100.4.cfg)  does not make sense
Do the same thing we did with the last to comment out those in /etc/mrtg/conf.d/100.100.100.4.cfg

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 command again and if any errors are shown send the full output:

Code: Select all

time 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
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

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

Post by preethu.d »

rm /var/lib/mrtg/mrtg.lock
>> there is no such file exist in the path

Please edit the config file /etc/mrtg/conf.d/X.X.X.X.cfg and change this:
# 3000 Hanover St
# Palo Alto, CA 94304

>> done the changes

time 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

>> getting error while executing the command, attached the screenshot.
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 »

That should be working based on the last permissions.

What is the output of these commands?

Code: Select all

ls -ld /var/lib/mrtg
chage -l nagios
sestatus
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

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

Post by preethu.d »

attached the output of below commands

ls -ld /var/lib/mrtg
chage -l nagios
sestatus
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 as root:

Code: Select all

chown -R apache.nagios /var/lib/mrtg
chmod -R 0775 /var/lib/mrtg
Then do this again and if you see any errors, please send them:

Code: Select all

time 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
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

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

Post by preethu.d »

attached the output of the given command.
You do not have the required permissions to view the files attached to this post.
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

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

Post by preethu.d »

can I delete and re-add the devices again ? Does it work ?
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:

Code: Select all

sed -i 's/3000 Hanover St/#3000 Hanover St/g' /etc/mrtg/conf.d/*.cfg
sed -i 's/Palo Alto, CA 94304/#Palo Alto, CA 94304/g' /etc/mrtg/conf.d/*.cfg
Then run this again:

Code: Select all

time 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
Attach this file as well:

Code: Select all

/usr/bin/cfgmaker
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

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

Post by preethu.d »

Attached the output of the commands and cfgmaker file.
You do not have the required permissions to view the files attached to this post.
Locked