HTML body parse? #842
rgraham7503
started this conversation in
General
Replies: 1 comment 3 replies
-
You can define an alert's query which uses regex: https://monika.hyperjump.tech/guides/alerts
There was also a discussion about this here #649 (comment) I think we need to put more example how to use regex in the alert. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I have a messy HTML body response from a page I want to monitor. Its not json. I can get what I need by using curl and grep and cut etc. Is there a way to parse non json body responses and alert if not a match? like parse out component-id and the status and if the status is NOT "operational" then alert? or can we do regex?
Example:
<html>
<head>
<title>bla</title>
</head>
<body>
<p>bunch of content</p>
<div data-component-id="xxxxxxx" class="component-inner-container status-green " data-component-status="operational" data-js-hook="">
<span class="name">
test alert
</span>
</div>
</body>
</html>
Beta Was this translation helpful? Give feedback.
All reactions