Monitor an external website

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
psasines
Posts: 43
Joined: Wed Nov 21, 2018 5:19 am

Re: Monitor an external website

Post by psasines »

Hi,

As I mentioned before, the http_check command is not available in the Nagios Server.
Is it possible to install that command?


Kind regards,
PSA
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor an external website

Post by scottwilkerson »

mbellerue wrote:I'm sorry, I had that backwards. It's check_http

Also, if your proxy doesn't require a username/password, then you can skip that part. Let's just see if it tries to go out and reach the site.
So, it's

Code: Select all

/usr/local/nagios/libexec/check_http -I <SiteIP>
NOT

Code: Select all

/usr/local/nagios/libexec/http_check -I <SiteIP>
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
psasines
Posts: 43
Joined: Wed Nov 21, 2018 5:19 am

Re: Monitor an external website

Post by psasines »

Hi,

[root@localhost ~]# check_http
-bash: check_http: command not found
[root@localhost ~]# http_check
-bash: http_check: command not found
[root@localhost ~]#


No luck... :(
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor an external website

Post by scottwilkerson »

you aren't in the directory.... You need the full path

Code: Select all

/usr/local/nagios/libexec/check_http -I <SiteIP>
for example

Code: Select all

[root@localhost ~]# /usr/local/nagios/libexec/check_http -I www.nagios.com
HTTP OK: HTTP/1.1 301 Moved Permanently - 461 bytes in 0.069 second response time |time=0.069000s;;;0.000000 size=461B;;;0
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
psasines
Posts: 43
Joined: Wed Nov 21, 2018 5:19 am

Re: Monitor an external website

Post by psasines »

Hi,

This is the result:

[root@localhost libexec]# /usr/local/nagios/libexec/check_http -I www.psasines.pt
CRITICAL - Socket timeout

Kind regards,
PSA
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor an external website

Post by scottwilkerson »

Are you sure you have connectivity to that site from your Nagios server? I get this

Code: Select all

[root@localhost ~]# /usr/local/nagios/libexec/check_http -I www.psasines.pt
HTTP OK: HTTP/1.1 301 Moved Permanently - 409 bytes in 0.686 second response time |time=0.685648s;;;0.000000 size=409B;;;0
can you ping it?

Code: Select all

ping www.psasines.pt
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked