Page 1 of 1

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

Posted: Mon Oct 05, 2020 3:46 pm
by rnjie
when i add a network switch i get error //var/lib/mrtg/.rrd does not exist. i saw a similar issue was reported but the case was closed without any solution
https://support.nagios.com/forum/viewto ... =6&t=44172

thats exactly thesame issue i am facing, i will attach my profile and output from the below commands
ls -l /var/lib/mrtg
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.10_8687.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.10_8688.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.10_8.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.10_9.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.13_6.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.13_7.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.13_8.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 10.67.100.13_9.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.232_200000000.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.232_3.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.232_400000000.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.232_4.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.232_5.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.233_200000000.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.233_3.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.233_400000000.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.233_4.rrd
-rw-rw-r-- 1 apache nagios 105312 Oct 5 15:41 172.19.20.233_5.rrd
-rwxrwxr-x 1 apache nagios 0 Oct 5 15:41 mrtg.ok
[root@dximonp1 ~]# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'
2020-10-05 15:42:47: WARNING: Expected a number but got 'noSuchInstance'

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

Posted: Tue Oct 06, 2020 9:40 am
by tgriep
I did not see the MRTG cfg files that are used by the MRTG process that created the rrd filers in the profile.

I suspect that there is a permission problem so run the following as root to set them.

Code: Select all

chown apache:nagios /etc/mrtg -R
chmod 775 /etc/mrtg -R
chown apache:nagios /var/lib/mrtg -R
chmod 775 /var/lib/mrtg -R
Then you will have to re-run the Wizard to recreate the MRTG cfg files and them see is they are created and update the data in the Bandwidth checks.