Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion clusterloader2/testing/list/modules/measurements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Input params
# Valid actions: "start", "gather"
{{$action := .action}}
{{$ENABLE_APISERVER_MEMORY_USAGE_THRESHOLD := DefaultParam .CL2_ENABLE_APISERVER_MEMORY_USAGE_THRESHOLD_MEASUREMENT true}}
{{$APISERVER_MEMORY_THRESHOLD_MEGABYTES := DefaultParam .CL2_APISERVER_MEMORY_THRESHOLD_MEGABYTES 4000}}


steps:
Expand All @@ -17,4 +19,27 @@ steps:
- Identifier: TestMetrics
Method: TestMetrics
Params:
action: {{$action}}
action: {{$action}}
{{if $ENABLE_APISERVER_MEMORY_USAGE_THRESHOLD}}
- Identifier: APIServerMemoryUsage
Method: GenericPrometheusQuery
Params:
action: {{$action}}
metricName: kube-apiserver memory usage
metricVersion: v1
enableViolations: true
unit: MiB
dimensions:
- container
queries:
- name: MaxMemory
query: |
max_over_time(
sum(
container_memory_working_set_bytes{namespace="monitoring", pod=~"kube-apiserver.*"}
/ 1024 / 1024
)[%v:])
threshold: {{$APISERVER_MEMORY_THRESHOLD_MEGABYTES}}
requireSamples: false
lowerBound: false
{{end}}