-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Heartbeat] Add negative body match #20728
Comments
Pinging @elastic/uptime (Team:Uptime) |
Hi Andrew, I'm working on this issue in my local fork too. check.response: Then all I need to do is to update the checkBody function to add logic to check this option. Thanks. |
@xiaofengmanlou definitely go ahead and open a pr. |
it would be nice if we can also improve the body mismatch error as mentioned in this issue by me #18765 |
@shahzad31 |
Resolved in #20746 |
Describe the enhancement:
Today, heartbeat can match bodies using an arbitrary regexp with
check.response.body
, however this only matches positively. Users might want to perform a negative match as mentioned in this well written forum post.One thing that makes this tricky is that
check.response.body
expects a list of strings to match, so extending its syntax is a bit awkward. The best idea I can think of here is to add a new config option,check.response.not_in_body
, but that feels awkward too. I'm curious if others have better naming ideas. There is an alternate proposal in the forum post, but it is not valid YAML.Describe a specific use case for the enhancement or feature:
See the aforementioned forum post, where there are a large number of good values, but one bad value.
The text was updated successfully, but these errors were encountered: