mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Add operation label to user metric and move from manager to api
This adds an "operation" label to the user metrics and moves incrementing from the manager to api, so that the user metrics show when resources are allocated, as well as destroyed. Previously, user metrics were only updated upon destroying a resource. I think its better suited to increment the metric as part of the api instead of the pool_manger, because it's expected to do so when a user successfully checks out or deletes a VM, but can be problematic when doing so in the provider since it can clone VMs before actually being checked out by a user.
This commit is contained in:
parent
3b6073933e
commit
c06cfc28f7
6 changed files with 80 additions and 322 deletions
|
|
@ -532,13 +532,13 @@
|
|||
#
|
||||
# - usage_stats
|
||||
# Enable shipping of VM usage stats
|
||||
# When enabled a metric is emitted when a machine is destroyed. Tags are inspected and used to organize
|
||||
# When enabled a metric is emitted when a user requested to allocate and destroy a VM. Tags are inspected and used to organize
|
||||
# shipped metrics if there is a jenkins_build_url tag set for the VM.
|
||||
# Without the jenkins_build_url tag set the metric will be sent as "usage.$user.$pool_name".
|
||||
# Without the jenkins_build_url tag set the metric will be sent as "usage.$user.$operation.$pool_name".
|
||||
# When the jenkins_build_url tag is set the metric will be sent with additional data. Here is an example
|
||||
# based off of the following URL, and requested by the user ABS;
|
||||
# https://jenkins.example.com/job/platform_puppet-agent-extra_puppet-agent-integration-suite_pr/RMM_COMPONENT_TO_TEST_NAME=puppet,SLAVE_LABEL=beaker,TEST_TARGET=redhat7-64a/824/
|
||||
# "usage.$user.$instance.$value_stream.$branch.$project.$job_name.$component_to_test.$pool_name", which translates to
|
||||
# "usage.$user.$instance.$value_stream.$branch.$project.$job_name.$component_to_test.$operation.$pool_name", which translates to
|
||||
# "usage.$user.jenkins_example_com.platform.pr.puppet-agent-extra.puppet-agent-integration-suite.puppet.$pool_name"
|
||||
# Expects a boolean value
|
||||
# (optional; default: false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue