Logstash filter2


(rattisyam) #1

please help me to create a filer conf file with pattern to below XML log.
I am looking for the fileds "result","duration" and timestamp".

<?xml version='1.0' encoding='UTF-8'?>

</hudson.plugins.git.Branch>



10
</hudson.plugins.git.util.Build>






<hudson.model.CauseAction>


<hudson.model.Cause_-UserIdCause>
rattisyam
</hudson.model.Cause_-UserIdCause>
1


</hudson.model.CauseAction>
<jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.10">
10
</jenkins.metrics.impl.TimeInQueueAction>
<hudson.plugins.git.util.BuildData plugin="git@3.6.4">


refs/remotes/origin/master
<hudson.plugins.git.util.Build>

0eae8a5c898e67eab676b5e95983ac11a20e7534

<hudson.plugins.git.Branch>

refs/remotes/origin/master

    <string>https://github.com/rattisyam/maven-project.git</string>
  </remoteUrls>
</hudson.plugins.git.util.BuildData>
<hudson.plugins.git.GitTagAction plugin="git@3.6.4">
  <tags class="hudson.util.CopyOnWriteMap$Tree">
    <entry>
      <string>refs/remotes/origin/master</string>
      <list/>
    </entry>
  </tags>
  <ws>/var/lib/jenkins/workspace/PackageJob</ws>
</hudson.plugins.git.GitTagAction>
<hudson.scm.SCMRevisionState_-None/>
46 1517468093768 1517468093768 SUCCESS 138191 UTF-8 false /var/lib/jenkins/workspace/PackageJob 2.73.3 false

Thank you.

Regards,
Syam


(rattisyam) #2
<?xml version='1.0' encoding='UTF-8'?>

</hudson.plugins.git.Branch>



10
</hudson.plugins.git.util.Build>






<hudson.model.CauseAction>


<hudson.model.Cause_-UserIdCause>
rattisyam
</hudson.model.Cause_-UserIdCause>
1


</hudson.model.CauseAction>
<jenkins.metrics.impl.TimeInQueueAction plugin="metrics@3.1.2.10">
10
</jenkins.metrics.impl.TimeInQueueAction>
<hudson.plugins.git.util.BuildData plugin="git@3.6.4">


refs/remotes/origin/master
<hudson.plugins.git.util.Build>

0eae8a5c898e67eab676b5e95983ac11a20e7534

<hudson.plugins.git.Branch>

refs/remotes/origin/master

    <string>https://github.com/rattisyam/maven-project.git</string>
  </remoteUrls>
</hudson.plugins.git.util.BuildData>
<hudson.plugins.git.GitTagAction plugin="git@3.6.4">
  <tags class="hudson.util.CopyOnWriteMap$Tree">
    <entry>
      <string>refs/remotes/origin/master</string>
      <list/>
    </entry>
  </tags>
  <ws>/var/lib/jenkins/workspace/PackageJob</ws>
</hudson.plugins.git.GitTagAction>
<hudson.scm.SCMRevisionState_-None/>
46 1517468093768 1517468093768 SUCCESS 138191 UTF-8 false /var/lib/jenkins/workspace/PackageJob 2.73.3 false

(Magnus B├Ąck) #3

If you don't want your XML to get mangled you'll have to format it as preformatted text, e.g. using the </> toolbar button.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.