diff --git a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.json b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.json index 9f4ef33c1..d7d0a9656 100644 --- a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.json +++ b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.json @@ -21,19 +21,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, @@ -45,19 +45,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, @@ -141,19 +141,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, @@ -165,19 +165,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, diff --git a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.yaml b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.yaml index 7655630d3..91bdf3dab 100644 --- a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.yaml +++ b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring.yaml @@ -23,17 +23,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of cpu requests in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # CPU Limit # Show cpu limits in bytes for a container in a deployment @@ -44,17 +44,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of cpu limits in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # CPU Usage # CPU Usage query uses recording rule to get the data. Recording rule has changed @@ -153,17 +153,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of memory requests in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Memory Limit @@ -175,17 +175,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of memory limits in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Memory Usage # Average memory per container in a deployment diff --git a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.json b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.json index 67c6e4593..eb4fda2a7 100644 --- a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.json +++ b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.json @@ -21,19 +21,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, @@ -45,19 +45,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"cpu\", unit=\"core\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, @@ -117,19 +117,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, @@ -141,19 +141,19 @@ "aggregation_functions": [ { "function": "avg", - "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "sum", - "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "max", - "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" }, { "function": "min", - "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase=\"Running\"}))" + "query": "min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!=\"\", container!=\"POD\", pod!=\"\", resource=\"memory\", unit=\"byte\", namespace=\"$NAMESPACE$\", container=\"$CONTAINER_NAME$\"}))" } ] }, diff --git a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.yaml b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.yaml index 247b342b2..b77fd9bba 100644 --- a/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.yaml +++ b/manifests/autotune/performance-profiles/resource_optimization_local_monitoring_norecordingrules.yaml @@ -23,17 +23,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of cpu requests in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # CPU Limit # Show cpu limits in bytes for a container in a deployment @@ -44,17 +44,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of cpu limits in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="cpu", unit="core", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # CPU Usage @@ -117,17 +117,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of memory requests in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_requests{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Memory Limit @@ -139,17 +139,17 @@ slo: aggregation_functions: - function: avg - query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'avg by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Show sum of memory limits in bytes for a container in a deployment - function: sum - query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'sum by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: max - query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'max by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' - function: min - query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}) * on(pod, namespace) group_left max by (container, pod, namespace) (kube_pod_status_phase{phase="Running"}))' + query: 'min by(container, pod, namespace) ((kube_pod_container_resource_limits{container!="", container!="POD", pod!="", resource="memory", unit="byte", namespace="$NAMESPACE$", container="$CONTAINER_NAME$"}))' # Memory Usage # Average memory per container in a deployment