Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check Http Redirect
1.0
2009-09-18
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
111774
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
retrieve an http/s url and checks its header for a given redirects
if the redirect exists and equal to the redirect you entered then exits with OK, otherwise exits with WARNING (if not equal) or CRITICAL ( if doesn't exist)
Nagios check_http_redirect
retrieve an http/s url and checks its header for a given redirects
if the redirect exists and equal to the redirect you entered then exits with OK, otherwise exits with WARNING (if not equal) or CRITICAL ( if doesn't exist)
Syntax:
Command:
define command{
command_name check_redirect
command_line $USER1$/check_http_redirect -U $ARG1$ -R $ARG2$
}
Service:
define service{
*********************
check_command check_redirect!»http://url-from/»!»http://url-to/»
*********************
}
retrieve an http/s url and checks its header for a given redirects
if the redirect exists and equal to the redirect you entered then exits with OK, otherwise exits with WARNING (if not equal) or CRITICAL ( if doesn't exist)
Syntax:
Command:
define command{
command_name check_redirect
command_line $USER1$/check_http_redirect -U $ARG1$ -R $ARG2$
}
Service:
define service{
*********************
check_command check_redirect!»http://url-from/»!»http://url-to/»
*********************
}
Reviews (4)
bymevashi, September 12, 2018
I get error when I hit url for the plugin download
byrkabalin, September 21, 2012
The modified version with virtual host support is available at https://github.com/kabalin/check_http_redirect
With optional -H parameter it is possible to specify 'Host' request header attribute. This is particulary useful when webserver is behind loadbalancer and hosting several virtual hosts at the same address. If particular virtual host on the webserver redirection check is required, specify the hostname or IP in the -U parameter and the virtual host using -H parameter:
check_http_redirect.pl -U http://webserver1.com -H somesite.com -R https://somesite.com
With optional -H parameter it is possible to specify 'Host' request header attribute. This is particulary useful when webserver is behind loadbalancer and hosting several virtual hosts at the same address. If particular virtual host on the webserver redirection check is required, specify the hostname or IP in the -U parameter and the virtual host using -H parameter:
check_http_redirect.pl -U http://webserver1.com -H somesite.com -R https://somesite.com
bybbuchalter, February 24, 2012
I've updated and revised this script to support multiple redirects. Please see https://github.com/bbuchalter/check_http_redirect
bycparapat, December 2, 2011
Hi,
It is not working properly on me.
When I run the script with perl, I got below error :
Can't locate LWP/UserAgent.pm in @INC ...
I do to install libwww-perl, and I don't find that error anymore when I run the script with perl.
But, when I follow this manuals, the 'Status Information' is shown as 'null' on my Nagios browser.
How did you do that actually ?
If possible, please help with a good manuals..
Thanks in advance.
It is not working properly on me.
When I run the script with perl, I got below error :
Can't locate LWP/UserAgent.pm in @INC ...
I do to install libwww-perl, and I don't find that error anymore when I run the script with perl.
But, when I follow this manuals, the 'Status Information' is shown as 'null' on my Nagios browser.
How did you do that actually ?
If possible, please help with a good manuals..
Thanks in advance.