Page 2 of 3

Re: Web Site Monitoring

Posted: Thu Jan 29, 2015 5:02 pm
by tmcdonald
Are you able to ping www.fxglobe.com from the Nagios server?

Re: Web Site Monitoring

Posted: Thu Jan 29, 2015 5:06 pm
by cklayus
yes

Re: Web Site Monitoring

Posted: Thu Jan 29, 2015 5:09 pm
by tmcdonald
Please run the following as root from the command line and show me the output:

Code: Select all

/usr/local/nagios/libexec/check_http -H www.fxglobe.com -f ok -I 185.11.125.105 -u "/" -p 80
I personally got a 503:

Code: Select all

HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 1508 bytes in 0.528 second response time |time=0.527622s;;;0.000000 size=1508B;;;0
But when I pinged www.fxglobe.com I got 212.100.236.136 as the IP so I tried that:

Code: Select all

/usr/local/nagios/libexec/check_http -H www.fxglobe.com -f ok -I 212.100.236.136 -u "/" -p 80
HTTP OK: HTTP/1.1 200 OK - 40552 bytes in 0.703 second response time |time=0.702873s;;;0.000000 size=40552B;;;0
The server might be behind a load balancer or something that caused the XI wizard to report the wrong IP when setting it up.

Re: Web Site Monitoring

Posted: Thu Jan 29, 2015 6:27 pm
by cklayus
You are correct the server is behind encapsula. I worked fine until couple of weeks ago.
When I set up the web site monitoring i specified the domain name, not the ip.
how can i resolve this?

Re: Web Site Monitoring

Posted: Fri Jan 30, 2015 10:46 am
by tgriep
It seems that encapsula did some changes on their service they provide but if you remove the following line from your check, that should fix it unless you need to test to specific IP addresses.

-I 185.11.125.105

Re: Web Site Monitoring

Posted: Mon Feb 02, 2015 9:28 am
by cklayus
Ok that solved it. But I am still left with one site that has a different error "cannot make ssl connection"
###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.3.0
# Date: 2015-02-02 16:27:36
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
host_name GOFOREX_trade.globeoptions.com
use xiwizard_website_host
address trade.globeoptions.com
parents EDP_CLOUD FORTI
hostgroups GoForex
check_command check_xi_service_http! -f ok -u "/" -S -p 443!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts alex
contact_groups admins,GoForex
notification_interval 1440
notification_period xi_timeperiod_24x7
icon_image www_server.png
statusmap_image www_server.png
_xiwizard website
register 1
}

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
##########################################################################

###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.0
# Date: 2015-02-02 16:18:04
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
host_name GOFOREX_trade.globeoptions.com
service_description DNS Resolution
use xiwizard_website_dns_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
freshness_threshold 700
notification_interval 1440
notification_period xi_timeperiod_24x7
contacts alex
contact_groups admins,GoForex
_xiwizard website
register 1
}

define service {
host_name GOFOREX_trade.globeoptions.com
service_description HTTP
use xiwizard_website_http_service
check_command check_xi_service_http! -f ok -u "/" -S -p 443!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
freshness_threshold 700
notification_interval 1440
notification_period xi_timeperiod_24x7
contacts alex
contact_groups admins,GoForex
_xiwizard website
register 1
}

define service {
host_name GOFOREX_trade.globeoptions.com
service_description SSL Certificate
use xiwizard_website_http_cert_service
check_command check_xi_service_http_cert!30
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
freshness_threshold 700
notification_interval 1440
notification_period xi_timeperiod_24x7
contacts alex
contact_groups admins,GoForex
_xiwizard website
register 1
}

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
####################################################################

Re: Web Site Monitoring

Posted: Mon Feb 02, 2015 10:07 am
by tgriep
For your SSL connection issue, try adding the following to the end of the CERT check.

Code: Select all

--ssl=1 -p 443
It looks like that host only supports TLSv1 and the check needs to use that.

Re: Web Site Monitoring

Posted: Tue Feb 03, 2015 5:22 am
by cklayus
changed it. now it looks like this

define service {
host_name GOFOREX_trade.globeoptions.com
service_description SSL Certificate
use xiwizard_website_http_cert_service
check_command check_xi_service_http_cert!30 --ssl=1 -p 443!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
freshness_threshold 700
notification_interval 1440
notification_period xi_timeperiod_24x7
contacts alex
contact_groups admins,GoForex
_xiwizard website
register 1
}

still doesnt work.
It worked just fine before

Re: Web Site Monitoring

Posted: Tue Feb 03, 2015 9:59 am
by tmcdonald
This works just fine for me:

Code: Select all

root@localhost: /usr/local/nagios/libexec
$ /usr/local/nagios/libexec/check_http -H www.fxglobe.com -C 3
OK - Certificate '*.fxglobe.com' will expire on Thu 01 Oct 2015 12:59:00 AM CDT.
Can you run that command and show us the output?

Also, please post your /usr/local/nagios/etc/commands.cfg file. It is possible your commands were modified.

Re: Web Site Monitoring

Posted: Wed Feb 04, 2015 10:02 am
by cklayus
thnx you can close the thread all the problems were encapsula realted