Skip to content

Instantly share code, notes, and snippets.

@identw
Created October 14, 2021 16:31
Show Gist options
  • Save identw/145f52e151595fee427068f415ae8558 to your computer and use it in GitHub Desktop.
Save identw/145f52e151595fee427068f415ae8558 to your computer and use it in GitHub Desktop.
rules:
- expr: sum(rate(container_cpu_usage_seconds_total{job="kubelet",container!="",container!="POD"}[2m])) by (namespace,pod)
record: pod:container_cpu_usage:sum
- expr: sum(kube_pod_container_resource_requests{container!=""}) by (namespace, pod, resource)
record: kube_pod_resource_request
- expr: sum(kube_pod_container_resource_limits{container!=""}) by (namespace, pod, resource)
record: kube_pod_resource_limit
- expr: sum(container_network_receive_bytes_total{}) by(namespace,pod,interface) * 0
record: pod_network_name_info
- expr: sum(container_fs_usage_bytes{}) by (namespace, pod)
record: pod:container_fs_usage_bytes:sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment