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?
check_http failed
Re: check_http failed
Can you post the exact command you run from the command line?
Former Nagios employee
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http failed
Please copy your service definition and show us how you have it defined.
Default location for RHEL/CentOS:
Default location for RHEL/CentOS:
Code: Select all
/usr/local/nagios/etc/services/<name>.cfgRe: check_http failed
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.

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
}

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
}
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http failed
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
It is very simple but ...
define host{
use generic-switch
host_name web.com
address web.com
check_command check_http
hostgroups webgroup
}
define host{
use generic-switch
host_name web.com
address web.com
check_command check_http
hostgroups webgroup
}
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http failed
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

but that file(check_http) is in that folder ... and with the correct permissions.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http failed
Can you show us your command definition for check_http? It should be in commands.cfg.
Re: check_http failed
# '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
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