title: Setup a Kibana dashboard for data about last Jenkins build
body: <p>I use Kibana to show data about automated test cases stored in a single elastic search index.</p>
  <p>These tests can be repeated multiple times during the day and right now are identified by a build number that comes from Jenkins. So, if I want to see the latest results, I need to add a filter in my dashboards where I set the last known value of the build number.</p>
  <p>Is there a way to automatically show in a dashboard the values about the last build?</p>
  <p>Thank you.</p>
  <p>EDIT: Here's a data sample:</p>
  <pre><code>{
    &quot;_index&quot;: &quot;data&quot;,
    &quot;_type&quot;: &quot;_doc&quot;,
    &quot;_id&quot;: &quot;33rugH0B0CwJH7IcV11v&quot;,
    &quot;_score&quot;: 1,
    &quot;_source&quot;: {
      &quot;market&quot;: &quot;FRA&quot;,
      &quot;price_code&quot;: &quot;DIS22FREH1003&quot;,
      &quot;test_case_id&quot;: &quot;NPM_14&quot;,
      &quot;environment&quot;: &quot;PROD&quot;,
      &quot;cruise_id&quot;: &quot;DI20220707CPVCP1&quot;,
      &quot;jenkins_job_name&quot;: &quot;MonitoringNPM_14&quot;,
      &quot;@timestamp&quot;: &quot;2021-12-03T16:34:03.360+0100&quot;,
      &quot;jenkins_job_number&quot;: 8,
      &quot;agency&quot;: &quot;FR900000&quot;,
      &quot;fail_code&quot;: &quot;IncorrectGuarantee&quot;,
      &quot;build_number&quot;: 8,
      &quot;category&quot;: &quot;IR2&quot;
    },
    &quot;fields&quot;: {
      &quot;environment.keyword&quot;: [
        &quot;PROD&quot;
      ],
      &quot;test_case_id&quot;: [
        &quot;NPM_14&quot;
      ],
      &quot;category.keyword&quot;: [
        &quot;IR2&quot;
      ],
      &quot;price_code&quot;: [
        &quot;DIS22FREH1003&quot;
      ],
      &quot;cruise_id&quot;: [
        &quot;DI20220707CPVCP1&quot;
      ],
      &quot;price_code.keyword&quot;: [
        &quot;DIS22FREH1003&quot;
      ],
      &quot;agency&quot;: [
        &quot;FR900000&quot;
      ],
      &quot;jenkins_job_number&quot;: [
        &quot;8&quot;
      ],
      &quot;agency.keyword&quot;: [
        &quot;FR900000&quot;
      ],
      &quot;jenkins_job_number.keyword&quot;: [
        &quot;8&quot;
      ],
      &quot;market&quot;: [
        &quot;FRA&quot;
      ],
      &quot;jenkins_job_name.keyword&quot;: [
        &quot;MonitoringNPM_14&quot;
      ],
      &quot;test_case_id.keyword&quot;: [
        &quot;NPM_14&quot;
      ],
      &quot;environment&quot;: [
        &quot;PROD&quot;
      ],
      &quot;@timestamp&quot;: [
        &quot;2021-12-03T15:34:03.360Z&quot;
      ],
      &quot;jenkins_job_name&quot;: [
        &quot;MonitoringNPM_14&quot;
      ],
      &quot;fail_code.keyword&quot;: [
        &quot;IncorrectGuarantee&quot;
      ],
      &quot;fail_code&quot;: [
        &quot;IncorrectGuarantee&quot;
      ],
      &quot;build_number&quot;: [
        8
      ],
      &quot;market.keyword&quot;: [
        &quot;FRA&quot;
      ],
      &quot;cruise_id.keyword&quot;: [
        &quot;DI20220707CPVCP1&quot;
      ],
      &quot;category&quot;: [
        &quot;IR2&quot;
      ]
    }
  }
  </code></pre>