Hi. I am using the below module to fail the probe whenever the response body is anything else other than 'green', and it is working fine. But how do I get the response body when the probe fails? Eg. If the response body is 'red', then probe_success is showing to be zero, but how do I query or get what is the response body returned by the URL at this point when probe_success is zero.
Here is the module configuration I am using.
http_healthcheck_es:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0", "HTTP/1.0"]
fail_if_body_not_matches_regexp: ['green']
method: GET
no_follow_redirects: false
fail_if_ssl: false
fail_if_not_ssl: false
tls_config:
insecure_skip_verify: true
preferred_ip_protocol: "ip4"