Trying to apply filter on time-difference scripted field


(Shubham Mahajan) #1

Continuing the discussion from Elasticsearch giving warning for painless script:

time-diff: new Date().getTime() - doc['@timestamp'].value.getMillis()

@rjernst hey Ryan, I need some urgent help regarding this functioning. Using above scripted field I am displaying hosts with their last communication time.

But now i just want to display the hosts with time difference greater than, let's say, 7 days only.
Is there any way to compare the time-diff scripted field and only display those hosts that have not sent events for few days, in this case.

Really appreciate your help!!


(Shubham Mahajan) #2

@rjernst Hey Ryan, is there any solution to this problem??


(system) #3

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