Skip to content

Commit

Permalink
Fix scraping of queue occupancy
Browse files Browse the repository at this point in the history
Signed-off-by: Leonid Kondrashov <[email protected]>
  • Loading branch information
leokondrashov committed Jul 3, 2023
1 parent 28d1def commit 186db40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/metric/scrape_scales.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def promql_query():
query_unready_pods = 'max(autoscaler_not_ready_pods) by(configuration_name)'
query_pending_pods = 'max(autoscaler_pending_pods) by(configuration_name)'
query_terminating_pods = 'max(autoscaler_terminating_pods) by(configuration_name)'
query_activator_queue = 'max(activator_request_concurrency) by(configuration_name)'
query_activator_queue = 'sum(activator_request_concurrency) by(configuration_name)'

desired_pods_count = {x.split()[0]: int(x.split()[1]) for x in os.popen(get_promql_query(query_desired_pods)()).read().strip().split('\n')}
running_pods_count = {x.split()[0]: int(x.split()[1]) for x in os.popen(get_promql_query(query_running_pods)()).read().strip().split('\n')}
Expand Down

0 comments on commit 186db40

Please sign in to comment.