What is the schema of the data collected by CloudBees Jenkins Analytics for builds

Issue

CloudBees Jenkins Analytics stores build records in Elasticsearch, what is the structure of the data?

Environment

CloudBees Jenkins Operations Center

Resolution, schema of the CloudBees Jenkins Analytics data structure for builds

WARNING: data schema subject to change or replacement in the future.

When CloudBees Jenkins Analytics is enable on Operations Center, the records of the builds are stored in the Elasticsearch server used by CloudBees Jenkins Analytics.

CloudBees Jenkins Analytics stores the build records in Elasticsearch indices named builds-${yyyyMMdd} where ${yyyyMMdd} is the date (e.g. builds-20160824).

Creating one Elasticsearch index per day is used to managed the retention period: Elasticsearch indices beyond the retention period are deleted by a background task.

The schema of the build record indices is the following:

{
  "type":"run", # string, type of the document, "run" of a build. Same as the elasticsearch metadata field "_type"
  "monitoringId":"ZmU2...798", # CloudBees Jenkins Analytics internal field
  "class":"org.jenkinsci.plugins.workflow.job.WorkflowRun", # string, class name of the recorded event
  "classSimpleName":"WorkflowRun", # string, short class name of the recorded event
  "startTimeInMillis":1472063400881, # long, epoch start time of the build run in
  "duration":187390, # long, duration of the build in millis
  "number":2798, # integer, build number
  "displayName":"#2798", # string, build display name
  "fullDisplayName":"CJP » CJP-4551 » maven #2798", # string, build full display name (includes the job full display name)
  "description":null, # string description of the Jenkins build record, optional field that can be entered by Jenkins users after the run.
  "url":"job/CJP/job/CJP-4551/job/maven/2798/", # string, root relative URL of the run
  "parent":{
     "type":"item", # string, type of the parent job
     "class":"org.jenkinsci.plugins.workflow.job.WorkflowJob", # string class name of the parent job
     "classSimpleName":"WorkflowJob", # string, simple class name of the parent job
     "fullName":"CJP/CJP-4551/maven", # string parent job full name
     "fullDisplayName":"CJP » CJP-4551 » maven",
     "url":"job/CJP/job/CJP-4551/job/maven/", # string, root relative URL of the parent job
     "description":"", # string, description field of the job
     "monitoringId":"ZmU...gwY2", # CloudBees Jenkins Analytics internal field
     "createdDate":1465140893907, # long, epoch creation date time of the parent job
     "scm":{ # Type of the SCM configured in this job
        "type":"hudson.plugins.git.GitSCM",
        "classSimpleName":"GitSCM"
     }
  },
  "jenkins.metrics.impl.TimeInQueueAction":{
     "queuingDurationMillis":93, # long, duration in millis spent in queue waiting for the build to start on a build agent
     "totalDurationMillis":187483, # long, total duration of the job in millis, including the duration waiting in the Jenkins queue
     "buildingDurationMillis":187390, # long, duration of the build in millis
  },
  "result":{
     "completed":true, # boolean, indicates if the job as completed of was aborted before the end
     "name":"SUCCESS" # string result of the build "SUCCESS" (the build has no errors), "UNSTABLE" (the build has some errors but they were not fatal), "FAILURE" (the build had a fatal error), "NOT_BUILT" (the module was not built, applies to multi-stage build like maven), "ABORTED" (the job was manually aborted)
  },
  "nodeReferences":[ # nodes used during the run
     {
        "timestamp":1472063401788, # long, epoch start time of the usage of the node for building
        "nodeName":"shared-agent-1.unicorn.beescloud.com", # name of the node
        "effectiveLabelAtoms":"shared-agent-1.unicorn.beescloud.com" # the label(s) used to select the node
     }
  ],
  "masterId":"D83F61...6EB04877F", # ID of the Jenkins server on which the job is defined
  "masterName":"master-1.unicorn.beescloud.com", # string, name of the master on which the job is defined
  "masterName_analyzed":"master-1.unicorn.beescloud.com", # version of the "masterName" field analysed for full text search
  "@timestamp":"2016-08-24T18:30:00.881+0000"
}
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.