Page 1 of 2

check_http failed

Posted: Mon Jan 20, 2014 6:09 am
by tmeto
hi all!

I'm having a problem trying to monitor a website and not sure if I'm doing the best.

Previously used the check_ping web to see if that was available, but now the web has changed and is of the type: # www.web.com/directorio1/directorio2/.

To see if it is available I'm using: / check_http-H web.com -u "/directory1/directory2/" -w 1000 -c 3000

But even when I test the script from "/usr/local/nagios/libexec" using: ./Check_http web.com .... works, when I look at my site in nagios "host groups / sumary" appears me down and I get this message: (No output on stdout) stderr: execvp (/usr/local/nagios/libexec/check_http-H!...) failed. errno is 2: No such file or directory


This is the most effective way to control the web?

Re: check_http failed

Posted: Mon Jan 20, 2014 12:50 pm
by tmcdonald
Can you post the exact command you run from the command line?

Re: check_http failed

Posted: Mon Jan 20, 2014 12:51 pm
by slansing
Please copy your service definition and show us how you have it defined.

Default location for RHEL/CentOS:

Code: Select all

/usr/local/nagios/etc/services/<name>.cfg

Re: check_http failed

Posted: Tue Jan 21, 2014 5:22 am
by tmeto
hi again, yesterday I was making changes and you get to check the web to work, but the host is still listed me as down.

Image


define command{
command_name check_http
command_line $USER1$/check_http!-H $HOSTADDRESS$ -u $ARG1$ -w $ARG2$ -c $ARG3$
}
define service{
use generic-service
host_name web.com
service_description check web login
check_command check_http!-H web.com -u "/aaaa/bbbb/" -c 3000 -w 1500
}

Re: check_http failed

Posted: Tue Jan 21, 2014 10:41 am
by slansing
Okay... so it is your host failing.. not your check_http service (it appears, at least at this time).. Can you post your host definition?

Re: check_http failed

Posted: Tue Jan 21, 2014 11:18 am
by tmeto
It is very simple but ...

define host{
use generic-switch
host_name web.com
address web.com
check_command check_http
hostgroups webgroup
}

Re: check_http failed

Posted: Tue Jan 21, 2014 11:23 am
by slansing
What are the critical host status details messages that are being output? It looks like you have not correctly set up your http check, generally, on hosts, you would set up a simple ping check to see if they are up or down. Since you already have check_http service, it would be recommended that you do this. If you still want to have two check_http checks doubling up(one on the host, and one on the service) you need to define your check_http check command on the host as you have it set up on the service. Right now you are just saying, run check_http, with nothing being passed to it.

Re: check_http failed

Posted: Wed Jan 22, 2014 3:29 am
by tmeto
Image

but that file(check_http) is in that folder ... and with the correct permissions.

Re: check_http failed

Posted: Wed Jan 22, 2014 1:32 pm
by slansing
Can you show us your command definition for check_http? It should be in commands.cfg.

Re: check_http failed

Posted: Thu Jan 23, 2014 6:50 am
by tmeto
# 'check_http' command definition
define command{
command_name check_http
# command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
}

and i try with other..


define command{
command_name check_http2
command_line $USER1$/check_http!-H $HOSTADDRESS$ -u $ARG1$ -w $ARG2$ -c $ARG3$
}


but it remains still