mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-177) Filter hostname from API Paths
Use the example provided in the Ruby Client to provide a customised collector appropriate to log all calls to the API. The customised filtering is used to replace individual node names and templates for the /vm and request ID's for the /ondemand endpoints. This module was failing our rubocop checks so have updated it since it now forms part of vmpooler. Separate trapping for litmus jobs is also included so that they don't interfere with stats from the jenkins pipelines.
This commit is contained in:
parent
b6dcd77228
commit
cb955a1bed
7 changed files with 277 additions and 6 deletions
|
|
@ -496,7 +496,12 @@ module Vmpooler
|
|||
|
||||
return unless jenkins_build_url
|
||||
|
||||
# TBD - Add Filter for Litmus here as well - to ignore for the moment.
|
||||
if jenkins_build_url.include? 'litmus'
|
||||
# Very simple filter for Litmus jobs - just count them coming through for the moment.
|
||||
$metrics.increment("usage_litmus.#{user}.#{poolname}")
|
||||
return
|
||||
end
|
||||
|
||||
url_parts = jenkins_build_url.split('/')[2..-1]
|
||||
jenkins_instance = url_parts[0].gsub('.', '_')
|
||||
value_stream_parts = url_parts[2].split('_')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue