Websites, Forms and Transactions

nagios-check-website

Description:

Nagios HTTP/HTTPS check via wget (with/without Proxy)

Current Version

0.1

Last Release Date

2013-11-28

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x

License

MIT


Project Notes
Check website accessibility by return code and execution time. - specific URL support - ssl option - alternative port - fake user agent - proxy as parameter - proxy from environment variable Usage: check_website [OPTIONS] {HOSTNAME} {HOSTNAME} host to check (dns/ip) [OPTIONS]: -p PORT port to check (default: 80) -u URL url path (default: /) -f use fake agent (windows xp/firefox 25) -s use SSL via HTTPS (default: 443) -P PROXY proxy access (hostname:port) -w WARNING warning threshold in milliseconds (default: 500) -c CRITICAL critical threshold in milliseconds (default: 2000) -n TRIES number of times to try (default: 1) -t TIMEOUT amount of time to wait in seconds (default: 10) Examples: $ ./check_website www.google.com HTTP OK: 174ms - http://www.google.com/|time=174ms;500;2000;0; $ ./check_website -f www.amazon.com HTTP WARNING: 740ms - http://www.amazon.com/|time=740ms;500;2000;0; $ ./check_website -p 8080 -u /index.html -s -P 192.168.27.111:3128 -c 4000 -w 1500 www.myweb.com HTTPS OK: 274ms - https://www.myweb.com:8080/index.html|time=274ms;1500;4000;0;
Reviews (5) Add a Review
check_http
by arendon, March 31, 2020

Hi! I have my command like this and it indicates that the port is invalid. I share my scrip define service { use generic-service ; Inherit default values from a template host_name RCIEF_EXTERNOS service_description HTTP check_command check_http!192.168.105.09 :17000/CR_RCIEF/faces/Units/Login.jsp define command { command_name check_http command_line $USER1$/check_http -I $HOSTADDRESS$ -p $_SERVICEport_number$ -u -A $ARG1$ } Help me



Working..!!!
by nishith, September 30, 2017

Here is my commands.cfg file: check_website -H $HOSTADDRESS$ $ARG1$ My service Monitoring Command is, check_website "www.example.com/login.aspx" It gives HTTP OK Message in Nagios Web Frontend.



Wrong Current Working Directory
by moetteli, September 30, 2014

Hi, Thanks for the script. It was though only working on the CLI and not in Nagios, until I found out, that somehow there was the a wrong current working directory defined. So WGet tried to save into that non-writeable working directory and failed and the whole script returned state 'UNKNOWN'. It was enough to just add -P /tmp to the wget call.



Problem
by Liberato, June 30, 2014

Hello, My conf in commands.cfg is: url define command{ command_name check_website command_line $USER1$/check_website.sh www.globo.com The status in service detail of url nagios is: UNKNOWN 06-11-2014 14:08:23 0d 0h 33m 15s 3/3 HTTP UNKNOWN: N/A - http://www.globo.com/ Do not know why the status is UNKNOWN. It should be OK as the other. On the command line is ok: /usr/local/nagios/libexec/check_website.sh www.globo.com HTTP OK: 234ms - http://www.globo.com/|time=234ms;500;2000;0; Can you help me?



how it work
by ivani, June 30, 2014

Hello, Can you help me. What I must write in section "define service"? If I write it: check_command check_website! -P 203.146.82.253 -w 20000 -c 50000 www.name.com - it is work not correctly. In the commands.cfg I wrote it: command_line $USER1$/check_website.sh -P $ARG1$ -w $ARG2$ -c $ARG3$ $HOSTADDRESS$ If I try to run this script /usr/lib/nagios/plugins/check_website.sh -p 80 -u /index.html -P 203.146.82.253 -w 22000 -c 50000 www.name.com - all work!



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4 (6)
Favorites
0
Views
170,376