Page 2 of 3
Re: rrd file does not exist
Posted: Tue Dec 03, 2019 10:19 am
by nms
Ok, fixed that and re-run checks. No errors for permissions now.
I can those rrds as being updated now.
What's left is to see what happens when we create a new router/switch .
Will keep you posted
Re: rrd file does not exist
Posted: Tue Dec 03, 2019 10:25 am
by scottwilkerson
nms wrote:Ok, fixed that and re-run checks. No errors for permissions now.
I can those rrds as being updated now.
What's left is to see what happens when we create a new router/switch .
Will keep you posted
Sounds good.
One thing to note, earlier you said you ran this
Code: Select all
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg .check
In the future, do not run that command, it will create rrd's with incorrect permissions (root). If you need to run from the command line always run
Code: Select all
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
Re: rrd file does not exist
Posted: Tue Dec 03, 2019 12:35 pm
by nms
Hi Scott,
Thanks for that tip.
Unfortunately, when I created a new switch from scratch I ended up with the same problem. Some interfaces ended up with no rrd file, while others were ok.
We experienced this also when we added an interface to an existing device.
I then searched a bit in the output for the MRTG check but there wasn't anything related to this device.
I tried to create the file by hand and giving it the same user permissions and modes (apache:nagios and 644) but the file never updated.
2019-12-03_1828.png
2019-12-03_1828_001.png
Re: rrd file does not exist
Posted: Tue Dec 03, 2019 12:40 pm
by scottwilkerson
You cannot create the file by scratch, so you should delete them. Doing so will cause it to error for sure.
Can you go to Admin -> Manage Config Wizards
Click check for updates and see if there is an updated "Network Switch / Router" wizard.
If so install that update run the following again to fix any possible bad permissions
Code: Select all
chown apache:nagios -R /var/lib/mrtg
chmod ug+rwx -R /var/lib/mrtg
and then try again
Also, it is worth pointing out that it can take 10-15 minutes before that file is created after running the wizard.
Re: rrd file does not exist
Posted: Wed Dec 04, 2019 3:27 am
by nms
Hi,
The wizard is up to date. V 2.5.2.
Yes, the creation of the file by hand was just to test.
Also, it took longer than 15 minutes and it still remained the same.
Re: rrd file does not exist
Posted: Wed Dec 04, 2019 7:53 am
by scottwilkerson
Can you show the output of the following
Re: rrd file does not exist
Posted: Wed Dec 04, 2019 9:13 am
by nms
Hi,
Code: Select all
[root@am1-sha-nagios2-p tmp]# grep 526910080 -R /etc/mrtg
/etc/mrtg/conf.d/10.192.128.50.cfg:### Interface 526910080 >> Descr: 'Ethernet105/1/11' | Name: 'Ethernet105/1/11' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ###
/etc/mrtg/conf.d/10.192.128.50.cfg:Target[10.192.128.50_526910080]: 526910080:[email protected]:161::::2
/etc/mrtg/conf.d/10.192.128.50.cfg:SetEnv[10.192.128.50_526910080]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="Ethernet105/1/11"
/etc/mrtg/conf.d/10.192.128.50.cfg:MaxBytes[10.192.128.50_526910080]: 125000000
/etc/mrtg/conf.d/10.192.128.50.cfg:Title[10.192.128.50_526910080]: Traffic Analysis for 526910080 -- am1nx01
/etc/mrtg/conf.d/10.192.128.50.cfg:PageTop[10.192.128.50_526910080]: <h1>Traffic Analysis for 526910080 -- am1nx01</h1>
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg:### Interface 526910080 >> Descr: 'Ethernet105/1/11' | Name: 'Ethernet105/1/11' | Ip: 'No Ip' | Eth: 'a4-56-30-c2-3f-4c' ###
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg:# Target[am1-sha-ucsnx01-p_o-coreinfra-Nexus_526910080]: 526910080:ASPIDER-SNMP@am1-sha-ucsnx01-p_o-coreinfra-Nexus:161::::2
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg:# SetEnv[am1-sha-ucsnx01-p_o-coreinfra-Nexus_526910080]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="Ethernet105/1/11"
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg:# MaxBytes[am1-sha-ucsnx01-p_o-coreinfra-Nexus_526910080]: 268188625000
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg:# Title[am1-sha-ucsnx01-p_o-coreinfra-Nexus_526910080]: Traffic Analysis for 526910080 -- am1nx01
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg:# PageTop[am1-sha-ucsnx01-p_o-coreinfra-Nexus_526910080]: <h1>Traffic Analysis for 526910080 -- am1nx01</h1>
Re: rrd file does not exist
Posted: Wed Dec 04, 2019 9:21 am
by scottwilkerson
Looks like this interface is commented out in
/etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg which would explain why it isn't creating the rrd
What are the permissions here
Code: Select all
ls -l /etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg
Re: rrd file does not exist
Posted: Wed Dec 04, 2019 9:39 am
by nms
Code: Select all
ls -l /etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg
-rwxr-xr-x. 1 root root 249640 Nov 8 10:46 /etc/mrtg/conf.d/am1-sha-ucsnx01-p_o-coreinfra-Nexus.cfg
I saw i have quite a few with the same permissions tho.
Re: rrd file does not exist
Posted: Wed Dec 04, 2019 9:53 am
by scottwilkerson
Ok, lets do this
Code: Select all
chown apache:nagios -R /etc/mrtg/conf.d/
chmod ug+rw -R /etc/mrtg/conf.d/
Then lets run the wizard again which should overwrite these configs without them having these interfaces commented out