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

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

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.

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