# Filter logs which are after a particular event

**URL:** <https://discuss.elastic.co/t/filter-logs-which-are-after-a-particular-event/281437>\
**Category:** Kibana\
**Created:** [August 14, 2021, 11:12am UTC](https://discuss.elastic.co/t/filter-logs-which-are-after-a-particular-event/281437 "2021-08-14T11:12:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavan\_Kumar\_R](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@Pavan\_Kumar\_R](https://discuss.elastic.co/u/Pavan_Kumar_R)\
**Post date:** [August 14, 2021, 11:12am UTC](https://discuss.elastic.co/t/filter-logs-which-are-after-a-particular-event/281437/1 "2021-08-14T11:12:30Z")

</div>

I have 4 applications each will write "Application started : App1", with application's name at the end. In logstash I used grok filter to extract applications name into a field ' **appName**', I also added tags '_\_event_', '_app\_start_'. So that document can be identified easily with tags along with the 'appName' field.

```auto
grok
{
  id => "App Start Event Filter" add_tag => ["_event", "app_start"] tag_on_failure => []
  match => { "message" => "Application started : %{GREEDYDATA:appName}" }
}

```

In Kibana instead of relative time or absolute time(entered manually), how to use the timestamp from this document for 'from' value in time range?

Is it possible to use a subquery in KQL: eg. timestamp \> (_SUB\_QUERY_)  
Such that the subquery returns timestamp for the record with matching tags and application name.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 11, 2021, 11:13am UTC](https://discuss.elastic.co/t/filter-logs-which-are-after-a-particular-event/281437/2 "2021-09-11T11:13:25Z")

</div>

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