Page 1 of 5

Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 1:58 pm
by druid
Hello,

When going to my Nagios webpage I'm seeing a red 'X' and a message saying "Unable to get process data". Everything on else on the homepage looks fine, but when clicking on "Hosts" or "Services" links I get to a page saying: "Error: Could not read host and service status information!:

The Nagios log seems fine, however the httpd error_log states this error several times:

Code: Select all

"AH01276: Cannot serve directory /var/www/html/: No matching DiretoryIndex (index.html, index.html.var, index.php, index.php) found, and server-generated directory index forbidden by Options directive"
Nothing is is /var/www/html/ and I'm not sure why Nagios is looking there. I'm not seeing anything pointing to it. Let me know if you'd like to see any config files.

Thank you!

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:09 pm
by eloyd
How did you install Nagios? Is this a VM? Did you compile from source? Something else?

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:11 pm
by druid
Installed Nagios from source. This is on a VM running CentOS 7.

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:18 pm
by eloyd
Nagios should have installed a few files in /var/www/html. Take a look at your install log and see if you missed anything. If it were me, I'd start over with a fresh VM.

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:29 pm
by druid
A previous employee had installed Nagios 3.5.1 on another VM. We are currently using this VM in production (planning on moving to new VM with Nagios v4). This old VM doesn't have anything in /var/www/html either

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:43 pm
by eloyd
You should have something in your http configuration directory for nagios.conf that describes where to find Nagios. Check /etc/httpd/conf.d and see if there is a nagios.conf file there. If so, can you post its contents?

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:54 pm
by druid
/etc/httpd/conf.d/nagios.conf

Code: Select all

# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /usr/local/nagios/etc/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1

         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /usr/local/nagios/etc/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 2:57 pm
by eloyd
Alias /nagios "/usr/local/nagios/share"
Have you tried: http://hostname/nagios as the URL?

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 3:14 pm
by druid
Have you tried: http://hostname/nagios as the URL?
I'm not quite sure what you mean.

Re: Nagios Core 4.1.1 "Unable to get process data"

Posted: Tue Oct 06, 2015 3:17 pm
by hsmith
He's asking what URL you are using to attempt to access Nagios.