Code: Select all
# ./check_http -H host1publicIP -p 9080 -w 5 -c 10
HTTP OK: HTTP/1.1 200 OK - 7909 bytes in 0.002 second response time |time=0.001918s;5.000000;10.000000;0.000000 size=7909B;;;0
When I added the new host - host2, I copied the above service and changed the ip and port to the new service. When I test it - works fine as below:
Code: Select all
# ./check_http -H host2publicIP -p 8080 -w 5 -c 10
HTTP OK: HTTP/1.1 200 OK - 7909 bytes in 0.003 second response time |time=0.002571s;5.000000;10.000000;0.000000 size=7909B;;;0
Code: Select all
connect to address host2privateIP and port 8080: Connection refused
HTTP CRITICAL - Unable to open TCP socket
Here are the complete service descriptions:
host 1:
Code: Select all
define service{
use generic-service
host_name host1
service_description DEMO-APP
check_command check_http!-H host1publicIP -p 9080 -u http://host1publicIP:9080/login/auth -w 5 -c 10
max_check_attempts 1
contact_groups Escalation
}
Code: Select all
define service{
use generic-service
host_name host2
service_description APP1
check_command check_http!-H host2publicIP -p 8080 -u http://host2publicIP:8080/login/auth -w 5 -c 10
contact_groups Escalation
max_check_attempts 1
}
To verify this, I tested using the private IP and got the same error at prompt:
Code: Select all
# ./check_http -H host2privateIP -p 8080 -w 5 -c 10
connect to address host2privateIP and port 8080: Connection refused
HTTP CRITICAL - Unable to open TCP socket
thanks in advance.