Configure Heartbeat to check date in JSON response body

Hello everybody,

I was wondering if it's possible to use Heartbeat to parse and check a date within a JSON response body against the current date.

In this case I'd like to check if date is older than 2 weeks.

    "text":"Lorem ipsum dolor",

The docs don't mention anything like this.

I'm using Heartbeat 6.8 with Elasticsearch 6.8.

Thank you for your help.

Hey @zuerisee and welcome :slight_smile:

It is possible to add checks on JSON objects, but at the moment I am afraid that there is no condition that can be used for expressions with dates or numbers.

It'd be great if you could open a new enhancement request with your use case, thanks!

We have an open issue to let users use Javascript to script advance checks like these already:

Would that work as a fix here?

1 Like

Thank you very much for the explanation and the warm welcome.

That would be a great feature to have! Do you have any estimate on a release date? Looking very much forward to it.

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