Web Site Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Site Monitoring

Post by tmcdonald »

Are you able to ping www.fxglobe.com from the Nagios server?
Former Nagios employee
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: Web Site Monitoring

Post by cklayus »

yes
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Site Monitoring

Post 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.
Former Nagios employee
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: Web Site Monitoring

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Web Site Monitoring

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: Web Site Monitoring

Post 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
#
####################################################################
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Web Site Monitoring

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: Web Site Monitoring

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Web Site Monitoring

Post 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.
Former Nagios employee
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: Web Site Monitoring

Post by cklayus »

thnx you can close the thread all the problems were encapsula realted
Locked