merry xmas !!
I've to check an https site
https check
./check_http -H www.mysite.it -f follow -S
HTTP OK: HTTP/1.1 200 OK - 183891 bytes in 0,079 second response time |time=0,078572s;;;0,000000 size=183891B;;;0
in Nagios check...
define service{
use generic-service ; Name of service template to use
host_name www.mysite.it
service_description Https
check_command check_http!-f follow -S
}
the replay is..
HTTP WARNING: HTTP/1.1 404 Not Found - 492 bytes in 0,020 second response time
the commandi is...
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
check_http It seems easy but ...
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: check_http It seems easy but ...
Hello @nlabardi,
Thank you. Happy Holidays!
Since you are passing the hostname, please try changing the -I to -H in the check command definition:
Let me know if that resolve the issue.
Thank you. Happy Holidays!
Since you are passing the hostname, please try changing the -I to -H in the check command definition:
Code: Select all
define command {
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_http It seems easy but ...
It might also be worthwhile to review the parent host definition (for www.mysite.it) and make sure address and host_name are the same, in this case.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: check_http It seems easy but ...
@nlabardi, let us know if @benjaminsmith and @mcapra answered your question.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_http It seems easy but ...
so..
I've fixed the command in ...
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
the host name and ip address are consistent with how they should be
define host{
use cloud-server ; Inherit default values from a template
host_name http://www.mysite.it ; The name we're giving to this host
alias mysite.it SITO ; A longer name associated with the host
address xxx.yyy.xxx.yyy ; IP address of the host
}
ping http://www.mysite.it
replay from xxx.yyy.xxx.yyy
ping mysite.it
replay from xxx.yyy.xxx.yyy
am I ignoring something?
(I use -f follow)
I've fixed the command in ...
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
the host name and ip address are consistent with how they should be
define host{
use cloud-server ; Inherit default values from a template
host_name http://www.mysite.it ; The name we're giving to this host
alias mysite.it SITO ; A longer name associated with the host
address xxx.yyy.xxx.yyy ; IP address of the host
}
ping http://www.mysite.it
replay from xxx.yyy.xxx.yyy
ping mysite.it
replay from xxx.yyy.xxx.yyy
am I ignoring something?
(I use -f follow)
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: check_http It seems easy but ...
@nlabardi, Please change $HOSTADDRESS$ to $HOSTNAME$ in your command.
OR change the address to http://www.mysite.it in the host definition:command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
define host{
use cloud-server ; Inherit default values from a template
host_name http://www.mysite.it ; The name we're giving to this host
alias mysite.it SITO ; A longer name associated with the host
address http://www.mysite.it
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_http It seems easy but ...
Bingo!
it's work fine !
thank you and merry new year
it's work fine !
thank you and merry new year
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: check_http It seems easy but ...
@nlabardi, Happy new year!
Closing the thread as resolved.
Closing the thread as resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.