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.
Hi there, I am compiled and installed Nagios and I didn't setup anything else. After start Nagios and goes to web interface I can see HTTP service is getting CRITICAL flag and service is up and running. I think I am missing something on the configuration but I don't know where to look - for the right documentation - or what to change in configuration files. At localhost.cfg I can see this service definition:
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service{
use local-service ; Name of service template to use
host_name localhost
service_description HTTP
check_command check_http
notifications_enabled 0
}
reynierpm wrote:Hi there, I am compiled and installed Nagios and I didn't setup anything else. After start Nagios and goes to web interface I can see HTTP service is getting CRITICAL flag and service is up and running. I think I am missing something on the configuration but I don't know where to look - for the right documentation - or what to change in configuration files. At localhost.cfg I can see this service definition:
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service{
use local-service ; Name of service template to use
host_name localhost
service_description HTTP
check_command check_http
notifications_enabled 0
}
hsmith wrote:
What OS did you install Nagios on?
What version of Nagios did you install?
What does the return of a service httpd status look like?
What OS did you install Nagios on? => CentOS 6.7
What version of Nagios did you install? => Nagios Core 4.1.1
What does the return of a service httpd status look like?[/quote] => httpd (pid 24075) is running...
hsmith wrote:
What OS did you install Nagios on?
What version of Nagios did you install?
What does the return of a service httpd status look like?
What OS did you install Nagios on? => CentOS 6.7
What version of Nagios did you install? => Nagios Core 4.1.1
What does the return of a service httpd status look like? => httpd (pid 24075) is running...
# /usr/local/nagios/libexec/check_http -H localhost
HTTP WARNING: HTTP/1.1 403 Forbidden - 5159 bytes in 0.002 second response time |time=0.001546s;;;0.000000 size=5159B;;;0
I should check for this domains "admin.qa.pdone.com, api.qa.pdone.com, share.qa.pdone.com" I think, if they are alive then all should be good right? My concern around this is what happen if DNS fails and HTTP service still up & running, on this case check for HTTP server at localhost will be better, right?
Can you try to create an empty file /var/www/html/index.html and see if that resolves your problem?
**Edit**
To expand on what I asked, by default you will get 403 forbidden when running check_http against localhost in a CentOS box because directory listing is forbidden and you have no index file. If you create the file it will change the behavior of the system. It's a common occurrence that a base install of Nagios on base CentOS will have the problem you described if there is no index file in /var/www/html.