service http Critical

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.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

service http Critical

Post by ziedmahjoub »

hi ,
i want to monitor the service http in a windows machine so i just added this service in the windows.cfg :

define service {
use generic-service
host_name user
service_description http
check_command check_http
}

thanks a lot for your answers
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: service http Critical

Post by tmcdonald »

What is the actual issue you are having?
Former Nagios employee
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: service http Critical

Post by ziedmahjoub »

Status Information :

CRITICAL - Socket timeout after 10 seconds
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: service http Critical

Post by tmcdonald »

Do you actually have "host_name user" for that service? If so, can you post the host config for the "user" host?
Former Nagios employee
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: service http Critical

Post by slansing »

Can you show us the command definition that you are using there?
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: service http Critical

Post by ziedmahjoub »

tmcdonald wrote:Do you actually have "host_name user" for that service? If so, can you post the host config for the "user" host?
Yes i have , this is the host config :

Code: Select all

define host{
            use                   windows-server
            host_name        user
            alias                 My Windows Server
            address             a.b.c.d
            }
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: service http Critical

Post by ziedmahjoub »

slansing wrote:Can you show us the command definition that you are using there?

Code: Select all

#'check_http' command definition
define command {
   command_name    check_http
   command_line       $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
                  }
I have tried to replace -I with -H but it didn't work
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: service http Critical

Post by tgriep »

Can you run the check from a command prompt without any errors?
Try running this and post the results back.

Code: Select all

/usr/local/nagios/libexec/check_http -H <IP or Host name>
Be sure to check out our Knowledgebase for helpful articles and solutions!
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: service http Critical

Post by ziedmahjoub »

Code: Select all

sudo /usr/local/nagios/libexec/check_http -H 192.168.0.24
CRITICAL - Socket timeout after 10 seconds
after i disabled the firewall of the machine, i get this message:

Code: Select all

connect to address 192.168.0.24 and port 80:Connection refused
HTTP CRITICAL - Unable to open TCP socket
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: service http Critical

Post by abrist »

It looks like port 80 is not open. What is the output of nmap?

Code: Select all

nmap -p 80 192.168.0.24
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked