-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins ver. 2.150.1
Splunk plugin 1.7.1
in pipeline mode, the output of echo commands are not captured by Splunk.
Example job:
node('centos-small') {
sendSplunkConsoleLog {
stage('stage 1') {
echo "toto"
{{ }}}
stage('stage 2') {
sh "echo titi"
{{ }}}
{{ }}}
}
Jenkins console output:
[Pipeline] node
Running on WE1-P1-ALMT-TDF-aes-08dwq in /home/jenkins/workspace/Personal/dupor0/test-splunk
[Pipeline] {
[Pipeline] sendSplunkConsoleLog
[Pipeline] {
[Pipeline] stage
[Pipeline]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (stage 2)
[Pipeline] sh
+ echo titi
titi
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // sendSplunkConsoleLog
[Pipeline] }
[Pipeline] // node
Splunk query:
index=jenkins_console host="jenkins-aes.bpweb.bp.com" source="job/Personal/job/dupor0/job/test-splunk/5/console"|reverse| rename _raw as Event| table _time, Event
Returned by splunk:
_time | Event |
---|---|
2019-02-13 08:01:18.259 | 2019-02-13T08:01:18.259+0000 + echo titi |
2019-02-13 08:01:18.259 | 2019-02-13T08:01:18.259+0000 titi |
The output from Stage 1 is missing. And from what I've noticed, the output from echo commands is never captured.
can you try latest 1.9.2 which can send pipeline jobs without sendSplunkConsoleLog step if global option is checked in configure page