I have an instance of Jenkins and Splunk running on my local machine. I am getting basic information from Jenkins into Splunk but I am not getting the log data to show up as is shown in the sample screen shot of the "console". I did a network trace and don't ever see any calls leaving Jenkins that contain log data (archive command is in the post run section). I am running a simple test that just actually does a couple of messages to the Jenkins console.
I've tried a variety of settings here are my current ones.
host=test3
jenkins_config.enabled=false
sourcetype=_json
source=jenkins
index=jenkins_statistics
build_report.index=jenkins
console_log.index=jenkins_console
file.index=jenkins_artifact
To close this out: the issue is that, at this time, Jenkins Pipeline jobs aren't support by the plugin for console logs. Which is a too bad since that's what we are using, but at least I have an answer and did confirm that an alternate job type like freestyle did work.
https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Pipeline+Job+Support
#scripted pipeline
sendSplunkConsoleLog {
node{
sh "echo testjob";
}
}
#declarative pipeline
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
sendSplunkConsoleLog()
}
stages {
stage('Example') {
steps {
echo 'Hello World'
}
}
}
}
I am using Splunk plugin 1.7.1 and still getting the same issue. Is it still not supported in 1.7.1 ?
To close this out: the issue is that, at this time, Jenkins Pipeline jobs aren't support by the plugin for console logs. Which is a too bad since that's what we are using, but at least I have an answer and did confirm that an alternate job type like freestyle did work.
Are you using the 1.0 version of the jenkins plugin? If yes, can you try latest version?
I am using 1.3.1.
is the job a pipeline job? right now the plugin does not support capturing pipeline console log
Yes, that was the issue. Tried a freestyle job and it worked. thank you
Is Jenkins Splunk plugin v1.6.4 works for pipeline jobs? I see the issue still exists.