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 :
- /builds/v2018/jenkins/jobs/ELK_TEST/builds/lastFailedBuild/log
- /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.