Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56118

Splunk plugin not sending all console to Splunk

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: splunk-devops-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.150.1
      Splunk plugin 1.7.1
    • Similar Issues:

      Description

      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]

      { (stage 1) [Pipeline] echo toto [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.

        Attachments

          Activity

          Hide
          fengxx Ted Xiao added a comment -

          can you try latest 1.9.2 which can send pipeline jobs without sendSplunkConsoleLog step if global option is checked in configure page

          Show
          fengxx Ted Xiao added a comment - can you try latest 1.9.2 which can send pipeline jobs without sendSplunkConsoleLog step if global option is checked in configure page

            People

            Assignee:
            fengxx Ted Xiao
            Reporter:
            romaindup Romain Dupont
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: