# Logstash Jenkins plugin - Do I need to set logstashSend failBuild to false to avoid failing entire build?

**URL:** <https://discuss.elastic.co/t/logstash-jenkins-plugin-do-i-need-to-set-logstashsend-failbuild-to-false-to-avoid-failing-entire-build/171210>\
**Category:** Logstash\
**Created:** [March 6, 2019, 10:22pm UTC](https://discuss.elastic.co/t/logstash-jenkins-plugin-do-i-need-to-set-logstashsend-failbuild-to-false-to-avoid-failing-entire-build/171210 "2019-03-06T22:22:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ps895r](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@ps895r](https://discuss.elastic.co/u/ps895r)\
**Post date:** [March 6, 2019, 10:22pm UTC](https://discuss.elastic.co/t/logstash-jenkins-plugin-do-i-need-to-set-logstashsend-failbuild-to-false-to-avoid-failing-entire-build/171210/1 "2019-03-06T22:22:38Z")

</div>

Hi everyone,

I have this line in a shared library that's used by Jenkins.

logstashSend failBuild: true, maxLines: 1000

My current understanding is this will fail the build if ELK crashes or this line doesn't work. Please let me know if wrong there.

My question is if I want the job to continue normally whether or not logstashSend fails or not, do I just need to send this to false? Will setting this to false cause other issues or do I need to do something more involved like throwing this into a try block?

Here is my current section of code:

post('Post-build steps') {  
always {  
script {  
currentBuild.result = currentBuild.result == null ? "SUCCESS" : currentBuild.result  
}  
logstashSend failBuild: true, maxLines: 1000  
}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 6, 2019, 10:27pm UTC](https://discuss.elastic.co/t/logstash-jenkins-plugin-do-i-need-to-set-logstashsend-failbuild-to-false-to-avoid-failing-entire-build/171210/2 "2019-03-06T22:27:12Z")

</div>

That's not really a logstash question. It's a Jenkins question. But I think the answer is yes, if you set it to false then the build will not be failed just because logstashSend fails.

---

<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:** [April 3, 2019, 10:27pm UTC](https://discuss.elastic.co/t/logstash-jenkins-plugin-do-i-need-to-set-logstashsend-failbuild-to-false-to-avoid-failing-entire-build/171210/3 "2019-04-03T22:27:20Z")

</div>

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