# Logstash: Output: Success or Failure Condition handling and Email trigger

**URL:** <https://discuss.elastic.co/t/logstash-output-success-or-failure-condition-handling-and-email-trigger/114473>\
**Category:** Logstash\
**Created:** [January 8, 2018, 9:05am UTC](https://discuss.elastic.co/t/logstash-output-success-or-failure-condition-handling-and-email-trigger/114473 "2018-01-08T09:05:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiran4Elastic](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@Kiran4Elastic](https://discuss.elastic.co/u/Kiran4Elastic)\
**Post date:** [January 8, 2018, 9:05am UTC](https://discuss.elastic.co/t/logstash-output-success-or-failure-condition-handling-and-email-trigger/114473/1 "2018-01-08T09:05:04Z")

</div>

0  
down vote  
favorite  
Task: Pulling data from SQLServer and Pushing records to Elasticsearch. Achieving this through triggering the logstash cmd after certain upstream conditional triggers finished.

Planning to do this by cmd.exe in c#.net process. Any better way to achieve?

Scenario to handle:

Need to send email if data transfer completed successfully.

Need to send email if unsuccessful and also perform some event. Unsuccessful Condition: Could be anything like server not available/disk full.

Also can we capture the last record transferred to Elasticsearch in the same consecutive request in case of failure and trigger some event?

First two are V important.

Also facing issue when ES stopped "dead ES instance" in logs/command window output, but LS dont stop waits for ES? How to get this out/terminate when no response after say 5 attempts by LS to ES?

---

<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:** [February 5, 2018, 9:05am UTC](https://discuss.elastic.co/t/logstash-output-success-or-failure-condition-handling-and-email-trigger/114473/2 "2018-02-05T09:05:10Z")

</div>

Closed on February 5, 2018, 9:05am UTC

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