Page 3 of 7

Re: check_mrtgtraf

Posted: Thu Apr 27, 2017 3:13 pm
by dwhitfield
What's the output of find / -name mrtg.cfg?

You may just need to run mkdir /etc/mrtg/conf.d/ but if you have multiple configs, that might not be all that needs to happen.

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 8:53 am
by jmac727
Yeah it looks like I don't have that /conf.d/ folder. Here are my results.

Any advice is appreciated!

Thanks

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 11:41 am
by tgriep
Did you make that folder on your system?
To do that, login as root the the server and run the following to create the folder and to set the permissions.

Code: Select all

mkdir /etc/mrtg/conf.d
chmod nagios.nagios /etc/mrtg/conf.d
chmod 775 /etc/mrtg/conf.d
Then you will have to setup a cron entry to run the mrtg application every 5 minutes which will generate the /var/lib/mrtg rrd files.

If your system has this file on the system

Code: Select all

/etc/cron.d/mrtg
Make sure this line is in that file

Code: Select all

*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
If the /etc/cron.d/mrtg file doesn't exist, create it and add that line to it.

Then restart the cron daemon by running the following to load the changes

Code: Select all

service crond restart
Try that and see if the /var/lib/mrtg rrd files are created.

If not, run the following command as root and post back the /tmp/mrtg.txt file?

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base &> /tmp/mrtg.txt

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 12:02 pm
by jmac727
Hi

I made the directory. I was unable to chmod nagios.nagios /etc/mrtg/conf.d. I attached the error I got.

I've also attached the .txt file you requested.

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 12:10 pm
by tgriep
Oops, typo on my part. It should be chown, not chmod.

Code: Select all

chown nagios.nagios /etc/mrtg/conf.d

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 12:13 pm
by tgriep
Another thing, edit the /etc/mrtg/mrtg.cfg file and remove this line

Code: Select all

Enable SNMPv3: yes
Save the file and see if the rrd files are created in the /var/lib/mrtg folder.

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 3:47 pm
by jmac727
Hi. I did all these things and still nothing :(

Re: check_mrtgtraf

Posted: Fri Apr 28, 2017 3:49 pm
by jmac727
This is in my mrtg cron file

Re: check_mrtgtraf

Posted: Mon May 01, 2017 8:55 am
by tgriep
Run the following command as root and post back the /tmp/mrtg.txt file?

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base &> /tmp/mrtg.txt

Re: check_mrtgtraf

Posted: Mon May 01, 2017 10:48 am
by jmac727
Here it is.

Thanks again for your patience and diligence in working with me.