# Logstash Aggregation and IF/Else

**URL:** <https://discuss.elastic.co/t/logstash-aggregation-and-if-else/263777>\
**Category:** Logstash\
**Created:** [February 9, 2021, 4:57pm UTC](https://discuss.elastic.co/t/logstash-aggregation-and-if-else/263777 "2021-02-09T16:57:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![govind94](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@govind94](https://discuss.elastic.co/u/govind94)\
**Post date:** [February 9, 2021, 4:57pm UTC](https://discuss.elastic.co/t/logstash-aggregation-and-if-else/263777/1 "2021-02-09T16:57:00Z")

</div>

I have SOP named GIS which have 3 jobs and getting 3 events

{"jobName":"BIS43683","JobStatus":"COMPLETE","@timestamp":"2020-02-08T23:00:47.958Z","JobSystemStatus":"COMPLETE"}  
{"jobName":"BIS43595","JobStatus":"COMPLETE","@timestamp":"2020-02-08T23:00:47.958Z","JobSystemStatus":"COMPLETE"}  
{"jobName":"TBS20065","JobStatus":"COMPLETE","@timestamp":"2020-02-08T23:00:47.958Z","JobSystemStatus":"COMPLETE"}

I'm looking for output which can compare if all the status are complete then send complete otherwise incomplete

I need Output as follows  
"SOP":"GIS", "Status":"Complete", @timestamp

---

<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:** [March 9, 2021, 4:57pm UTC](https://discuss.elastic.co/t/logstash-aggregation-and-if-else/263777/2 "2021-03-09T16:57:07Z")

</div>

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