Skip to content

Commit

Permalink
Refactor Cilium measurements queries
Browse files Browse the repository at this point in the history
  • Loading branch information
mushiboy committed Jan 5, 2025
1 parent fef9aad commit 8ef35be
Showing 1 changed file with 40 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,20 @@ steps:
query: quantile(0.5, avg_over_time(cilium_operator_process_resident_memory_bytes[%v:]) / 1024 / 1024)

# Cilium API Rate Limiter
- Identifier: CiliumAPIRateLimiterProcessedRequestsCount

- Identifier: CiliumAPIRateLimiterProcessedRequests
Method: GenericPrometheusQuery
Params:
action: {{$action}}
metricName: Cilium API Rate Limiter Processed Requests Count
metricName: Cilium API Rate Limiter Processed Requests
metricVersion: v1
unit: requests/second
enableViolations: true
queries:
- name: Total
query: sum(rate(cilium_api_limiter_processed_requests_total[%v:]))
query: sum(cilium_api_limiter_processed_requests_count)
- name: Rate
query: sum(rate(cilium_api_limiter_processed_requests_count[%v:]))


- Identifier: CiliumAPIRateLimiterProcessingDuration
Expand All @@ -175,14 +178,11 @@ steps:
unit: s
enableViolations: true
queries:
- name: Perc99
query: histogram_quantile(0.99, sum(rate(cilium_api_limiter_processing_duration_seconds_bucket[%v:])) by (le))
- name: Perc95
query: histogram_quantile(0.95, sum(rate(cilium_api_limiter_processing_duration_seconds_bucket[%v:])) by (le))
- name: Perc50
query: histogram_quantile(0.50, sum(rate(cilium_api_limiter_processing_duration_seconds_bucket[%v:])) by (le))
- name: Avg
query: avg(rate(cilium_api_limiter_processing_duration_seconds_sum[%v:])) / avg(rate(cilium_api_limiter_processing_duration_seconds_count[%v:]))
query: avg(sum_over_time(cilium_api_limiter_processing_duration_seconds[0][%v]))
- name: Max
query: max_over_time(max(cilium_api_limiter_processing_duration_seconds[0])[%v])


- Identifier: CiliumAPIRateLimiterRequestsInFlight
Method: GenericPrometheusQuery
Expand All @@ -196,14 +196,15 @@ steps:
- name: Instantaneous
query: sum(cilium_api_limiter_requests_in_flight)
- name: MaxOverTimeSum
query: max_over_time(sum(cilium_api_limiter_requests_in_flight)[%v:])
query: max_over_time(cilium_api_limiter_requests_in_flight[0][%v:])
- name: AvgOverTimeSum
query: avg_over_time(sum(cilium_api_limiter_requests_in_flight)[%v:])
query: avg_over_time(cilium_api_limiter_requests_in_flight[0][%v:])
- name: SumOverTime
query: sum_over_time(sum(cilium_api_limiter_requests_in_flight)[%v:])
query: sum_over_time(cilium_api_limiter_requests_in_flight[0][%v:])
- name: MinOverTimeSum
query: min_over_time(sum(cilium_api_limiter_requests_in_flight)[%v:])

query: min_over_time(cilium_api_limiter_requests_in_flight[0][%v:])


- Identifier: CiliumAPIRateLimiterWaitDuration
Method: GenericPrometheusQuery
Params:
Expand All @@ -213,14 +214,30 @@ steps:
unit: s
enableViolations: true
queries:
- name: Perc99
query: histogram_quantile(0.99, sum(rate(cilium_api_limiter_wait_duration_seconds_bucket[%v:])) by (le))
- name: Perc95
query: histogram_quantile(0.95, sum(rate(cilium_api_limiter_wait_duration_seconds_bucket[%v:])) by (le))
- name: Perc50
query: histogram_quantile(0.50, sum(rate(cilium_api_limiter_wait_duration_seconds_bucket[%v:])) by (le))
- name: Avg
query: avg(rate(cilium_api_limiter_wait_duration_seconds_sum[%v:])) / avg(rate(cilium_api_limiter_wait_duration_seconds_count[%v:]))
query: avg(cilium_api_limiter_wait_duration_seconds{value="mean", api_call="endpoint-create"}[%v])
- name: Max
query: max_over_time(cilium_api_limiter_wait_duration_seconds{value="max", api_call="endpoint-create"}[%v])
- name: Min
query: min_over_time(cilium_api_limiter_wait_duration_seconds{value="min", api_call="endpoint-create"}[%v])


- Identifier: CiliumAPIRateLimiterRateLimit
Method: GenericPrometheusQuery
Params:
action: {{$action}}
metricName: Cilium API Rate Limiter Rate Limit
metricVersion: v1
unit: count
enableViolations: true
queries:
- name: Avg
query: avg(avg_over_time(cilium_api_limiter_rate_limit{value="limit", api_call="endpoint-create"}[%v]))
- name: Max
query: max_over_time(cilium_api_limiter_rate_limit{value="limit", api_call="endpoint-create"}[%v])
- name: Min
query: min_over_time(cilium_api_limiter_rate_limit{value="limit", api_call="endpoint-create"}[%v])


- Identifier: CiliumAgentAPIProcessTime
Method: GenericPrometheusQuery
Expand All @@ -238,4 +255,4 @@ steps:
- name: Perc50
query: histogram_quantile(0.50, sum(rate(cilium_agent_api_process_time_seconds_bucket[%v:])) by (le))
- name: Avg
query: avg(rate(cilium_agent_api_process_time_seconds_sum[%v:])) / avg(rate(cilium_agent_api_process_time_seconds_count[%v:]))
query: avg(rate(cilium_agent_api_process_time_seconds_sum[%v:])) / avg(rate(cilium_agent_api_process_time_seconds_count[%v:]))

0 comments on commit 8ef35be

Please sign in to comment.