Check_HTTP Query

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
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Check_HTTP Query

Post by neworderfac33 »

Good morning - this is a follow up to a previously closed topic https://support.nagios.com/forum/viewto ... =7&t=34358 , as I just thought of something else that might have been causing the issue.

I am attempting to monitor the HTTP service on two virtual windows servers using the following:

Code: Select all

define service
        use                     generic-service
        #host_name              MYFIRSTSERVER
        hostgroup_name          jenkins-test-masters
        service_description     HTTP Server
        check_command           check_http
        }
In the web interface, one server reports "HTTP WARNING: HTTP/1.1 403 Forbidden - 1491 bytes in 0.004 second response time " whilst the other reports "Connection refused ".

Whilst installing the NSClient on two additional servers this morning, I noticed that the installation instructions I'd been using didn't say anything about putting a tick in the "Enable Web Server" box, so I haven't been doing so.

Given the fact that I'm receiving two different error messages, I don't really think this is related, but is there any chance that this could be causing my problem?

And, what's the difference between the above and:

Code: Select all

define service {
        use                     generic-service
        #host_name              MYFIRSTSERVER,MYSECONDSERVER
        hostgroup_name          jenkins-test-masters
        service_description     Service - Apache HTTP
        check_command           check_nt!PROCSTATE! -d SHOWALL -l httpd.exe
        }
which displays
"httpd.exe: Running" for the server that displays HTTP WARNING: HTTP/1.1 403 Forbidden - 1491 bytes in 0.007 second response time and
"httpd.exe: not running " for the server that displays connection refused


Thanks in advance

Pete
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Check_HTTP Query

Post by jdalrymple »

There really isn't enough information here for us to be absolutely certain, but we can conjecture:
peterooney wrote:

Code: Select all

define service
        use                     generic-service
        #host_name              MYFIRSTSERVER
        hostgroup_name          jenkins-test-masters
        service_description     HTTP Server
        check_command           check_http
        }
This looks like a proper http check, run locally to verify functionality of an http server. In this case you were getting 403 responses from one server which indicates httpd is very much working properly, but is perhaps somehow reconfigured for your purposes. It all depends on what that webserver is intended for. The other server indicating connection refused means either httpd isn't running (on the standard port) or you have a firewall prevening access to it. This check is more end to end complete in verifying that users will be able to access a website.
peterooney wrote:

Code: Select all

define service {
        use                     generic-service
        #host_name              MYFIRSTSERVER,MYSECONDSERVER
        hostgroup_name          jenkins-test-masters
        service_description     Service - Apache HTTP
        check_command           check_nt!PROCSTATE! -d SHOWALL -l httpd.exe
        }
This just verifies that there is a process running on the host called httpd.exe. It doesn't factor in any network/firewall issues, httpd configuration issues, etc. It can confirm that the webserver process is alive but cannot confirm anything beyond that. It is a very incomplete way to verify that a web page is available, but can be valuable in narrowing down the scope of a web issue nonetheless.
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Check_HTTP Query

Post by neworderfac33 »

Thank you for your valuable input, which leads me to think that it might indeed be a firewall or OU issue.

Although both servers were built at the same time, we also carry out a final patch/scan phase after software installation, after which the server is moved from a test to a live OU.

It's quite possible that one has been moved whilst the other hasn't, so I'll pick this up with our network people.

Thanks again

Pete
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Check_HTTP Query

Post by hsmith »

peterooney wrote:Thank you for your valuable input, which leads me to think that it might indeed be a firewall or OU issue.

Although both servers were built at the same time, we also carry out a final patch/scan phase after software installation, after which the server is moved from a test to a live OU.

It's quite possible that one has been moved whilst the other hasn't, so I'll pick this up with our network people.

Thanks again

Pete
Hi Pete,

Do you want me to close this topic, or would you like us to leave it open just in case it's not a network thing?
Former Nagios Employee.
me.
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Check_HTTP Query

Post by neworderfac33 »

Yes, the thread can be closed - both servers were on the same VLAN, so I just reinstalled NSClient on the troublesome server and the problem appears to have rectified itself.

Thanks and have a good weekend! :-)

Pete
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Check_HTTP Query

Post by hsmith »

peterooney wrote:Yes, the thread can be closed - both servers were on the same VLAN, so I just reinstalled NSClient on the troublesome server and the problem appears to have rectified itself.

Thanks and have a good weekend! :-)

Pete
Thank you. You too!
Former Nagios Employee.
me.
Locked