Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Update mappings to support using message.keyword field. 
    To do so on the Elasticsearch (ES) node run the following curl command included in the attached file:
    jenkins_elasticsearch_mappings.txt
  2. Add the following parameter to the elasticsearch.yml config file:
    script.painless.regex.enabled: true
  3. Restart ES

  4. In Kibana create the index patter "logstash-jenkins". Set the timestamp field to "@buildTimestamp"
  5. For that index pattern navigate to the scripted fields tab. Create a scripted field named "healthcheck". Language is painless. Type is string. Script is as follows:
    def msg = doc['message.keyword'].value;
    if (doc['message.keyword'].value != null) {
    if (doc['message.keyword'].value =~ /Health Check/) {
    if (doc['message.keyword'].value =~ /PASS/) {
    return "PASS";
    }
    else {
    return "FAIL";
    }
    }
    }
  6. Create another scripted field named "component". Language is painless. Type is string. Script is as follows:
    def msg = doc['message.keyword'].value;
    if (doc['message.keyword'].value != null) {
    if (doc['message.keyword'].value =~ /Health Check/) {
    if (doc['message.keyword'].value =~ /PASS/) {
    return "PASS";
    }
    else {
    return "FAIL";
    }
    }
    }
  7. Import the following visualizations to Kibana:
    jenkins cd visualizations.json

  8. Import the following dashboard to Kibana:
    jenkins cd dashboard.json