Page 1 of 1

mrtg problem after yum update

Posted: Thu Jan 29, 2015 6:36 am
by srrhd
Hi,

Our server has been updated via "yum update". If NagiosXI is still working perfectly, all the bandwith services using check_rrdtraf from the Switch/Router Wizard stopped working. The rrd files are now populated with NAN.

When verifying the mrtg.cfg we got:
[root@localhost var]# sudo-u apache LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
2015-01-29 15:33:35: ERROR: Creating templock /etc/mrtg/mrtg.cfg_l_16199: Permission denied at /usr/bin/mrtg line 1829.
Our server is a CentOS 6, rrdtool version is 1.3.8-7.el6, and NagiosXI is 2014R2.5.

All files in /etc/mrtg/conf.d/ are owned by apache:nagios in 775.

The mrtg.cfg is :
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg

Include: conf.d/*.cfg
Forks: 4
What can we do fix this permission problem ? We tried the script NagiosXI-FixPerms.sh but it didn't help.

Re: mrtg problem after yum update

Posted: Thu Jan 29, 2015 9:52 am
by scottwilkerson
srrhd wrote:All files in /etc/mrtg/conf.d/ are owned by apache:nagios in 775.
These are ok, but what are the permissions of

Code: Select all

ls -al /var/lib/mrtg
Also, we use a very specific version of mrtg in XI

Can you post the output of running

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg
If it isn't 2.17.4 we will need to walk you through manually upgrading mrtg from our source tarball

Re: mrtg problem after yum update

Posted: Fri Jan 30, 2015 12:12 am
by srrhd
All the .rrd files are owned by root in 644 :

Code: Select all

[root@localhost ~]# ls -al /var/lib/mrtg
[...]
-rw-r--r--   1 root root 105312 Jan 29 08:45 10.0.0.200_10.rrd
[...]
For mrtg the version is 2.16.2:

Code: Select all

[root@localhost ~]# LANG=C LC_ALL=C /usr/bin/mrtg
Usage: mrtg <config-file>

mrtg-2.16.2 - Multi Router Traffic Grapher

Copyright 1995-2006 by Tobias Oetiker
Licensed under the Gnu GPL.

If you want to know more about this tool, you might want
to read the docs. You can find everything on the
mrtg website:

http://oss.oetiker.ch/mrtg/
I used your script from /tmp/nagiosxi/subcomponents/mrtg/ to upgrade it and everything works fine now.

Thanks for your support.

Re: mrtg problem after yum update

Posted: Fri Jan 30, 2015 10:04 am
by cmerchant
Great! We'll go ahead and close the thread. Thanks.