Can heartbeat parse the html response of a URL?

I am trying to parse the html response body of a URL in http monitor type and this is my config:

- type: http
  enabled: true
  id: narvar
  name: Narvar
  urls: ["https://status.narvar.com/"]
  schedule: '@every 10s'
    check.response:
    status: [200]
    body: 'Returns - operational(?=[^>]*class="jsx-5ffa3024fd415850)'

I did this using the HTTP options | Heartbeat Reference [8.8] | Elastic
But this doesn't work.
I am trying to configure a monitor for Returns - operational and if its not operational it should be a down monitor.

I don't see any hits in my kibana dashboard for this url. All the other regular monitors report okay.
Not sure where I am going wrong.

If you need to handle HTML I'd highly recommend Browser monitors.

You can only look for a regexp in the returned HTML with a lightweight check, but that's it. Additionally, it won't execute javascript, which is often required.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.