k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/pkg/prometheus/manifests/prometheus-rules.yaml (about) 1 apiVersion: monitoring.coreos.com/v1 2 kind: PrometheusRule 3 metadata: 4 labels: 5 prometheus: k8s 6 name: prometheus-k8s-rules 7 namespace: monitoring 8 spec: 9 groups: 10 - name: apiserver.rules 11 rules: 12 - expr: | 13 rate(apiserver_request_duration_seconds_bucket[5m]) and on (job) kubernetes_build_info{major="[0-1]",minor=~"^([0-9]|1[0-9]|2[0-2])$"} 14 or 15 rate(apiserver_request_slo_duration_seconds_bucket[5m]) and on (job) kubernetes_build_info{major="1",minor=~"^2[3-5]$"} 16 or 17 rate(apiserver_request_sli_duration_seconds_bucket[5m]) and on (job) kubernetes_build_info{major="1",minor=~"^(2[6-9]|[3-9][0-9])$"} 18 record: apiserver:request_latency:rate5m 19 - expr: | 20 histogram_quantile(0.99, sum(apiserver:request_latency:rate5m) by (resource, subresource, verb, scope, le)) 21 record: apiserver:apiserver_request_latency:histogram_quantile 22 labels: 23 quantile: "0.99" 24 - expr: | 25 histogram_quantile(0.9, sum(apiserver:request_latency:rate5m) by (resource, subresource, verb, scope, le)) 26 record: apiserver:apiserver_request_latency:histogram_quantile 27 labels: 28 quantile: "0.90" 29 - expr: | 30 histogram_quantile(0.5, sum(apiserver:request_latency:rate5m) by (resource, subresource, verb, scope, le)) 31 record: apiserver:apiserver_request_latency:histogram_quantile 32 labels: 33 quantile: "0.50" 34 - name: probes.rules 35 rules: 36 - expr: | 37 histogram_quantile(0.99, sum(rate(probes_in_cluster_network_latency_seconds_bucket[5m])) by (le)) 38 record: probes:in_cluster_network_latency:histogram_quantile 39 labels: 40 quantile: "0.99" 41 - expr: | 42 histogram_quantile(0.90, sum(rate(probes_in_cluster_network_latency_seconds_bucket[5m])) by (le)) 43 record: probes:in_cluster_network_latency:histogram_quantile 44 labels: 45 quantile: "0.90" 46 - expr: | 47 histogram_quantile(0.50, sum(rate(probes_in_cluster_network_latency_seconds_bucket[5m])) by (le)) 48 record: probes:in_cluster_network_latency:histogram_quantile 49 labels: 50 quantile: "0.50" 51 - expr: | 52 histogram_quantile(0.99, sum(rate(probes_in_cluster_dns_latency_seconds_bucket[5m])) by (le)) 53 record: probes:dns_lookup_latency:histogram_quantile 54 labels: 55 quantile: "0.99" 56 - expr: | 57 histogram_quantile(0.90, sum(rate(probes_in_cluster_dns_latency_seconds_bucket[5m])) by (le)) 58 record: probes:dns_lookup_latency:histogram_quantile 59 labels: 60 quantile: "0.90" 61 - expr: | 62 histogram_quantile(0.50, sum(rate(probes_in_cluster_dns_latency_seconds_bucket[5m])) by (le)) 63 record: probes:dns_lookup_latency:histogram_quantile 64 labels: 65 quantile: "0.50" 66 - name: kube-proxy.rules 67 rules: 68 - expr: | 69 histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket[5m])) by (le)) 70 record: kubeproxy:kubeproxy_network_programming_duration:histogram_quantile 71 labels: 72 quantile: "0.99" 73 - expr: | 74 histogram_quantile(0.90, sum(rate(kubeproxy_network_programming_duration_seconds_bucket[5m])) by (le)) 75 record: kubeproxy:kubeproxy_network_programming_duration:histogram_quantile 76 labels: 77 quantile: "0.90" 78 - expr: | 79 histogram_quantile(0.50, sum(rate(kubeproxy_network_programming_duration_seconds_bucket[5m])) by (le)) 80 record: kubeproxy:kubeproxy_network_programming_duration:histogram_quantile 81 labels: 82 quantile: "0.50" 83 - expr: | 84 histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket[5m])) by (le, pod)) 85 record: kubeproxy:kubeproxy_network_programming_duration:histogram_quantile_by_pod 86 labels: 87 quantile: "0.99" 88 - expr: | 89 histogram_quantile(0.90, sum(rate(kubeproxy_network_programming_duration_seconds_bucket[5m])) by (le, pod)) 90 record: kubeproxy:kubeproxy_network_programming_duration:histogram_quantile_by_pod 91 labels: 92 quantile: "0.90" 93 - expr: | 94 histogram_quantile(0.50, sum(rate(kubeproxy_network_programming_duration_seconds_bucket[5m])) by (le, pod)) 95 record: kubeproxy:kubeproxy_network_programming_duration:histogram_quantile_by_pod 96 labels: 97 quantile: "0.50" 98 - name: apiserver.1m.rules 99 rules: 100 - expr: | 101 histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 102 record: apiserver:apiserver_request_latency_1m:histogram_quantile 103 labels: 104 quantile: "0.99" 105 - expr: | 106 histogram_quantile(0.9, sum(rate(apiserver_request_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 107 record: apiserver:apiserver_request_latency_1m:histogram_quantile 108 labels: 109 quantile: "0.90" 110 - expr: | 111 histogram_quantile(0.5, sum(rate(apiserver_request_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 112 record: apiserver:apiserver_request_latency_1m:histogram_quantile 113 labels: 114 quantile: "0.50" 115 - expr: | 116 histogram_quantile(0.99, sum(rate(apiserver_request_slo_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 117 record: apiserver:apiserver_request_slo_latency_1m:histogram_quantile 118 labels: 119 quantile: "0.99" 120 - expr: | 121 histogram_quantile(0.9, sum(rate(apiserver_request_slo_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 122 record: apiserver:apiserver_request_slo_latency_1m:histogram_quantile 123 labels: 124 quantile: "0.90" 125 - expr: | 126 histogram_quantile(0.5, sum(rate(apiserver_request_slo_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 127 record: apiserver:apiserver_request_slo_latency_1m:histogram_quantile 128 labels: 129 quantile: "0.50" 130 - expr: | 131 histogram_quantile(0.99, sum(rate(apiserver_request_sli_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 132 record: apiserver:apiserver_request_sli_latency_1m:histogram_quantile 133 labels: 134 quantile: "0.99" 135 - expr: | 136 histogram_quantile(0.9, sum(rate(apiserver_request_sli_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 137 record: apiserver:apiserver_request_sli_latency_1m:histogram_quantile 138 labels: 139 quantile: "0.90" 140 - expr: | 141 histogram_quantile(0.5, sum(rate(apiserver_request_sli_duration_seconds_bucket[1m])) by (resource, subresource, verb, scope, le)) 142 record: apiserver:apiserver_request_sli_latency_1m:histogram_quantile 143 labels: 144 quantile: "0.50"