diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json index 9c9158b5c2..6f99a8d409 100644 --- a/jsonnetfile.lock.json +++ b/jsonnetfile.lock.json @@ -230,7 +230,7 @@ "subdir": "configuration" } }, - "version": "73cf41804053c961ac776f5b2ee375ef67f23f64", + "version": "6b4f08ef692e55bcfaa5cc86500b84582a1d739a", "sum": "QMVHXmQ6fFl5Cg9XZ/5KgUwwEqyHwA9PGUfhxRLWp+E=" }, { @@ -293,8 +293,8 @@ "subdir": "jsonnet/telemeter" } }, - "version": "e1f625aa31e46a84fb5d9f97c8224b9059e27d8a", - "sum": "fe88JuYCGr8pLQPuI2GxdDbrb+5U6ZwyNMQ+0fF8lgE=" + "version": "2dd35e375ee91d523bcd82d857ec4ad1f4dc01bb", + "sum": "CPC+uyaU+4XBTDTpKQjd1AQHhxUKm9aO8HbNozO0FGM=" }, { "source": { diff --git a/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml b/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml index 15b128d6ef..afc6623854 100755 --- a/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml +++ b/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml @@ -124,6 +124,27 @@ objects: labels: tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 record: cluster:usage:workload:capacity_virtual_cpu_hours + - expr: | + group by(_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos"}) * 0 + labels: + tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 + record: cluster:cpu_capacity_cores:_id + - expr: | + # worker ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_infra!="true",label_node_role_kubernetes_io_master!="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="true"}) or cluster:cpu_capacity_cores:_id)+ + # worker non-ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_infra!="true",label_node_role_kubernetes_io_master!="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="false"}) / 2.0 or cluster:cpu_capacity_cores:_id)+ + # worker non-amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_infra!="true",label_node_role_kubernetes_io_master!="true",label_kubernetes_io_arch!="amd64"}) or cluster:cpu_capacity_cores:_id)+ + # schedulable control plane ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_master="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="true"}) * on(_id) group by(_id) (cluster_master_schedulable == 1) or cluster:cpu_capacity_cores:_id)+ + # schedulable control plane non-ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_master="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="false"}) * on(_id) group by(_id) (cluster_master_schedulable == 1) / 2.0 or cluster:cpu_capacity_cores:_id)+ + # schedulable control plane non-amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_master="true",label_kubernetes_io_arch!="amd64"}) * on(_id) group by(_id) (cluster_master_schedulable == 1) or cluster:cpu_capacity_cores:_id) + labels: + tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 + record: cluster:capacity_effective_cpu_cores kind: ConfigMap metadata: creationTimestamp: null diff --git a/resources/services/observatorium-metrics-template.yaml b/resources/services/observatorium-metrics-template.yaml index 61ce415c89..54688de04d 100644 --- a/resources/services/observatorium-metrics-template.yaml +++ b/resources/services/observatorium-metrics-template.yaml @@ -2138,6 +2138,27 @@ objects: "labels": "tenant_id": "FB870BF3-9F3A-44FF-9BF7-D7A047A52F43" "record": "cluster:usage:workload:capacity_virtual_cpu_hours" + - "expr": | + group by(_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos"}) * 0 + "labels": + "tenant_id": "FB870BF3-9F3A-44FF-9BF7-D7A047A52F43" + "record": "cluster:cpu_capacity_cores:_id" + - "expr": | + # worker ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_infra!="true",label_node_role_kubernetes_io_master!="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="true"}) or cluster:cpu_capacity_cores:_id)+ + # worker non-ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_infra!="true",label_node_role_kubernetes_io_master!="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="false"}) / 2.0 or cluster:cpu_capacity_cores:_id)+ + # worker non-amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_infra!="true",label_node_role_kubernetes_io_master!="true",label_kubernetes_io_arch!="amd64"}) or cluster:cpu_capacity_cores:_id)+ + # schedulable control plane ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_master="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="true"}) * on(_id) group by(_id) (cluster_master_schedulable == 1) or cluster:cpu_capacity_cores:_id)+ + # schedulable control plane non-ht amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_master="true",label_kubernetes_io_arch="amd64",label_node_hyperthread_enabled="false"}) * on(_id) group by(_id) (cluster_master_schedulable == 1) / 2.0 or cluster:cpu_capacity_cores:_id)+ + # schedulable control plane non-amd64 + (sum by (_id) (node_role_os_version_machine:cpu_capacity_cores:sum{label_node_openshift_io_os_id="rhcos",label_node_role_kubernetes_io_master="true",label_kubernetes_io_arch!="amd64"}) * on(_id) group by(_id) (cluster_master_schedulable == 1) or cluster:cpu_capacity_cores:_id) + "labels": + "tenant_id": "FB870BF3-9F3A-44FF-9BF7-D7A047A52F43" + "record": "cluster:capacity_effective_cpu_cores" kind: ConfigMap metadata: annotations: