Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alvaroaleman/2c19acb62a3d5ad1c5110a23efd9778e to your computer and use it in GitHub Desktop.
Save alvaroaleman/2c19acb62a3d5ad1c5110a23efd9778e to your computer and use it in GitHub Desktop.
sum by (namespace, pod, node, pod_ip) (container_memory_working_set_bytes{container="test"}) *
on(namespace, pod)
group_left(org, repo, type, name, id, node, pod_ip, phase)
max by (org, repo, type, name, id, namespace, pod, phase, node, pod_ip) (
label_replace(
label_replace(
label_replace(
label_replace(
label_replace(
prow:pod *
on (namespace, pod)
group_left (label_prow_k8s_io_id, label_prow_k8s_io_refs_repo, label_prow_k8s_io_type, label_prow_k8s_io_job, label_prow_k8s_io_refs_org)
kube_pod_labels{label_prow_k8s_io_id!=""},
"id",
"$0",
"label_prow_k8s_io_id",
".*"
),
"repo",
"$0",
"label_prow_k8s_io_refs_repo",
".*"
),
"type",
"$0",
"label_prow_k8s_io_type",
".*"
),
"name",
"$0",
"label_prow_k8s_io_job",
".*"
),
"org",
"$0",
"label_prow_k8s_io_refs_org",
".*"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment