Unable to view MRTG in Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sirgumby1
Posts: 1
Joined: Mon Apr 06, 2015 1:16 pm

Unable to view MRTG in Nagios

Post by sirgumby1 »

I am running Nagios Core version 4.1.0rc1 on Ubuntu 14.10. I have installed Nagios and all prerequisites. I am able to monitor hosts using PING but it is just an up/down monitor.

My issue is regarding MRTG and viewing the information pulled from SNMP. I cannot view the stats in nagios. When I navigate to the Nagios server where I have MRTG installed (nagios/mrtg), I get the following error: You don't have permission to access /mrtg on this server.

I have edited the apache2.conf file as follows:
Alias /mrtg "var/www/mrtg/"
<Directory "/var/www/mrtg/">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

Below is the error.log that I receive from Apache regarding the errors due to "server configuration"... I receive the error each time I try to connect.
/etc/apache2/var
[Mon Apr 06 11:14:41.386944 2015] [authz_core:error] [pid 21180] [client <IP address of client>:60500] AH01630: client denied by server configuration: /etc/apache2/var
[Mon Apr 06 11:15:57.373903 2015] [authz_core:error] [pid 21181] [client 127.0.0.1:59606] AH01630: client denied by server configuration: /etc/apache2/var
[Mon Apr 06 11:17:14.395091 2015] [authz_core:error] [pid 21183] [client 127.0.0.1:58376] AH01630: client denied by server configuration: /etc/apache2/var
[Mon Apr 06 11:20:53.204280 2015] [mpm_prefork:notice] [pid 21175] AH00169: caught SIGTERM, shutting down
[Mon Apr 06 11:20:54.236487 2015] [mpm_prefork:notice] [pid 21522] AH00163: Apache/2.4.10 (Ubuntu) PHP/5.5.12-2ubuntu4.3 configured -- resuming normal operations
[Mon Apr 06 11:20:54.236530 2015] [core:notice] [pid 21522] AH00094: Command line: '/usr/sbin/apache2'
[Mon Apr 06 11:23:46.702305 2015] [authz_core:error] [pid 21527] [client <IP address of client>:60605]

Does anyone have any idea how I can make this viewable so I can see the graphs of my routers/switches?

This is my first experience with Nagios, I apologize for my ignorance before hand and appreciate any help anyone can give!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Unable to view MRTG in Nagios

Post by Box293 »

Is SELinux enabled?

Code: Select all

getenforce
If it is, you can set it to permissive:

Code: Select all

sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
setenforce 0
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked