I'm using the Logstash plugin to log the details of each build. I'd like to know which node produced each log entry.
The source code seems to
capture that info.
I've tried a
logstashSend step and a
logstash block but the build label is always logged as master. No other field records the node either.
E.g., with a few linux nodes with the label 'aws', I've tried:
node('aws') {
sh'''
echo 'Hello, world!'
'''
logstashSend failBuild: true, maxLines: 1000
}And
logstash {
node('aws') {
sh'''
echo 'Hello, World!'
'''
}
}
But the data sent to logstash is:
...
"_source": {
"data": {
"buildHost": "Jenkins",
"buildLabel": "master",
...
Am I missing something? Could anyone help me figure out how to log the node label?
Thanks,
-Mark