Skip to content
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

Request to add a string matching functionality to the HTTP check #490

Open
ChielWdvb opened this issue Aug 14, 2023 · 2 comments
Open

Request to add a string matching functionality to the HTTP check #490

ChielWdvb opened this issue Aug 14, 2023 · 2 comments

Comments

@ChielWdvb
Copy link

ChielWdvb commented Aug 14, 2023

Request to add a string matching functionality to the HTTP check: when the page is loaded with a 200 response, the page is checked for the presence of a given string. If the string is found the check is completed succesfully.
The reason for this request is that when our application is functionally down, the domain will still be available and serve up a 200 OK response while showing a fallback error page instead of the correct page. The string matching functionality would allow us to verify that the correct page is shown.
Various other synthetic monitoring applications offer this functionality and I to believe it to be fairly standard for this type of application.

@MaxDiOrio
Copy link

That exists under the Validation section of the check config. Regex Validation.

"Check fails if response body matches", use regex pattern match, then select Invert match to make it Successful if the pattern is found.

@ChielWdvb
Copy link
Author

Hi, thank you for your reply. I was given the same tip on the Grafana community site, but i've been unable to get it to work as expected. Do you have an example of a correct & working regex that checks for the presence of the string "Login" on a page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants