CHECK_HTTP_REDIRECT PLUGIN:
CHECK_HTTP_REDIRECT PLUGIN:
Hello Everyone,
I really need your help in redirect plugin. I have this plugin to monitor websites that are redirected to another site. I have configured everything but still it shows INVALID USAGE when i execute the command. Please help me on this. What does this option mean? Should i enter the redirect URL in this option "-R"?
option "-R" - URL that must be equal to Header Location Redirect URL
Also the redirected website has the credentials entered already. Will that be a problem?
Please anyone help me out on this.
Thank you,
Sudarshan.
I really need your help in redirect plugin. I have this plugin to monitor websites that are redirected to another site. I have configured everything but still it shows INVALID USAGE when i execute the command. Please help me on this. What does this option mean? Should i enter the redirect URL in this option "-R"?
option "-R" - URL that must be equal to Header Location Redirect URL
Also the redirected website has the credentials entered already. Will that be a problem?
Please anyone help me out on this.
Thank you,
Sudarshan.
Re: CHECK_HTTP_REDIRECT PLUGIN:
Can you post the full command and service configuration for the check?
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.
"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.
Re: CHECK_HTTP_REDIRECT PLUGIN:
Hello,
I have posted the command and host configuration below. I dont have any service checks apart from ping and dns entry..
Please let me know your suggestions..
COMMAND: /usr/local/nagios/libexec/check_http_redirect -U http://****.com -R https://********** -t 30 -c 2 -v
OUTPUT: ERROR: INVALID USAGE
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 CRITICAL (if not equal) or CRITICAL ( if doesn't exist)
--help shows this message
--version shows version information
-U URL to retrieve (http or https)
-R URL that must be equal to Header Location Redirect URL
-S The HTTP status code that is expected
-t Timeout in seconds to wait for the URL to load. If the page fails to load,
Nagios check_http_redirect will exit with UNKNOWN state (default 60)
-c Depth of redirects to follow (default 10)
Service Configuration:
define host {
host_name *****.******.com
use xiwizard_website_host
address *****.******.com
check_command check_redirect!http://****.******.com!https://**********
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts *********
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image *****
statusmap_image *****
_xiwizard website
register 1
}
Thank you,
Sudarshan.
I have posted the command and host configuration below. I dont have any service checks apart from ping and dns entry..
Please let me know your suggestions..
COMMAND: /usr/local/nagios/libexec/check_http_redirect -U http://****.com -R https://********** -t 30 -c 2 -v
OUTPUT: ERROR: INVALID USAGE
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 CRITICAL (if not equal) or CRITICAL ( if doesn't exist)
--help shows this message
--version shows version information
-U URL to retrieve (http or https)
-R URL that must be equal to Header Location Redirect URL
-S The HTTP status code that is expected
-t Timeout in seconds to wait for the URL to load. If the page fails to load,
Nagios check_http_redirect will exit with UNKNOWN state (default 60)
-c Depth of redirects to follow (default 10)
Service Configuration:
define host {
host_name *****.******.com
use xiwizard_website_host
address *****.******.com
check_command check_redirect!http://****.******.com!https://**********
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts *********
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image *****
statusmap_image *****
_xiwizard website
register 1
}
Thank you,
Sudarshan.
Re: CHECK_HTTP_REDIRECT PLUGIN:
This is a 3rd party plugin and I am not familiar with it, but I don't see the "-v" flag in the help menu as an option. Since, you ca getting a "INVALID USAGE" error, I would guess it's a syntax problem.
Can you try running the command without the "-v" flag and show us the output? Also, try testing it not only from the CCM, but also directly, from the CLI.
You can also post a comment/question on the Nagios Exchange to the developer of the plugin.
Can you try running the command without the "-v" flag and show us the output? Also, try testing it not only from the CCM, but also directly, from the CLI.
You can also post a comment/question on the Nagios Exchange to the developer of the plugin.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: CHECK_HTTP_REDIRECT PLUGIN:
Are you providing a URL redirect location that is valid to the main https url you provided?
Re: CHECK_HTTP_REDIRECT PLUGIN:
Hello,
Here is the output using "-v". I'm getting the same output that i got before.
I'm suspecting this parameter "-R - redirect URL"..
-R URL that must be equal to Header Location Redirect URL,, Should it be the redirect URL or the header location of the redirect URL?
COMMAND: /usr/local/nagios/libexec/check_http_redirect -U http://******** -R https:************ -t 30 -c 2 -v
OUTPUT: ERROR: INVALID USAGE
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 CRITICAL (if not equal) or CRITICAL ( if doesn't exist)
--help shows this message
--version shows version information
-U URL to retrieve (http or https)
-R URL that must be equal to Header Location Redirect URL
-S The HTTP status code that is expected
-t Timeout in seconds to wait for the URL to load. If the page fails to load,
Nagios check_http_redirect will exit with UNKNOWN state (default 60)
-c Depth of redirects to follow (default 10)
Output from CLI:
/usr/local/nagios/libexec/check_http_redirect -U http://******* -R https:://******* -t 30 -c 2 -v
ERROR: INVALID USAGE
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 CRITICAL (if not equal) or CRITICAL ( if doesn't e xist)
--help shows this message
--version shows version information
-U URL to retrieve (http or https)
-R URL that must be equal to Header Location Redirect URL
-S The HTTP status code that is expected
-t Timeout in seconds to wait for the URL to load. If the page fails to load,
Nagios check_http_redirect will exit with UNKNOWN state (default 60)
-c Depth of redirects to follow (default 10)
Thank you,
Sudarshan.
Here is the output using "-v". I'm getting the same output that i got before.
I'm suspecting this parameter "-R - redirect URL"..
-R URL that must be equal to Header Location Redirect URL,, Should it be the redirect URL or the header location of the redirect URL?
COMMAND: /usr/local/nagios/libexec/check_http_redirect -U http://******** -R https:************ -t 30 -c 2 -v
OUTPUT: ERROR: INVALID USAGE
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 CRITICAL (if not equal) or CRITICAL ( if doesn't exist)
--help shows this message
--version shows version information
-U URL to retrieve (http or https)
-R URL that must be equal to Header Location Redirect URL
-S The HTTP status code that is expected
-t Timeout in seconds to wait for the URL to load. If the page fails to load,
Nagios check_http_redirect will exit with UNKNOWN state (default 60)
-c Depth of redirects to follow (default 10)
Output from CLI:
/usr/local/nagios/libexec/check_http_redirect -U http://******* -R https:://******* -t 30 -c 2 -v
ERROR: INVALID USAGE
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 CRITICAL (if not equal) or CRITICAL ( if doesn't e xist)
--help shows this message
--version shows version information
-U URL to retrieve (http or https)
-R URL that must be equal to Header Location Redirect URL
-S The HTTP status code that is expected
-t Timeout in seconds to wait for the URL to load. If the page fails to load,
Nagios check_http_redirect will exit with UNKNOWN state (default 60)
-c Depth of redirects to follow (default 10)
Thank you,
Sudarshan.
Re: CHECK_HTTP_REDIRECT PLUGIN:
Hello Slansing,
Are you providing a URL redirect location that is valid to the main https url you provided?
I'm providing the redirect URL which is retrieved once i hit base URL. Is that correct or should it be the header location of the redirect URL?
Please advise.
-R URL that must be equal to Header Location Redirect URL
Thank you,
Sudarshan.
Are you providing a URL redirect location that is valid to the main https url you provided?
I'm providing the redirect URL which is retrieved once i hit base URL. Is that correct or should it be the header location of the redirect URL?
Please advise.
-R URL that must be equal to Header Location Redirect URL
Thank you,
Sudarshan.
Re: CHECK_HTTP_REDIRECT PLUGIN:
Could you try as lmiltchev suggested and omit the -v option?shan_1986 wrote:Here is the output using "-v". I'm getting the same output that i got before.
Former Nagios employee
Re: CHECK_HTTP_REDIRECT PLUGIN:
Hello,
I have tried without -v and i did get the same output "INVALID USAGE"
Thank you,
Sudarshan.
I have tried without -v and i did get the same output "INVALID USAGE"
Thank you,
Sudarshan.
Re: CHECK_HTTP_REDIRECT PLUGIN:
If you run
obviously replacing "www.somesite.com" with your own site, then whatever is listed after "Location:" should be what you want.
http://stackoverflow.com/questions/3037 ... 1-redirect
Code: Select all
curl -I www.somesite.comhttp://stackoverflow.com/questions/3037 ... 1-redirect
Former Nagios employee