Skip to content

Commit

Permalink
Update kube-apiserver metric expressions
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
  • Loading branch information
rsevilla87 committed Mar 31, 2023
1 parent 93be345 commit ed0c7cf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions workloads/kube-burner-ocp-wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This wrapper supports some variables to tweak some basic parameters of the workl
- **ES_INDEX**: Defines the ElasticSearch/OpenSearch index name. By default `ripsaw-kube-burner`
- **QPS** and **BURST**: Defines client-go QPS and BURST parameters for kube-burner. 20 by default
- **GC**: Garbage collect created namespaces. true by default
- **EXTRA_FLAGS**: Extra flags that will be appended to the underlying kube-burner ocp command, by default empty.

### Cluster-density and cluster-density-v2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
- query: irate(apiserver_request_total{namespace=~".+{{.HCP_NAMESPACE}}", verb="POST", resource="pods", subresource="binding",code="201"}[2m]) > 0
metricName: schedulingThroughput

- query: histogram_quantile(0.99, sum(irate(apiserver_request_duration_seconds_bucket{namespace=~".+{{.HCP_NAMESPACE}}", apiserver="kube-apiserver", verb=~"LIST|GET", subresource!~"log|exec|portforward|attach|proxy"}[2m])) by (le, resource, verb, scope)) > 0
- query: histogram_quantile(0.99, sum(irate(apiserver_request_duration_seconds_bucket{namespace=~".+{{.HCP_NAMESPACE}}", job="kube-apiserver", verb=~"LIST|GET", subresource!~"log|exec|portforward|attach|proxy"}[2m])) by (le, resource, verb, scope)) > 0
metricName: readOnlyAPICallsLatency

- query: histogram_quantile(0.99, sum(irate(apiserver_request_duration_seconds_bucket{namespace=~".+{{.HCP_NAMESPACE}}", apiserver="kube-apiserver", verb=~"POST|PUT|DELETE|PATCH", subresource!~"log|exec|portforward|attach|proxy"}[2m])) by (le, resource, verb, scope)) > 0
- query: histogram_quantile(0.99, sum(irate(apiserver_request_duration_seconds_bucket{namespace=~".+{{.HCP_NAMESPACE}}", job="kube-apiserver", verb=~"POST|PUT|DELETE|PATCH", subresource!~"log|exec|portforward|attach|proxy"}[2m])) by (le, resource, verb, scope)) > 0
metricName: mutatingAPICallsLatency

- query: sum(irate(apiserver_request_total{namespace=~".+{{.HCP_NAMESPACE}}", job="kube-apiserver",verb!="WATCH"}[2m])) by (verb,resource,instance) > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- query: (sum(irate(container_cpu_usage_seconds_total{name!="",container!="POD",namespace=~".+{{.HCP_NAMESPACE}}"}[2m]) * 100) by (container, pod, namespace, node)) > 0
metricName: mgmt-containerCPU

- query: sum(container_memory_rss{container!="POD",namespace=~".+{{.HCP_NAMESPACE}}"}) by (container, pod, namespace, node)
- query: sum(container_memory_rss{name!="",container!="POD",namespace=~".+{{.HCP_NAMESPACE}}"}) by (container, pod, namespace, node)
metricName: mgmt-containerMemory

# Management Node metrics: CPU & Memory
Expand Down
2 changes: 1 addition & 1 deletion workloads/kube-burner-ocp-wrapper/obo-route.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: hypershift-monitoring-stack
app.kubernetes.io/instance: hypershift-monitoring-stack
name: prometheus-hypershift-monitoring-stack
namespace: openshift-observability-operator
spec:
Expand Down
4 changes: 3 additions & 1 deletion workloads/kube-burner-ocp-wrapper/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ set -e

ES_SERVER=${ES_SERVER:-https://search-perfscale-dev-chmf5l4sh66lvxbnadi4bznl3a.us-west-2.es.amazonaws.com}
LOG_LEVEL=${LOG_LEVEL:-info}
KUBE_BURNER_VERSION=${KUBE_BURNER_VERSION:-1.4.3}
KUBE_BURNER_VERSION=${KUBE_BURNER_VERSION:-1.4.4}
CHURN=${CHURN:-true}
WORKLOAD=${WORKLOAD:?}
QPS=${QPS:-20}
BURST=${BURST:-20}
GC=${GC:-true}
EXTRA_FLAGS=${EXTRA_FLAGS:-}

download_binary(){
KUBE_BURNER_URL=https://github.com/cloud-bulldozer/kube-burner/releases/download/v${KUBE_BURNER_VERSION}/kube-burner-${KUBE_BURNER_VERSION}-Linux-x86_64.tar.gz
Expand Down Expand Up @@ -66,5 +67,6 @@ fi
if [[ -n ${ES_SERVER} ]]; then
cmd+=" --es-server=${ES_SERVER} --es-index=ripsaw-kube-burner"
fi
cmd+=" ${EXTRA_FLAGS}"
echo $cmd
exec $cmd

0 comments on commit ed0c7cf

Please sign in to comment.