Regarding Monitoring my website!

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ssindhe
Posts: 13
Joined: Wed Apr 08, 2015 1:26 pm

Regarding Monitoring my website!

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Regarding Monitoring my website!

Post 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
ssindhe
Posts: 13
Joined: Wed Apr 08, 2015 1:26 pm

Re: Regarding Monitoring my website!

Post 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!!
ssindhe
Posts: 13
Joined: Wed Apr 08, 2015 1:26 pm

Re: Regarding Monitoring my website!

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Regarding Monitoring my website!

Post by scottwilkerson »

Can our Nagios server resolve the hostname you are using to your internal server?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ssindhe
Posts: 13
Joined: Wed Apr 08, 2015 1:26 pm

Re: Regarding Monitoring my website!

Post by ssindhe »

Hi, thanks for responding!!

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

I
ssindhe
Posts: 13
Joined: Wed Apr 08, 2015 1:26 pm

Re: Regarding Monitoring my website!

Post 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?
ssindhe
Posts: 13
Joined: Wed Apr 08, 2015 1:26 pm

Re: Regarding Monitoring my website!

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Regarding Monitoring my website!

Post by abrist »

Awesome! Congrats!
I will lock up the thread - please open a new thread for any new questions/issue!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked