How would I check a url and the html displayed?
I need to check the following:
https://prod.xxxxx.com/rest/v1.0/CreditCard/Status
https://prod1.yyyyy.com/rest/v1.0/CreditCard/Status
For a successful attempt the html displayed would be:
{"Result":{"ResultCode":0,"ResultDetail":"Up"}}
How would I write this into a .cfg?
http check html display
Re: http check html display
The "check_http_content" plugin should do what you want:
https://exchange.nagios.org/directory/P ... nt/details
Hope that helps!
--Jeffrey
https://exchange.nagios.org/directory/P ... nt/details
Code: Select all
define command {
command_name CheckHTTPContent
command_line $USER1$/check_http_content -U $ARG1$ -m $ARG2$ -t 10
}
define host {
host_name localhost
use linux-server
alias localhost
address 127.0.0.1
check_command CheckHTTPContent!http://localhost/sdf.html!{"Result":{"ResultCode":0,"ResultDetail":"Up"}}!!!!!!
register 1
}
--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!