zuerisee
(Radio Zürisee)
December 16, 2019, 8:40am
1
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",
"date":"2019-12-11T14:02:50"
}
The docs don't mention anything like this.
I'm using Heartbeat 6.8 with Elasticsearch 6.8.
Thank you for your help.
jsoriano
(Jaime Soriano)
December 16, 2019, 12:32pm
2
Hey @zuerisee and welcome
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: https://github.com/elastic/beats/issues/13982
Would that work as a fix here?
1 Like
zuerisee
(Radio Zürisee)
December 16, 2019, 3:53pm
4
@jsoriano
Thank you very much for the explanation and the warm welcome.
@Andrew_Cholakian1
That would be a great feature to have! Do you have any estimate on a release date? Looking very much forward to it.
system
(system)
Closed
January 13, 2020, 3:53pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.