Monitoring
Statsd reporting
Zuul comes with support for the statsd protocol, when enabled and configured (see below), the Zuul scheduler will emit raw metrics to a statsd receiver which let you in turn generate nice graphics.
Configuration
Statsd support uses the statsd
python module. Note that support
is optional and Zuul will start without the statsd python module
present.
Configuration is in the statsd section of zuul.conf
.
Metrics
These metrics are emitted by the Zuul Scheduler:
- zuul.event.<driver>.<type> (counter)
Zuul will report counters for each type of event it receives from each of its configured drivers.
- zuul.tenant.<tenant>.pipeline
Holds metrics specific to jobs. This hierarchy includes:
- zuul.tenant.<tenant>.pipeline.<pipeline name>
A set of metrics for each pipeline named as defined in the Zuul config.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.all_jobs (counter)
Number of jobs triggered by the pipeline.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.current_changes (gauge)
The number of items currently being processed by this pipeline.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project
This hierarchy holds more specific metrics for each project participating in the pipeline.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>
The canonical hostname for the triggering project. Embedded
.
characters will be translated to_
.- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>
The name of the triggering project. Embedded
/
or.
characters will be translated to_
.- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>
The name of the triggering branch. Embedded
/
or.
characters will be translated to_
.- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>.job
Subtree detailing per-project job statistics:
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>.job.<jobname>
The triggered job name.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>.job.<jobname>.<result> (counter, timer)
A counter for each type of result (e.g.,
SUCCESS
orFAILURE
,ERROR
, etc.) for the job. If the result isSUCCESS
orFAILURE
, Zuul will additionally report the duration of the build as a timer.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>.current_changes (gauge)
The number of items of this project currently being processed by this pipeline.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>.resident_time (timer)
A timer metric reporting how long each item for this project has been in the pipeline.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.project.<canonical_hostname>.<project>.<branch>.total_changes (counter)
The number of changes for this project processed by the pipeline since Zuul started.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.resident_time (timer)
A timer metric reporting how long each item has been in the pipeline.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.total_changes (counter)
The number of changes processed by the pipeline since Zuul started.
- zuul.tenant.<tenant>.pipeline.<pipeline name>.wait_time (timer)
How long each item spent in the pipeline before its first job started.
- zuul.executor.<executor>
Holds metrics emitted by individual executors. The
<executor>
component of the key will be replaced with the hostname of the executor.- zuul.executor.<executor>.merger.<result> (counter)
Incremented to represent the status of a Zuul executor’s merger operations.
<result>
can be eitherSUCCESS
orFAILURE
. A failed merge operation which would be accounted for as aFAILURE
is what ends up being returned by Zuul as aMERGER_FAILURE
.
- zuul.executor.<executor>.builds (counter)
Incremented each time the executor starts a build.
- zuul.executor.<executor>.starting_builds (gauge)
The number of builds starting on this executor. These are builds which have not yet begun their first pre-playbook.
- zuul.executor.<executor>.running_builds (gauge)
The number of builds currently running on this executor. This includes starting builds.
- zuul.executor.<executor>.phase
Subtree detailing per-phase execution statistics:
- zuul.executor.<executor>.phase.<phase>
<phase>
represents a phase in the execution of a job. This can be an internal phase (such assetup
orcleanup
) as well as job phases such aspre
,run
orpost
.- zuul.executor.<executor>.phase.<phase>.<result> (counter)
A counter for each type of result. These results do not, by themselves, determine the status of a build but are indicators of the exit status provided by Ansible for the execution of a particular phase.
Example of possible counters for each phase are:
RESULT_NORMAL
,RESULT_TIMED_OUT
,RESULT_UNREACHABLE
,RESULT_ABORTED
.
- zuul.executor.<executor>.load_average (gauge)
The one-minute load average of this executor, multiplied by 100.
- zuul.executor.<executor>.pct_used_ram (gauge)
The used RAM (excluding buffers and cache) on this executor, as a percentage multiplied by 100.
- zuul.nodepool
Holds metrics related to Zuul requests from Nodepool.
- zuul.nodepool.requested (counter)
Incremented each time a node request is submitted to Nodepool.
- zuul.nodepool.requested.label.<label> (counter)
Incremented each time a request for a specific label is submitted to Nodepool.
- zuul.nodepool.requested.size.<size> (counter)
Incremented each time a request of a specific size is submitted to Nodepool. For example, a request for 3 nodes would use the key
zuul.nodepool.requested.size.3
.
- zuul.nodepool.canceled (counter, timer)
The counter is incremented each time a node request is canceled by Zuul. The timer records the elapsed time from request to cancelation.
- zuul.nodepool.canceled.label.<label> (counter, timer)
The same, for a specific label.
- zuul.nodepool.canceled.size.<size> (counter, timer)
The same, for a specific request size.
- zuul.nodepool.fulfilled (counter, timer)
The counter is incremented each time a node request is fulfilled by Nodepool. The timer records the elapsed time from request to fulfillment.
- zuul.nodepool.fulfilled.label.<label> (counter, timer)
The same, for a specific label.
- zuul.nodepool.fulfilled.size.<size> (counter, timer)
The same, for a specific request size.
- zuul.nodepool.failed (counter, timer)
The counter is incremented each time Nodepool fails to fulfill a node request. The timer records the elapsed time from request to failure.
- zuul.nodepool.failed.label.<label> (counter, timer)
The same, for a specific label.
- zuul.nodepool.failed.size.<size> (counter, timer)
The same, for a specific request size.
- zuul.nodepool.current_requests (gauge)
The number of outstanding nodepool requests from Zuul.
- zuul.mergers
Holds metrics related to Zuul mergers.
- zuul.mergers.online (gauge)
The number of Zuul merger processes online.
- zuul.mergers.jobs_running (gauge)
The number of merge jobs running.
- zuul.mergers.jobs_queued (gauge)
The number of merge jobs queued.
- zuul.executors
Holds metrics related to Zuul executors.
- zuul.executors.online (gauge)
The number of Zuul executor processes online.
- zuul.executors.accepting (gauge)
The number of Zuul executor processes accepting new jobs.
- zuul.executors.jobs_running (gauge)
The number of executor jobs running.
- zuul.executors.jobs_queued (gauge)
The number of executor jobs queued.
As an example, given a job named myjob in mytenant triggered by a change to myproject on the master branch in the gate pipeline which took 40 seconds to build, the Zuul scheduler will emit the following statsd events:
zuul.tenant.mytenant.pipeline.gate.project.example_com.myproject.master.job.myjob.SUCCESS
+1
zuul.tenant.mytenant.pipeline.gate.project.example_com.myproject.master.job.myjob.SUCCESS
40 seconds
zuul.tenant.mytenant.pipeline.gate.all_jobs
+1