Jenkins ELK Integration without using logstash plugin

I am using file-beat to ship logs from Jenkins job host location by configuring filebeat.yml as follows :

/builds/v2018/jenkins/jobs/ELK_TEST/builds/*/log

The problem is that sometimes i get a source field in Kibana which is either one of the below :

  1. /builds/v2018/jenkins/jobs/ELK_TEST/builds/lastFailedBuild/log
  2. /builds/v2018/jenkins/jobs/ELK_TEST/builds/356/log

As can be seen in first one , there is no Jenkins job build ID . it just contains 'lastFailedBuild' whereas in option 2 , it has Jenkins job build id of 365 . How can I display the jenkins job build ID against every line of log in kibana. I know there is an option in jenkins-logstash plugin where a field is present to display the Jenkins build ID, but I dont want to use logstash plugin as I am using grok filter in my current configuration.

I can see no way of doing this. If the file path does not contain an id where do you expect to get the id from?

Thanks for responding back. I am just trying to find a way to pass the jenkins build-ID. No luck yet.

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