fail_if_body_not_matches_regexp Body did not match regular expression
33 views
Skip to first unread message
joe94
unread,
Feb 16, 2023, 3:24:07 PM2/16/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Hello I do a regex to check the body but I can't when I add an
alphanumeric character. I have in my body AX/4.0.13 200 ok, If I put in
my blackbox.yml
fail_if_body_not_matches_regexp:
-"AX/4.0.13"
return ok
but
fail_if_body_not_matches_regexp:
- "AX/4.0.13 200"
msg="Body did not match regular expression" regexp="AX/4.0.13 200 ok"
Any ideas?
Message has been deleted
Brian Candler
unread,
Feb 19, 2023, 6:19:08 PM2/19/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
Show the full output from "curl -v <url>" directly to the endpoint under test.
Maybe you'll find that "200 ok" is not part of the body, but is the status line ("HTTP/1.1 200 ok") which precedes the headers.