Use the metrics API to query Java Management Extension (JMX) metrics related to Puppet Server and the orchestrator service.
There are many metrics available. For example, the
"depoy-queue.length" metric reports how many nodes are waiting in queue to
execute a deployment due to the
global-concurrent-compiles setting, and the
"task-queue.length" metric reports how many nodes are waiting in queue to
execute a task due to the
task-concurrency setting. The
"jobs-created" metric expresses how many jobs were
created in the current instance, and the
"puppet-run-time" metric describes a trailing five-minute average of how
long it takes a Puppet run to complete (only for Puppet runs triggered by the orchestrator).