I'm afraid not. You can see from
the code that the checking function simply returns "false" if any of the regexp checks fail. There's log output which you can get in the http response using `&debug=true`, but it's not formatted as prometheus metrics, nor can it be captured as an annotation for the alert AFAIK.
I think it would be a reasonable feature request as to set it to <N>, where N is the number of the regexp rule which failed. Note that there are four rulesets for the http prober.
fail_if_header_matches:
fail_if_header_not_matches:
fail_if_body_matches_regexp:
fail_if_body_not_matches_regexp:
The first rule which fails prevents all further checks from being done, so you only need to identify the single failing rule.
I guess the rules could all be numbered together starting from 1: e.g. in your example, fail_if_body_not_matches_regexp conditions could be counted as 2, 3 and 4. Or they could be in blocks, say 1000-1999, 2000-2999 etc.
Perhaps a better option would be to set the metric to a hash of the rule string. This would be consistent with how IP address resolution is dealt with (probe_ip_addr_hash) and means that each rule would have a stable value. However you wouldn't explicitly know which ruleset it was in; there's also a small potential for ambiguity if you match exactly the same string in both a header rule and a body rule.