mrtg for Nagios XI - .rrd files are not being created

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
aastaguy
Posts: 31
Joined: Tue Apr 30, 2019 10:29 am

mrtg for Nagios XI - .rrd files are not being created

Post by aastaguy »

Hello,

I know this post has been covered several times, but when I run the "Network switch/router configuration wizard" on a switch (Cisco), the wizard does the snmp scan and returns about 10 ports that can be monitored, I set it all up and finish, and ping works, but all I see in the bandwidth service is /var/lib/mrtg/ipaddress_10.rrd does not exist. so the rrd files are not being created.

I have looked at the .cfg file and cleared out all snmp scans, I have checked the time and restarted the npcd service, I have ran the following command env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg and receive the following output:

ERROR: unable to open include file: /etc/mrtg/conf.d/*.cfg

I have looked at just about every post on this topic to see if I can solve it myself but to no avail. Any help is greatly appreciated.

Thank you.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: mrtg for Nagios XI - .rrd files are not being created

Post by scottwilkerson »

Can you show the output of the following?

Code: Select all

ls -al /var/lib/mrtg
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
aastaguy
Posts: 31
Joined: Tue Apr 30, 2019 10:29 am

Re: mrtg for Nagios XI - .rrd files are not being created

Post by aastaguy »

total 1672
drwxrwxr-x. 2 apache nagios 4096 Feb 19 11:10 .
drwxr-xr-x. 28 root root 4096 Feb 19 04:27 ..
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_10.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_11.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_2.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_3.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_5.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_7.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_8.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.90_9.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_10.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_11.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_2.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_3.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_5.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_7.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_8.rrd
-rwxrwxr-x 1 apache nagios 105312 Nov 8 2018 172.16.191.91_9.rrd
-rw-r--r-- 1 nagios nagios 0 Feb 19 11:10 mrtg.lock
-rwxrwxr-x. 1 apache nagios 0 Nov 8 2018 mrtg.ok

the thing I notice is that the ip in question that I ran the wizard on does not exist. 192.168.191.93
Last edited by aastaguy on Wed Feb 19, 2020 5:03 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: mrtg for Nagios XI - .rrd files are not being created

Post by scottwilkerson »

Lets run the following command

Code: Select all

rm -f /var/lib/mrtg/mrtg.lock
the the following, and report any errors

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
Also, can you show the output of

Code: Select all

ls -al /etc/mrtg/conf.d
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
aastaguy
Posts: 31
Joined: Tue Apr 30, 2019 10:29 am

Re: mrtg for Nagios XI - .rrd files are not being created

Post by aastaguy »

Thanks for your quick reply!

The first command to remove the lock went fine and din't report anything

The 2nd command gave me the usual following output:

ERROR: unable to open include file: /etc/mrtg/conf.d/*.cfg

The 3rd command output is below, where the host (192.168.191.93.cfg) does in fact exist:

total 48
drwxrwxr-x 2 apache nagios 4096 Feb 18 15:32 .
drwxr-xr-x. 4 root root 4096 Feb 19 10:46 ..
-rw-r--r-- 1 apache apache 11712 Nov 8 2018 172.16.191.90.cfg
-rw-r--r-- 1 apache apache 11717 Nov 8 2018 172.16.191.91.cfg
-rw-r--r-- 1 apache apache 15807 Feb 19 10:51 192.168.191.93.cfg

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: mrtg for Nagios XI - .rrd files are not being created

Post by scottwilkerson »

aastaguy wrote: ERROR: unable to open include file: /etc/mrtg/conf.d/*.cfg
This is quite bizarre because you were actually able to list the directory as root

Let's run the following:

Code: Select all

chown apache.nagios -R /etc/mrtg
chmod ug+wr -R /etc/mrtg/conf.d
Then try this again

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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: mrtg for Nagios XI - .rrd files are not being created

Post by scottwilkerson »

Also, what version of Nagios XI are you running?

And the version of the Switch wizard from Admin -> Manage Config Wizards (latest is 2.5.2)?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
aastaguy
Posts: 31
Joined: Tue Apr 30, 2019 10:29 am

Re: mrtg for Nagios XI - .rrd files are not being created

Post by aastaguy »

I agree on the bizarre part! After I change permissions, I get the same error:

ERROR: unable to open include file: /etc/mrtg/conf.d/*.cfg

/usr/local/nagios/bin/nagios –help

Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL

Website: https://www.nagios.org

I am running 2.4.3 for the Network switch/router config wizard.

Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: mrtg for Nagios XI - .rrd files are not being created

Post by scottwilkerson »

I would strongly suggest updating the wizard as there were a few versions causing similar errors

what do you get when you run

Code: Select all

su nagios -c 'ls -l /etc/mrtg/conf.d/*.cfg'
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
aastaguy
Posts: 31
Joined: Tue Apr 30, 2019 10:29 am

Re: mrtg for Nagios XI - .rrd files are not being created

Post by aastaguy »

-rw-rw-r-- 1 apache nagios 11712 Nov 8 2018 /etc/mrtg/conf.d/172.16.191.90.cfg
-rw-rw-r-- 1 apache nagios 11717 Nov 8 2018 /etc/mrtg/conf.d/172.16.191.91.cfg
-rw-rw-r-- 1 apache nagios 15807 Feb 19 10:51 /etc/mrtg/conf.d/192.168.191.93.cfg

I will update now and see what happens. I will report back.

Thanks!
Locked