All Apps and Add-ons

Splunk App for Jenkins: Why is Jenkins log data not being sent to Splunk?

mlkrienke
Explorer

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
0 Karma
1 Solution

mlkrienke
Explorer

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.

View solution in original post

0 Karma

txiao_splunk
Splunk Employee
Splunk Employee

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'
            }
        }
    }
}
0 Karma

sshahsp
New Member

I am using Splunk plugin 1.7.1 and still getting the same issue. Is it still not supported in 1.7.1 ?

0 Karma

mlkrienke
Explorer

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.

0 Karma

txiao_splunk
Splunk Employee
Splunk Employee

Are you using the 1.0 version of the jenkins plugin? If yes, can you try latest version?

0 Karma

mlkrienke
Explorer

I am using 1.3.1.

0 Karma

txiao_splunk
Splunk Employee
Splunk Employee

is the job a pipeline job? right now the plugin does not support capturing pipeline console log

mlkrienke
Explorer

Yes, that was the issue. Tried a freestyle job and it worked. thank you

0 Karma

saireddy1
New Member

Is Jenkins Splunk plugin v1.6.4 works for pipeline jobs? I see the issue still exists.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...