Page 1 of 2
Website URL monitoring for site hosted on IIS windows 2012
Posted: Wed Apr 26, 2017 4:01 am
by edwinkamal
Hi
I have 2 windows servers and Installed the Nsclient++
These 2 servers connected with Load Balancers.
I have created the Linux nagios Server.
I want to monitor my URL.
https://xxx.net/cyz/Home.aspx
Below is the command and Service description. But Servers says "
SSL Cert UNKNOWN check_http: Invalid option - SSL is not available
Belwo is the command section.I have used the both the below command option.
define service{
use generic-service
host_name xxx.NET
service_description check HTTP
#check_command check_https!-u /ui
check_command check_http!-H xxx.net -p 443 -u /tala -f follow -S -v -t 2
}
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
# Check https
define command{
command_name check_https
command_line $USER1$/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' $ARG1$
}
Do we need to change anything specif to windows servers i nthe command section?
Do we need to change any setting NSclient.ini file?
Please advise
Thanks
Edwin
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Wed Apr 26, 2017 12:41 pm
by cdienger
NSClient++ isn't actually needed here if the Nagios server is directly checking the url.
Try defining the service with the command:
check_command check_http!-f follow -u "/tala" -S -p 443 -v -t 2
And define the command as:
$USER1$/check_http -H $HOSTADDRESS$ $ARG1$
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Wed Apr 26, 2017 4:27 pm
by tacolover101
i think the crux of the issue is based on your error message
SSL Cert UNKNOWN check_http: Invalid option - SSL is not available
your check_http may not be compiled with SSL support. you'll want to remove the -S flag from your command, and tell it to check on port 80. the other option, is re-compiling your plugins with SSL support. i think the packages are openssl and openssl-devel that are required.
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Wed Apr 26, 2017 4:31 pm
by cdienger
Thanks for the assist, tacolover101. edwinkamal, let us know your results once you've had a chance to test.
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Thu Apr 27, 2017 12:23 am
by edwinkamal
Hi Team
I have tried the below steps
yum -y install openssl openssl-devel
cd /tmp
wget
http://www.nagios-plugins.org/download/ ... 1.5.tar.gz
tar xzf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure --with-openssl
make all
make install
Also changed the command as below:
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}
# 'check_ssl_cert' command definition
define command{
command_name check_ssl_cert
command_line $USER1$/check_http --ssl -C 14 -H $HOSTADDRESS$ -I '$HOSTADDRESS$' $ARG1$ $ARG2$ $ARG3 $ARG4
}
Also changed the Service as below:
define service{
use generic-service
host_name xxx.NET
service_description check HTTP
check_command check_http!-f follow -u "/tala" -S -p 443 -v -t 2
define service{
use generic-service
host_name xxx.NET
service_description SSL Cert
check_command check_ssl_cert!-C 14 -H xxx.net -I 123.12.12.123
}
Now the result says critical:
check HTTP CRITICAL
CRITICAL - Socket timeout after 2 seconds
SSL Cert CRITICAL
CRITICAL - Socket timeout after 10 seconds
I have attached the screenshot for your reference.
Thanks
Edwin
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Thu Apr 27, 2017 10:57 am
by cdienger
Are you able to run:
wget xxx.net/tala
and get a "200 OK" response?
Is there a web proxy that the request must go through? If so, the check_http command would need to be changed.
https://www.monitoring-plugins.org/doc/ ... _http.html has details and examples.
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Tue May 02, 2017 4:16 am
by edwinkamal
When I try with Wget I am getting the below message
--2017-05-02 09:13:15-- wget
https://xxx.net/tala
Resolving xxx.net (xxx.net)... failed: Name or service not known.
wget: unable to resolve host address âxxx.netâ
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Tue May 02, 2017 9:09 am
by cdienger
The Nagios server isn't able to resolve the hostname to an IP. Check /etc/resolv.conf to make sure the correct DNS servers are listed. You can also make a manual entry to /etc/hosts as a work around:
123.12.12.123 xxx.net
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Tue May 02, 2017 4:11 pm
by tacolover101
you probably need to setup your internal DNS records on the Nagios system. your linux admin should be able tohelp with that.
one other thing, you're calling to hostaddress, but the variable isn't even defined in what you posted.
Code: Select all
define host{
host_name host_name
alias alias
display_name display_name
address address
see -
https://assets.nagios.com/downloads/nag ... tions.html
Re: Website URL monitoring for site hosted on IIS windows 20
Posted: Wed May 03, 2017 8:23 am
by edwinkamal
hi
I have already defined the host name with my LLB url name
Thanks
Edwin