Page 1 of 1

Regarding Monitoring my website!

Posted: Wed Apr 08, 2015 3:14 pm
by ssindhe
Hi,

I want to monitor my website using Nagios, I have created a check_http. I want to know how to add this URL for Nagios monitoring.


I am using Linux server. Thanks

Re: Regarding Monitoring my website!

Posted: Wed Apr 08, 2015 3:32 pm
by jdalrymple
The usage of the default check_http is wicked simple:

Code: Select all

[jdalrymple@localhost libexec]$ ./check_http --help
<snip>
Usage:
 check_http -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]
       [-J <client certificate file>] [-K <private key>]
       [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]
       [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]
       [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]
       [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]
       [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]
       [-T <content-type>] [-j method]
NOTE: One or both of -H and -I must be specified
<snip>
[jdalrymple@localhost libexec]$ ./check_http www.google.com
HTTP OK: HTTP/1.0 200 OK - 18547 bytes in 0.148 second response time |time=0.148243s;;;0.000000 size=18547B;;;0

Re: Regarding Monitoring my website!

Posted: Thu Apr 09, 2015 8:43 am
by ssindhe
Thanks for your response!!

I run that command (/usr/lib64/nagios/plugins)$ ./check_http www.google.com
It was perfect, running exactly as we predicted.

But how about incorporate it on my nagios interface, I do not want to check this everytime. I want to monitor it always and add it to nagios monitor screen!!!

Thanks!!

Re: Regarding Monitoring my website!

Posted: Thu Apr 09, 2015 8:53 am
by ssindhe
When I hit ./check_http ServerURL(internal website)

it says "HTTP Critical-Unable to open tcp socket"

why it is working fine with ww.google.com but not with our internal server url?

Re: Regarding Monitoring my website!

Posted: Thu Apr 09, 2015 9:39 am
by scottwilkerson
Can our Nagios server resolve the hostname you are using to your internal server?

Re: Regarding Monitoring my website!

Posted: Fri Apr 10, 2015 9:55 am
by ssindhe
Hi, thanks for responding!!

Could you elaborate, you mean, I have to add my internal network address in check_http?

I

Re: Regarding Monitoring my website!

Posted: Fri Apr 10, 2015 10:08 am
by ssindhe
If the remote server runs only HTTP and not HTTPS, you’ll get “HTTP CRITICAL – Unable to open TCP socket” message as shown below.

Do you think this my problem, https? any idea how to resolve this?

Re: Regarding Monitoring my website!

Posted: Fri Apr 10, 2015 10:26 am
by ssindhe
Please resolve this, I figured out, thanks!!

Here is how I resolved this, for monitoring the internal website!!

be in same server$./check_http -H servername -u http://servername/any path

Re: Regarding Monitoring my website!

Posted: Fri Apr 10, 2015 11:27 am
by abrist
Awesome! Congrats!
I will lock up the thread - please open a new thread for any new questions/issue!