diff --git a/helm/bundles/cortex-nova/templates/kpis.yaml b/helm/bundles/cortex-nova/templates/kpis.yaml index 1039ba17..e9cabbb5 100644 --- a/helm/bundles/cortex-nova/templates/kpis.yaml +++ b/helm/bundles/cortex-nova/templates/kpis.yaml @@ -30,30 +30,16 @@ spec: apiVersion: cortex.cloud/v1alpha1 kind: KPI metadata: - name: host-total-allocatable-capacity + name: vmware-host-capacity spec: schedulingDomain: nova - impl: host_total_allocatable_capacity_kpi + impl: vmware_host_capacity_kpi dependencies: knowledges: - name: host-details - name: host-utilization description: | - This KPI tracks the total allocatable capacity of hosts. ---- -apiVersion: cortex.cloud/v1alpha1 -kind: KPI -metadata: - name: host-capacity -spec: - schedulingDomain: nova - impl: host_capacity_kpi - dependencies: - knowledges: - - name: host-details - - name: host-utilization - description: | - This KPI tracks the total allocatable capacity of hosts. + This KPI tracks the total, utilized, reserved and failover capacity of VMware hosts. --- apiVersion: cortex.cloud/v1alpha1 kind: KPI diff --git a/helm/bundles/cortex-nova/values.yaml b/helm/bundles/cortex-nova/values.yaml index 9c78ebbf..346a33d6 100644 --- a/helm/bundles/cortex-nova/values.yaml +++ b/helm/bundles/cortex-nova/values.yaml @@ -110,6 +110,9 @@ cortex-scheduling-controllers: cortex-knowledge-controllers: <<: *cortex namePrefix: cortex-nova-knowledge + rbac: + # The cortex nova scheduling controllers need hypervisor crd access. + hypervisor: {enable: true} conf: <<: *cortexConf leaderElectionID: cortex-nova-knowledge diff --git a/internal/knowledge/kpis/plugins/compute/host_available_capacity.go b/internal/knowledge/kpis/plugins/compute/host_available_capacity.go deleted file mode 100644 index 09bf9151..00000000 --- a/internal/knowledge/kpis/plugins/compute/host_available_capacity.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright SAP SE -// SPDX-License-Identifier: Apache-2.0 - -package compute - -import ( - "context" - "log/slog" - "strconv" - - "github.com/cobaltcore-dev/cortex/api/v1alpha1" - "github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins/compute" - "github.com/cobaltcore-dev/cortex/pkg/tools" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/cobaltcore-dev/cortex/internal/knowledge/kpis/plugins" - "github.com/cobaltcore-dev/cortex/pkg/conf" - "github.com/cobaltcore-dev/cortex/pkg/db" - "github.com/prometheus/client_golang/prometheus" -) - -type HostAvailableCapacityKPI struct { - // Common base for all KPIs that provides standard functionality. - plugins.BaseKPI[struct{}] // No options passed through yaml config - - hostResourcesAvailableCapacityPerHost *prometheus.Desc - hostResourcesAvailableCapacityPerHostPct *prometheus.Desc - hostResourcesAvailableCapacityHist *prometheus.Desc -} - -func (HostAvailableCapacityKPI) GetName() string { - return "host_capacity_kpi" -} - -func (k *HostAvailableCapacityKPI) Init(db *db.DB, client client.Client, opts conf.RawOpts) error { - if err := k.BaseKPI.Init(db, client, opts); err != nil { - return err - } - k.hostResourcesAvailableCapacityPerHost = prometheus.NewDesc( - "cortex_available_capacity_per_host", - "Available capacity per resource on the hosts currently (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "cpu_architecture", - "workload_type", - "hypervisor_family", - "enabled", - "decommissioned", - "external_customer", - "disabled_reason", - "pinned_projects", - }, - nil, - ) - k.hostResourcesAvailableCapacityPerHostPct = prometheus.NewDesc( - "cortex_available_capacity_per_host_pct", - "Available capacity (%) per resource on the hosts currently (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "cpu_architecture", - "workload_type", - "hypervisor_family", - "enabled", - "decommissioned", - "external_customer", - "disabled_reason", - "pinned_projects", - }, - nil, - ) - k.hostResourcesAvailableCapacityHist = prometheus.NewDesc( - "cortex_available_capacity_pct", - "Available resource capacity on the hosts currently (aggregated as a histogram).", - []string{"resource"}, - nil, - ) - return nil -} - -func (k *HostAvailableCapacityKPI) Describe(ch chan<- *prometheus.Desc) { - ch <- k.hostResourcesAvailableCapacityPerHost - ch <- k.hostResourcesAvailableCapacityHist - ch <- k.hostResourcesAvailableCapacityPerHostPct -} - -func (k *HostAvailableCapacityKPI) Collect(ch chan<- prometheus.Metric) { - hostDetailsKnowledge := &v1alpha1.Knowledge{} - if err := k.Client.Get( - context.Background(), - client.ObjectKey{Name: "host-details"}, - hostDetailsKnowledge, - ); err != nil { - slog.Error("failed to get knowledge host-details", "err", err) - return - } - hostDetails, err := v1alpha1. - UnboxFeatureList[compute.HostDetails](hostDetailsKnowledge.Status.Raw) - if err != nil { - slog.Error("failed to unbox storage pool cpu usage", "err", err) - return - } - detailsByComputeHost := make(map[string]compute.HostDetails) - for _, detail := range hostDetails { - detailsByComputeHost[detail.ComputeHost] = detail - } - - hostUtilizationKnowledge := &v1alpha1.Knowledge{} - if err := k.Client.Get( - context.Background(), - client.ObjectKey{Name: "host-utilization"}, - hostUtilizationKnowledge, - ); err != nil { - slog.Error("failed to get knowledge host-utilization", "err", err) - return - } - hostUtilizations, err := v1alpha1. - UnboxFeatureList[compute.HostUtilization](hostUtilizationKnowledge.Status.Raw) - if err != nil { - slog.Error("failed to unbox host utilization", "err", err) - return - } - - for _, utilization := range hostUtilizations { - detail, exists := detailsByComputeHost[utilization.ComputeHost] - if !exists { - slog.Warn("host_available_capacity: missing host details for compute host", "compute_host", utilization.ComputeHost) - continue - } - if detail.HypervisorType == "ironic" { - continue // Ironic hosts do not run VMs/instances - } - - if utilization.TotalRAMAllocatableMB == 0 || utilization.TotalVCPUsAllocatable == 0 || utilization.TotalDiskAllocatableGB == 0 { - slog.Info( - "Skipping host since placement is reporting zero allocatable resources", - "metric", "cortex_available_capacity_per_host", - "host", utilization.ComputeHost, - "cpu", utilization.TotalVCPUsAllocatable, - "ram", utilization.TotalRAMAllocatableMB, - "disk", utilization.TotalDiskAllocatableGB, - ) - continue - } - - enabled := strconv.FormatBool(detail.Enabled) - decommissioned := strconv.FormatBool(detail.Decommissioned) - externalCustomer := strconv.FormatBool(detail.ExternalCustomer) - pinnedProjects := "" - if detail.PinnedProjects != nil { - pinnedProjects = *detail.PinnedProjects - } - disabledReason := "-" - if detail.DisabledReason != nil { - disabledReason = *detail.DisabledReason - } - - ch <- prometheus.MustNewConstMetric( - k.hostResourcesAvailableCapacityPerHost, - prometheus.GaugeValue, - utilization.TotalRAMAllocatableMB-utilization.RAMUsedMB, - utilization.ComputeHost, - "ram", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - disabledReason, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostResourcesAvailableCapacityPerHostPct, - prometheus.GaugeValue, - (utilization.TotalRAMAllocatableMB-utilization.RAMUsedMB)/utilization.TotalRAMAllocatableMB*100, - utilization.ComputeHost, - "ram", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - disabledReason, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostResourcesAvailableCapacityPerHost, - prometheus.GaugeValue, - utilization.TotalVCPUsAllocatable-utilization.VCPUsUsed, - utilization.ComputeHost, - "cpu", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - disabledReason, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostResourcesAvailableCapacityPerHostPct, - prometheus.GaugeValue, - (utilization.TotalVCPUsAllocatable-utilization.VCPUsUsed)/utilization.TotalVCPUsAllocatable*100, - utilization.ComputeHost, - "cpu", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - disabledReason, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostResourcesAvailableCapacityPerHost, - prometheus.GaugeValue, - utilization.TotalDiskAllocatableGB-utilization.DiskUsedGB, - utilization.ComputeHost, - "disk", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - disabledReason, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostResourcesAvailableCapacityPerHostPct, - prometheus.GaugeValue, - (utilization.TotalDiskAllocatableGB-utilization.DiskUsedGB)/utilization.TotalDiskAllocatableGB*100, - utilization.ComputeHost, - "disk", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - disabledReason, - pinnedProjects, - ) - } - - buckets := prometheus.LinearBuckets(0, 5, 20) - // Histogram for CPU - keysFunc := func(hs compute.HostUtilization) []string { return []string{"cpu"} } - valueFunc := func(hs compute.HostUtilization) float64 { - return (hs.TotalVCPUsAllocatable - hs.VCPUsUsed) / hs.TotalVCPUsAllocatable * 100 - } - hists, counts, sums := tools.Histogram(hostUtilizations, buckets, keysFunc, valueFunc) - for key, hist := range hists { - ch <- prometheus.MustNewConstHistogram(k.hostResourcesAvailableCapacityHist, counts[key], sums[key], hist, key) - } - // Histogram for RAM - keysFunc = func(hs compute.HostUtilization) []string { return []string{"ram"} } - valueFunc = func(hs compute.HostUtilization) float64 { - return (hs.TotalRAMAllocatableMB - hs.RAMUsedMB) / hs.TotalRAMAllocatableMB * 100 - } - hists, counts, sums = tools.Histogram(hostUtilizations, buckets, keysFunc, valueFunc) - for key, hist := range hists { - ch <- prometheus.MustNewConstHistogram(k.hostResourcesAvailableCapacityHist, counts[key], sums[key], hist, key) - } - // Histogram for Disk - keysFunc = func(hs compute.HostUtilization) []string { return []string{"disk"} } - valueFunc = func(hs compute.HostUtilization) float64 { - return (hs.TotalDiskAllocatableGB - hs.DiskUsedGB) / hs.TotalDiskAllocatableGB * 100 - } - hists, counts, sums = tools.Histogram(hostUtilizations, buckets, keysFunc, valueFunc) - for key, hist := range hists { - ch <- prometheus.MustNewConstHistogram(k.hostResourcesAvailableCapacityHist, counts[key], sums[key], hist, key) - } -} diff --git a/internal/knowledge/kpis/plugins/compute/host_capacity.go b/internal/knowledge/kpis/plugins/compute/host_capacity.go deleted file mode 100644 index a09935e3..00000000 --- a/internal/knowledge/kpis/plugins/compute/host_capacity.go +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright SAP SE -// SPDX-License-Identifier: Apache-2.0 - -package compute - -import ( - "context" - "log/slog" - "strconv" - "strings" - - "github.com/cobaltcore-dev/cortex/api/v1alpha1" - "github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins/compute" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/cobaltcore-dev/cortex/internal/knowledge/kpis/plugins" - "github.com/cobaltcore-dev/cortex/pkg/conf" - "github.com/cobaltcore-dev/cortex/pkg/db" - "github.com/prometheus/client_golang/prometheus" -) - -func getBuildingBlock(hostName string) string { - parts := strings.Split(hostName, "-") - if len(parts) > 1 { - return parts[1] - } - return "unknown" -} - -type HostCapacityKPI struct { - // Common base for all KPIs that provides standard functionality. - plugins.BaseKPI[struct{}] // No options passed through yaml config - hostUtilizedCapacityPerHost *prometheus.Desc - hostPAYGCapacityPerHost *prometheus.Desc - hostFailoverCapacityPerHost *prometheus.Desc - hostReservedCapacityPerHost *prometheus.Desc - hostTotalCapacityPerHost *prometheus.Desc -} - -func (HostCapacityKPI) GetName() string { - return "cortex_kvm_host_capacity_kpi" -} - -func (k *HostCapacityKPI) Init(db *db.DB, client client.Client, opts conf.RawOpts) error { - if err := k.BaseKPI.Init(db, client, opts); err != nil { - return err - } - k.hostUtilizedCapacityPerHost = prometheus.NewDesc( - "cortex_kvm_host_capacity_utilized", - "Utilized resources on the KVM hosts (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "building_block", - "cpu_architecture", - "workload_type", - "enabled", - "decommissioned", - "external_customer", - }, - nil, - ) - k.hostPAYGCapacityPerHost = prometheus.NewDesc( - "cortex_kvm_host_capacity_payg", - "PAYG resources available on the KVM hosts (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "building_block", - "cpu_architecture", - "workload_type", - "enabled", - "decommissioned", - "external_customer", - }, - nil, - ) - k.hostReservedCapacityPerHost = prometheus.NewDesc( - "cortex_kvm_host_capacity_reserved", - "Reserved resources on the KVM hosts (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "building_block", - "cpu_architecture", - "workload_type", - "enabled", - "decommissioned", - "external_customer", - }, - nil, - ) - k.hostFailoverCapacityPerHost = prometheus.NewDesc( - "cortex_kvm_host_capacity_failover", - "Failover resources on the KVM hosts (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "building_block", - "cpu_architecture", - "workload_type", - "enabled", - "decommissioned", - "external_customer", - }, - nil, - ) - k.hostTotalCapacityPerHost = prometheus.NewDesc( - "cortex_kvm_host_capacity_total", - "Total resources on the KVM hosts (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "building_block", - "cpu_architecture", - "workload_type", - "enabled", - "decommissioned", - "external_customer", - }, - nil, - ) - return nil -} - -func (k *HostCapacityKPI) Describe(ch chan<- *prometheus.Desc) { - ch <- k.hostUtilizedCapacityPerHost - ch <- k.hostPAYGCapacityPerHost - ch <- k.hostReservedCapacityPerHost - ch <- k.hostFailoverCapacityPerHost - ch <- k.hostTotalCapacityPerHost -} - -func (k *HostCapacityKPI) Collect(ch chan<- prometheus.Metric) { - // TODO use hypervisor CRD as data source - hostDetailsKnowledge := &v1alpha1.Knowledge{} - if err := k.Client.Get( - context.Background(), - client.ObjectKey{Name: "host-details"}, - hostDetailsKnowledge, - ); err != nil { - slog.Error("failed to get knowledge host-details", "err", err) - return - } - hostDetails, err := v1alpha1. - UnboxFeatureList[compute.HostDetails](hostDetailsKnowledge.Status.Raw) - if err != nil { - slog.Error("failed to unbox storage pool cpu usage", "err", err) - return - } - detailsByComputeHost := make(map[string]compute.HostDetails) - for _, detail := range hostDetails { - detailsByComputeHost[detail.ComputeHost] = detail - } - - hostUtilizationKnowledge := &v1alpha1.Knowledge{} - if err := k.Client.Get( - context.Background(), - client.ObjectKey{Name: "host-utilization"}, - hostUtilizationKnowledge, - ); err != nil { - slog.Error("failed to get knowledge host-utilization", "err", err) - return - } - hostUtilizations, err := v1alpha1. - UnboxFeatureList[compute.HostUtilization](hostUtilizationKnowledge.Status.Raw) - if err != nil { - slog.Error("failed to unbox host utilization", "err", err) - return - } - - // TODO get all reservations and failover capacity crds - for _, utilization := range hostUtilizations { - host, exists := detailsByComputeHost[utilization.ComputeHost] - if !exists { - slog.Warn("no host details found for compute host", "compute_host", utilization.ComputeHost) - continue - } - - if host.HypervisorType == "ironic" || host.HypervisorFamily != "kvm" { - continue - } - - // TODO check if there is a flag for this in the hypervisor CRD - if utilization.TotalRAMAllocatableMB == 0 || utilization.TotalVCPUsAllocatable == 0 || utilization.TotalDiskAllocatableGB == 0 { - // Skip hosts with no capacity information - slog.Warn("skipping host with zero total allocatable capacity", "compute_host", utilization.ComputeHost) - continue - } - - cpuUsed := utilization.VCPUsUsed - ramUsed := utilization.RAMUsedMB - diskUsed := utilization.DiskUsedGB - - export(ch, k.hostUtilizedCapacityPerHost, "cpu", cpuUsed, host) - export(ch, k.hostUtilizedCapacityPerHost, "ram", ramUsed, host) - export(ch, k.hostUtilizedCapacityPerHost, "disk", diskUsed, host) - - // WARNING: Using dummy data for now. - // TODO Replace with actual data from reservations capacity CRDs - cpuReserved := 100.0 - ramReserved := 1024.0 - diskReserved := 64.0 - - export(ch, k.hostReservedCapacityPerHost, "cpu", cpuReserved, host) - export(ch, k.hostReservedCapacityPerHost, "ram", ramReserved, host) - export(ch, k.hostReservedCapacityPerHost, "disk", diskReserved, host) - - // WARNING: Using dummy data for now. - // TODO Replace with actual data from failover capacity CRDs - cpuFailover := 100.0 - ramFailover := 1024.0 - diskFailover := 128.0 - - export(ch, k.hostFailoverCapacityPerHost, "cpu", cpuFailover, host) - export(ch, k.hostFailoverCapacityPerHost, "ram", ramFailover, host) - export(ch, k.hostFailoverCapacityPerHost, "disk", diskFailover, host) - - totalCPU := utilization.TotalVCPUsAllocatable - totalRAM := utilization.TotalRAMAllocatableMB - totalDisk := utilization.TotalDiskAllocatableGB - - export(ch, k.hostTotalCapacityPerHost, "cpu", totalCPU, host) - export(ch, k.hostTotalCapacityPerHost, "ram", totalRAM, host) - export(ch, k.hostTotalCapacityPerHost, "disk", totalDisk, host) - - paygCPU := totalCPU - cpuUsed - cpuReserved - cpuFailover - paygRAM := totalRAM - ramUsed - ramReserved - ramFailover - paygDisk := totalDisk - diskUsed - diskReserved - diskFailover - - export(ch, k.hostPAYGCapacityPerHost, "cpu", paygCPU, host) - export(ch, k.hostPAYGCapacityPerHost, "ram", paygRAM, host) - export(ch, k.hostPAYGCapacityPerHost, "disk", paygDisk, host) - } -} - -func export(ch chan<- prometheus.Metric, metric *prometheus.Desc, resource string, value float64, host compute.HostDetails) { - bb := getBuildingBlock(host.ComputeHost) - - enabled := strconv.FormatBool(host.Enabled) - decommissioned := strconv.FormatBool(host.Decommissioned) - externalCustomer := strconv.FormatBool(host.ExternalCustomer) - - ch <- prometheus.MustNewConstMetric( - metric, - prometheus.GaugeValue, - value, - host.ComputeHost, - resource, - host.AvailabilityZone, - bb, - host.CPUArchitecture, - host.WorkloadType, - enabled, - decommissioned, - externalCustomer, - ) -} diff --git a/internal/knowledge/kpis/plugins/compute/host_total_allocatable_capacity.go b/internal/knowledge/kpis/plugins/compute/host_total_allocatable_capacity.go deleted file mode 100644 index 06e9c029..00000000 --- a/internal/knowledge/kpis/plugins/compute/host_total_allocatable_capacity.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright SAP SE -// SPDX-License-Identifier: Apache-2.0 - -package compute - -import ( - "context" - "log/slog" - "strconv" - - "github.com/cobaltcore-dev/cortex/api/v1alpha1" - "github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins/compute" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/cobaltcore-dev/cortex/internal/knowledge/kpis/plugins" - "github.com/cobaltcore-dev/cortex/pkg/conf" - "github.com/cobaltcore-dev/cortex/pkg/db" - "github.com/prometheus/client_golang/prometheus" -) - -type HostTotalAllocatableCapacityKPI struct { - // Common base for all KPIs that provides standard functionality. - plugins.BaseKPI[struct{}] // No options passed through yaml config - - hostTotalCapacityPerHost *prometheus.Desc -} - -func (HostTotalAllocatableCapacityKPI) GetName() string { - return "host_total_allocatable_capacity_kpi" -} - -func (k *HostTotalAllocatableCapacityKPI) Init(db *db.DB, client client.Client, opts conf.RawOpts) error { - if err := k.BaseKPI.Init(db, client, opts); err != nil { - return err - } - k.hostTotalCapacityPerHost = prometheus.NewDesc( - "cortex_total_allocatable_capacity_per_host", - "Total resources available on the hosts currently (individually by host).", - []string{ - "compute_host", - "resource", - "availability_zone", - "cpu_architecture", - "workload_type", - "hypervisor_family", - "enabled", - "decommissioned", - "external_customer", - "pinned_projects", - }, - nil, - ) - return nil -} - -func (k *HostTotalAllocatableCapacityKPI) Describe(ch chan<- *prometheus.Desc) { - ch <- k.hostTotalCapacityPerHost -} - -func (k *HostTotalAllocatableCapacityKPI) Collect(ch chan<- prometheus.Metric) { - hostDetailsKnowledge := &v1alpha1.Knowledge{} - if err := k.Client.Get( - context.Background(), - client.ObjectKey{Name: "host-details"}, - hostDetailsKnowledge, - ); err != nil { - slog.Error("failed to get knowledge host-details", "err", err) - return - } - hostDetails, err := v1alpha1. - UnboxFeatureList[compute.HostDetails](hostDetailsKnowledge.Status.Raw) - if err != nil { - slog.Error("failed to unbox storage pool cpu usage", "err", err) - return - } - detailsByComputeHost := make(map[string]compute.HostDetails) - for _, detail := range hostDetails { - detailsByComputeHost[detail.ComputeHost] = detail - } - - hostUtilizationKnowledge := &v1alpha1.Knowledge{} - if err := k.Client.Get( - context.Background(), - client.ObjectKey{Name: "host-utilization"}, - hostUtilizationKnowledge, - ); err != nil { - slog.Error("failed to get knowledge host-utilization", "err", err) - return - } - hostUtilizations, err := v1alpha1. - UnboxFeatureList[compute.HostUtilization](hostUtilizationKnowledge.Status.Raw) - if err != nil { - slog.Error("failed to unbox host utilization", "err", err) - return - } - - for _, utilization := range hostUtilizations { - detail, exists := detailsByComputeHost[utilization.ComputeHost] - if !exists { - slog.Warn("host_total_allocatable_capacity: no host details for compute host", "compute_host", utilization.ComputeHost) - continue - } - if detail.HypervisorType == "ironic" { - continue // Ignore ironic hosts - } - - enabled := strconv.FormatBool(detail.Enabled) - decommissioned := strconv.FormatBool(detail.Decommissioned) - externalCustomer := strconv.FormatBool(detail.ExternalCustomer) - pinnedProjects := "" - if detail.PinnedProjects != nil { - pinnedProjects = *detail.PinnedProjects - } - - ch <- prometheus.MustNewConstMetric( - k.hostTotalCapacityPerHost, - prometheus.GaugeValue, - float64(utilization.TotalRAMAllocatableMB), - utilization.ComputeHost, - "ram", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostTotalCapacityPerHost, - prometheus.GaugeValue, - float64(utilization.TotalVCPUsAllocatable), - utilization.ComputeHost, - "cpu", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - pinnedProjects, - ) - ch <- prometheus.MustNewConstMetric( - k.hostTotalCapacityPerHost, - prometheus.GaugeValue, - float64(utilization.TotalDiskAllocatableGB), - utilization.ComputeHost, - "disk", - detail.AvailabilityZone, - detail.CPUArchitecture, - detail.WorkloadType, - detail.HypervisorFamily, - enabled, - decommissioned, - externalCustomer, - pinnedProjects, - ) - } -} diff --git a/internal/knowledge/kpis/plugins/compute/host_total_allocatable_capacity_test.go b/internal/knowledge/kpis/plugins/compute/host_total_allocatable_capacity_test.go deleted file mode 100644 index 309599c2..00000000 --- a/internal/knowledge/kpis/plugins/compute/host_total_allocatable_capacity_test.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright SAP SE -// SPDX-License-Identifier: Apache-2.0 - -package compute - -import ( - "reflect" - "testing" - - "github.com/cobaltcore-dev/cortex/api/v1alpha1" - "github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins/compute" - "github.com/cobaltcore-dev/cortex/pkg/conf" - testlib "github.com/cobaltcore-dev/cortex/pkg/testing" - "github.com/prometheus/client_golang/prometheus" - prometheusgo "github.com/prometheus/client_model/go" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client/fake" -) - -func TestHostTotalAllocatableCapacityKPI_Init(t *testing.T) { - kpi := &HostTotalAllocatableCapacityKPI{} - if err := kpi.Init(nil, nil, conf.NewRawOpts("{}")); err != nil { - t.Fatalf("expected no error, got %v", err) - } -} - -func TestHostTotalAllocatableCapacityKPI_Collect(t *testing.T) { - scheme, err := v1alpha1.SchemeBuilder.Build() - if err != nil { - t.Fatalf("expected no error, got %v", err) - } - - hostDetails, err := v1alpha1.BoxFeatureList([]any{ - &compute.HostDetails{ - ComputeHost: "vmware-host", - AvailabilityZone: "az1", - CPUArchitecture: "cascade-lake", - HypervisorType: "vcenter", - HypervisorFamily: "vmware", - WorkloadType: "general-purpose", - Enabled: true, - Decommissioned: true, - ExternalCustomer: true, - PinnedProjects: testlib.Ptr("project-123,project-456"), - }, - &compute.HostDetails{ - ComputeHost: "kvm-host", - AvailabilityZone: "az2", - CPUArchitecture: "cascade-lake", - HypervisorType: "qemu", - HypervisorFamily: "kvm", - WorkloadType: "hana", - Enabled: false, - Decommissioned: false, - ExternalCustomer: false, - PinnedProjects: nil, - }, - &compute.HostDetails{ - ComputeHost: "ironic-host", - AvailabilityZone: "az2", - CPUArchitecture: "cascade-lake", - HypervisorType: "ironic", - HypervisorFamily: "kvm", - WorkloadType: "hana", - Enabled: false, - Decommissioned: false, - ExternalCustomer: false, - }, - // Skip this host as it has no usage data - &compute.HostDetails{ - ComputeHost: "kvm-host-2", - AvailabilityZone: "az2", - CPUArchitecture: "cascade-lake", - HypervisorType: "qemu", - HypervisorFamily: "kvm", - WorkloadType: "hana", - Enabled: false, - Decommissioned: false, - ExternalCustomer: false, - PinnedProjects: nil, - }, - }) - if err != nil { - t.Fatalf("expected no error, got %v", err) - } - - hostUtilizations, err := v1alpha1.BoxFeatureList([]any{ - &compute.HostUtilization{ - ComputeHost: "vmware-host", - TotalVCPUsAllocatable: 100, - TotalRAMAllocatableMB: 200, - TotalDiskAllocatableGB: 300, - }, - &compute.HostUtilization{ - ComputeHost: "kvm-host", - TotalVCPUsAllocatable: 100, - TotalRAMAllocatableMB: 100, - TotalDiskAllocatableGB: 100, - }, - &compute.HostUtilization{ - ComputeHost: "ironic-host", - TotalVCPUsAllocatable: 0, - TotalRAMAllocatableMB: 0, - TotalDiskAllocatableGB: 0, - }, - // No usage data for kvm-host-2 - }) - if err != nil { - t.Fatalf("expected no error, got %v", err) - } - - kpi := &HostTotalAllocatableCapacityKPI{} - client := fake.NewClientBuilder(). - WithScheme(scheme). - WithRuntimeObjects(&v1alpha1.Knowledge{ - ObjectMeta: v1.ObjectMeta{Name: "host-details"}, - Status: v1alpha1.KnowledgeStatus{Raw: hostDetails}, - }, &v1alpha1.Knowledge{ - ObjectMeta: v1.ObjectMeta{Name: "host-utilization"}, - Status: v1alpha1.KnowledgeStatus{Raw: hostUtilizations}, - }).Build() - if err := kpi.Init(nil, client, conf.NewRawOpts("{}")); err != nil { - t.Fatalf("expected no error, got %v", err) - } - - ch := make(chan prometheus.Metric, 100) - kpi.Collect(ch) - close(ch) - - type HostResourceMetric struct { - ComputeHost string - Resource string - AvailabilityZone string - Enabled string - Decommissioned string - ExternalCustomer string - CPUArchitecture string - WorkloadType string - HypervisorFamily string - PinnedProjects string - Value float64 - } - - actualMetrics := make(map[string]HostResourceMetric, 0) - - for metric := range ch { - var m prometheusgo.Metric - if err := metric.Write(&m); err != nil { - t.Fatalf("failed to write metric: %v", err) - } - - labels := make(map[string]string) - for _, label := range m.Label { - labels[label.GetName()] = label.GetValue() - } - - key := labels["compute_host"] + "-" + labels["resource"] - - actualMetrics[key] = HostResourceMetric{ - ComputeHost: labels["compute_host"], - Resource: labels["resource"], - AvailabilityZone: labels["availability_zone"], - Enabled: labels["enabled"], - Decommissioned: labels["decommissioned"], - ExternalCustomer: labels["external_customer"], - CPUArchitecture: labels["cpu_architecture"], - WorkloadType: labels["workload_type"], - HypervisorFamily: labels["hypervisor_family"], - PinnedProjects: labels["pinned_projects"], - Value: m.GetGauge().GetValue(), - } - } - - expectedMetrics := map[string]HostResourceMetric{ - "vmware-host-cpu": { - ComputeHost: "vmware-host", - Resource: "cpu", - AvailabilityZone: "az1", - Enabled: "true", - Decommissioned: "true", - ExternalCustomer: "true", - CPUArchitecture: "cascade-lake", - WorkloadType: "general-purpose", - HypervisorFamily: "vmware", - PinnedProjects: "project-123,project-456", - Value: 100, - }, - "vmware-host-ram": { - ComputeHost: "vmware-host", - Resource: "ram", - AvailabilityZone: "az1", - Enabled: "true", - Decommissioned: "true", - ExternalCustomer: "true", - CPUArchitecture: "cascade-lake", - WorkloadType: "general-purpose", - HypervisorFamily: "vmware", - PinnedProjects: "project-123,project-456", - Value: 200, - }, - "vmware-host-disk": { - ComputeHost: "vmware-host", - Resource: "disk", - AvailabilityZone: "az1", - Enabled: "true", - Decommissioned: "true", - ExternalCustomer: "true", - CPUArchitecture: "cascade-lake", - WorkloadType: "general-purpose", - HypervisorFamily: "vmware", - PinnedProjects: "project-123,project-456", - Value: 300, - }, - "kvm-host-cpu": { - ComputeHost: "kvm-host", - Resource: "cpu", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - PinnedProjects: "", - Value: 100, - }, - "kvm-host-ram": { - ComputeHost: "kvm-host", - Resource: "ram", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - PinnedProjects: "", - Value: 100, - }, - "kvm-host-disk": { - ComputeHost: "kvm-host", - Resource: "disk", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - PinnedProjects: "", - Value: 100, - }, - } - - if len(expectedMetrics) != len(actualMetrics) { - t.Errorf("expected %d metrics, got %d", len(expectedMetrics), len(actualMetrics)) - } - - for key, expected := range expectedMetrics { - actual, ok := actualMetrics[key] - if !ok { - t.Errorf("expected metric %q not found", key) - continue - } - - if !reflect.DeepEqual(expected, actual) { - t.Errorf("metric %q: expected %+v, got %+v", key, expected, actual) - } - } -} diff --git a/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go new file mode 100644 index 00000000..1b7d9a2d --- /dev/null +++ b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm.go @@ -0,0 +1,254 @@ +// Copyright SAP SE +// SPDX-License-Identifier: Apache-2.0 + +package compute + +import ( + "context" + "log/slog" + "strconv" + "strings" + + "k8s.io/apimachinery/pkg/api/resource" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/cobaltcore-dev/cortex/internal/knowledge/kpis/plugins" + "github.com/cobaltcore-dev/cortex/pkg/conf" + "github.com/cobaltcore-dev/cortex/pkg/db" + "github.com/prometheus/client_golang/prometheus" + + hv1 "github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1" +) + +// Assuming hypervisor names are in the format nodeXXX-bbYY +func getBuildingBlock(hostName string) string { + parts := strings.Split(hostName, "-") + if len(parts) > 1 { + return parts[1] + } + return "unknown" +} + +type KVMResourceCapacityKPI struct { + // Common base for all KPIs that provides standard functionality. + plugins.BaseKPI[struct{}] // No options passed through yaml config + utilizedCapacityPerHost *prometheus.Desc + paygCapacityPerHost *prometheus.Desc + failoverCapacityPerHost *prometheus.Desc + reservedCapacityPerHost *prometheus.Desc + totalCapacityPerHost *prometheus.Desc +} + +func (KVMResourceCapacityKPI) GetName() string { + return "kvm_host_capacity_kpi" +} + +func (k *KVMResourceCapacityKPI) Init(db *db.DB, client client.Client, opts conf.RawOpts) error { + if err := k.BaseKPI.Init(db, client, opts); err != nil { + return err + } + k.utilizedCapacityPerHost = prometheus.NewDesc( + "cortex_kvm_host_capacity_utilized", + "Utilized resources on the KVM hosts (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "building_block", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "maintenance", + }, + nil, + ) + k.paygCapacityPerHost = prometheus.NewDesc( + "cortex_kvm_host_capacity_payg", + "PAYG resources available on the KVM hosts (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "building_block", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "maintenance", + }, + nil, + ) + k.reservedCapacityPerHost = prometheus.NewDesc( + "cortex_kvm_host_capacity_reserved", + "Reserved resources on the KVM hosts (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "building_block", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "maintenance", + }, + nil, + ) + k.failoverCapacityPerHost = prometheus.NewDesc( + "cortex_kvm_host_capacity_failover", + "Failover resources on the KVM hosts (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "building_block", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "maintenance", + }, + nil, + ) + k.totalCapacityPerHost = prometheus.NewDesc( + "cortex_kvm_host_capacity_total", + "Total resources on the KVM hosts (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "building_block", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "maintenance", + }, + nil, + ) + return nil +} + +func (k *KVMResourceCapacityKPI) Describe(ch chan<- *prometheus.Desc) { + ch <- k.utilizedCapacityPerHost + ch <- k.paygCapacityPerHost + ch <- k.reservedCapacityPerHost + ch <- k.failoverCapacityPerHost + ch <- k.totalCapacityPerHost +} + +func (k *KVMResourceCapacityKPI) Collect(ch chan<- prometheus.Metric) { + // The hypervisor resource auto-discovers its current utilization. + // We can use the hypervisor status to calculate the total capacity + // and then subtract the actual resource allocation from virtual machines. + hvs := &hv1.HypervisorList{} + if err := k.Client.List(context.Background(), hvs); err != nil { + slog.Error("failed to list hypervisors", "error", err) + return + } + + for _, hypervisor := range hvs.Items { + cpuTotal, hasCPUTotal := hypervisor.Status.Capacity["cpu"] + ramTotal, hasRAMTotal := hypervisor.Status.Capacity["memory"] + + if !hasCPUTotal || !hasRAMTotal { + slog.Error("hypervisor missing cpu or ram total capacity", "hypervisor", hypervisor.Name) + continue + } + + cpuUsed, hasCPUUtilized := hypervisor.Status.Allocation["cpu"] + if !hasCPUUtilized { + cpuUsed = resource.MustParse("0") + } + + ramUsed, hasRAMUtilized := hypervisor.Status.Allocation["memory"] + if !hasRAMUtilized { + ramUsed = resource.MustParse("0") + } + + exportCapacityMetricKVM(ch, k.totalCapacityPerHost, "cpu", cpuTotal.AsApproximateFloat64(), hypervisor) + exportCapacityMetricKVM(ch, k.totalCapacityPerHost, "ram", ramTotal.AsApproximateFloat64(), hypervisor) + + exportCapacityMetricKVM(ch, k.utilizedCapacityPerHost, "cpu", cpuUsed.AsApproximateFloat64(), hypervisor) + exportCapacityMetricKVM(ch, k.utilizedCapacityPerHost, "ram", ramUsed.AsApproximateFloat64(), hypervisor) + + // WARNING: Using dummy data for now. + // TODO Replace with actual data from reservations capacity CRDs + cpuReserved := resource.MustParse("100") + ramReserved := resource.MustParse("1Gi") + + exportCapacityMetricKVM(ch, k.reservedCapacityPerHost, "cpu", cpuReserved.AsApproximateFloat64(), hypervisor) + exportCapacityMetricKVM(ch, k.reservedCapacityPerHost, "ram", ramReserved.AsApproximateFloat64(), hypervisor) + + // WARNING: Using dummy data for now. + // TODO Replace with actual data from failover capacity CRDs + cpuFailover := resource.MustParse("100") + ramFailover := resource.MustParse("1Gi") + + exportCapacityMetricKVM(ch, k.failoverCapacityPerHost, "cpu", cpuFailover.AsApproximateFloat64(), hypervisor) + exportCapacityMetricKVM(ch, k.failoverCapacityPerHost, "ram", ramFailover.AsApproximateFloat64(), hypervisor) + + // Calculate PAYG capacity + paygCPU := cpuTotal.DeepCopy() + paygCPU.Sub(cpuUsed) + paygCPU.Sub(cpuReserved) + paygCPU.Sub(cpuFailover) + + paygRAM := ramTotal.DeepCopy() + paygRAM.Sub(ramUsed) + paygRAM.Sub(ramReserved) + paygRAM.Sub(ramFailover) + + exportCapacityMetricKVM(ch, k.paygCapacityPerHost, "cpu", paygCPU.AsApproximateFloat64(), hypervisor) + exportCapacityMetricKVM(ch, k.paygCapacityPerHost, "ram", paygRAM.AsApproximateFloat64(), hypervisor) + } +} + +func exportCapacityMetricKVM(ch chan<- prometheus.Metric, metric *prometheus.Desc, resource string, value float64, hypervisor hv1.Hypervisor) { + bb := getBuildingBlock(hypervisor.Name) + + availabilityZone := hypervisor.Labels["topology.kubernetes.io/zone"] + + enabled := true + decommissioned := false + externalCustomer := false + maintenance := false + + workloadType := "general-purpose" + cpuArchitecture := "cascade-lake" + + for _, trait := range hypervisor.Status.Traits { + switch trait { + case "CUSTOM_HW_SAPPHIRE_RAPIDS": + cpuArchitecture = "sapphire-rapids" + case "CUSTOM_HANA_EXCLUSIVE_HOST": + workloadType = "hana" + case "CUSTOM_DECOMMISSIONING": + decommissioned = true + case "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED": + externalCustomer = true + } + } + + ch <- prometheus.MustNewConstMetric( + metric, + prometheus.GaugeValue, + value, + hypervisor.Name, + resource, + availabilityZone, + bb, + cpuArchitecture, + workloadType, + strconv.FormatBool(enabled), + strconv.FormatBool(decommissioned), + strconv.FormatBool(externalCustomer), + strconv.FormatBool(maintenance), + ) +} diff --git a/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go new file mode 100644 index 00000000..015217e1 --- /dev/null +++ b/internal/knowledge/kpis/plugins/compute/resource_capacity_kvm_test.go @@ -0,0 +1,512 @@ +// Copyright SAP SE +// SPDX-License-Identifier: Apache-2.0 + +package compute + +import ( + "testing" + + "github.com/cobaltcore-dev/cortex/pkg/conf" + hv1 "github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1" + "github.com/prometheus/client_golang/prometheus" + prometheusgo "github.com/prometheus/client_model/go" + "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client/fake" +) + +func TestKVMResourceCapacityKPI_Init(t *testing.T) { + kpi := &KVMResourceCapacityKPI{} + if err := kpi.Init(nil, nil, conf.NewRawOpts("{}")); err != nil { + t.Fatalf("expected no error, got %v", err) + } +} + +type metricLabels struct { + ComputeHost string + Resource string + AvailabilityZone string + BuildingBlock string + CPUArchitecture string + WorkloadType string + Enabled string + Decommissioned string + ExternalCustomer string + Maintenance string +} + +type expectedMetric struct { + Labels metricLabels + Value float64 +} + +func TestKVMResourceCapacityKPI_Collect(t *testing.T) { + tests := []struct { + name string + hypervisors []hv1.Hypervisor + expectedMetrics map[string][]expectedMetric // metric_name -> []expectedMetric + }{ + { + name: "single hypervisor with default traits", + hypervisors: []hv1.Hypervisor{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "node001-bb088", + Labels: map[string]string{ + "topology.kubernetes.io/zone": "qa-1a", + }, + }, + Status: hv1.HypervisorStatus{ + Capacity: map[string]resource.Quantity{ + "cpu": resource.MustParse("128"), + "memory": resource.MustParse("512Gi"), + }, + Allocation: map[string]resource.Quantity{ + "cpu": resource.MustParse("64"), + "memory": resource.MustParse("256Gi"), + }, + Traits: []string{}, + }, + }, + }, + expectedMetrics: map[string][]expectedMetric{ + "cortex_kvm_host_capacity_total": { + { + Labels: metricLabels{ + ComputeHost: "node001-bb088", + Resource: "cpu", + AvailabilityZone: "qa-1a", + BuildingBlock: "bb088", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 128, + }, + { + Labels: metricLabels{ + ComputeHost: "node001-bb088", + Resource: "ram", + AvailabilityZone: "qa-1a", + BuildingBlock: "bb088", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 549755813888, // 512Gi in bytes + }, + }, + "cortex_kvm_host_capacity_utilized": { + { + Labels: metricLabels{ + ComputeHost: "node001-bb088", + Resource: "cpu", + AvailabilityZone: "qa-1a", + BuildingBlock: "bb088", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 64, + }, + { + Labels: metricLabels{ + ComputeHost: "node001-bb088", + Resource: "ram", + AvailabilityZone: "qa-1a", + BuildingBlock: "bb088", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 274877906944, // 256Gi in bytes + }, + }, + }, + }, + { + name: "hypervisor with sapphire rapids and hana traits", + hypervisors: []hv1.Hypervisor{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "node002-bb089", + Labels: map[string]string{ + "topology.kubernetes.io/zone": "qa-1b", + }, + }, + Status: hv1.HypervisorStatus{ + Capacity: map[string]resource.Quantity{ + "cpu": resource.MustParse("256"), + "memory": resource.MustParse("1Ti"), + }, + Allocation: map[string]resource.Quantity{ + "cpu": resource.MustParse("128"), + "memory": resource.MustParse("512Gi"), + }, + Traits: []string{ + "CUSTOM_HW_SAPPHIRE_RAPIDS", + "CUSTOM_HANA_EXCLUSIVE_HOST", + }, + }, + }, + }, + expectedMetrics: map[string][]expectedMetric{ + "cortex_kvm_host_capacity_total": { + { + Labels: metricLabels{ + ComputeHost: "node002-bb089", + Resource: "cpu", + AvailabilityZone: "qa-1b", + BuildingBlock: "bb089", + CPUArchitecture: "sapphire-rapids", + WorkloadType: "hana", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 256, + }, + { + Labels: metricLabels{ + ComputeHost: "node002-bb089", + Resource: "ram", + AvailabilityZone: "qa-1b", + BuildingBlock: "bb089", + CPUArchitecture: "sapphire-rapids", + WorkloadType: "hana", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 1099511627776, // 1Ti in bytes + }, + }, + }, + }, + { + name: "hypervisor with decommissioned and external customer traits", + hypervisors: []hv1.Hypervisor{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "node003-bb090", + Labels: map[string]string{ + "topology.kubernetes.io/zone": "qa-1c", + }, + }, + Status: hv1.HypervisorStatus{ + Capacity: map[string]resource.Quantity{ + "cpu": resource.MustParse("64"), + "memory": resource.MustParse("256Gi"), + }, + Allocation: map[string]resource.Quantity{ + "cpu": resource.MustParse("32"), + "memory": resource.MustParse("128Gi"), + }, + Traits: []string{ + "CUSTOM_DECOMMISSIONING", + "CUSTOM_EXTERNAL_CUSTOMER_SUPPORTED", + }, + }, + }, + }, + expectedMetrics: map[string][]expectedMetric{ + "cortex_kvm_host_capacity_total": { + { + Labels: metricLabels{ + ComputeHost: "node003-bb090", + Resource: "cpu", + AvailabilityZone: "qa-1c", + BuildingBlock: "bb090", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "true", + ExternalCustomer: "true", + Maintenance: "false", + }, + Value: 64, + }, + }, + }, + }, + { + name: "multiple hypervisors", + hypervisors: []hv1.Hypervisor{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "node010-bb100", + Labels: map[string]string{ + "topology.kubernetes.io/zone": "qa-1a", + }, + }, + Status: hv1.HypervisorStatus{ + Capacity: map[string]resource.Quantity{ + "cpu": resource.MustParse("100"), + "memory": resource.MustParse("200Gi"), + }, + Allocation: map[string]resource.Quantity{ + "cpu": resource.MustParse("50"), + "memory": resource.MustParse("100Gi"), + }, + Traits: []string{}, + }, + }, + { + ObjectMeta: v1.ObjectMeta{ + Name: "node020-bb200", + Labels: map[string]string{ + "topology.kubernetes.io/zone": "qa-1b", + }, + }, + Status: hv1.HypervisorStatus{ + Capacity: map[string]resource.Quantity{ + "cpu": resource.MustParse("200"), + "memory": resource.MustParse("400Gi"), + }, + Allocation: map[string]resource.Quantity{ + "cpu": resource.MustParse("150"), + "memory": resource.MustParse("300Gi"), + }, + Traits: []string{"CUSTOM_HW_SAPPHIRE_RAPIDS"}, + }, + }, + }, + expectedMetrics: map[string][]expectedMetric{ + "cortex_kvm_host_capacity_total": { + { + Labels: metricLabels{ + ComputeHost: "node010-bb100", + Resource: "cpu", + AvailabilityZone: "qa-1a", + BuildingBlock: "bb100", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 100, + }, + { + Labels: metricLabels{ + ComputeHost: "node020-bb200", + Resource: "cpu", + AvailabilityZone: "qa-1b", + BuildingBlock: "bb200", + CPUArchitecture: "sapphire-rapids", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 200, + }, + }, + }, + }, + { + name: "hypervisor with missing allocation data", + hypervisors: []hv1.Hypervisor{ + { + ObjectMeta: v1.ObjectMeta{ + Name: "node004-bb091", + Labels: map[string]string{ + "topology.kubernetes.io/zone": "qa-1d", + }, + }, + Status: hv1.HypervisorStatus{ + Capacity: map[string]resource.Quantity{ + "cpu": resource.MustParse("96"), + "memory": resource.MustParse("384Gi"), + }, + // No Allocation field - simulating missing data + Allocation: nil, + Traits: []string{}, + }, + }, + }, + expectedMetrics: map[string][]expectedMetric{ + "cortex_kvm_host_capacity_total": { + { + Labels: metricLabels{ + ComputeHost: "node004-bb091", + Resource: "cpu", + AvailabilityZone: "qa-1d", + BuildingBlock: "bb091", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 96, + }, + { + Labels: metricLabels{ + ComputeHost: "node004-bb091", + Resource: "ram", + AvailabilityZone: "qa-1d", + BuildingBlock: "bb091", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 412316860416, // 384Gi in bytes + }, + }, + "cortex_kvm_host_capacity_utilized": { + { + Labels: metricLabels{ + ComputeHost: "node004-bb091", + Resource: "cpu", + AvailabilityZone: "qa-1d", + BuildingBlock: "bb091", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 0, // Should be 0 when allocation is missing + }, + { + Labels: metricLabels{ + ComputeHost: "node004-bb091", + Resource: "ram", + AvailabilityZone: "qa-1d", + BuildingBlock: "bb091", + CPUArchitecture: "cascade-lake", + WorkloadType: "general-purpose", + Enabled: "true", + Decommissioned: "false", + ExternalCustomer: "false", + Maintenance: "false", + }, + Value: 0, // Should be 0 when allocation is missing + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + scheme := runtime.NewScheme() + if err := hv1.AddToScheme(scheme); err != nil { + t.Fatalf("failed to add hypervisor scheme: %v", err) + } + + objects := make([]runtime.Object, len(tt.hypervisors)) + for i := range tt.hypervisors { + objects[i] = &tt.hypervisors[i] + } + + client := fake.NewClientBuilder(). + WithScheme(scheme). + WithRuntimeObjects(objects...). + Build() + + kpi := &KVMResourceCapacityKPI{} + if err := kpi.Init(nil, client, conf.NewRawOpts("{}")); err != nil { + t.Fatalf("failed to init KPI: %v", err) + } + + ch := make(chan prometheus.Metric, 1000) + kpi.Collect(ch) + close(ch) + + actualMetrics := make(map[string][]expectedMetric) + for metric := range ch { + var m prometheusgo.Metric + if err := metric.Write(&m); err != nil { + t.Fatalf("failed to write metric: %v", err) + } + + // Extract metric name from description + desc := metric.Desc().String() + metricName := getMetricName(desc) + + // Extract labels + labels := metricLabels{} + for _, label := range m.Label { + switch label.GetName() { + case "compute_host": + labels.ComputeHost = label.GetValue() + case "resource": + labels.Resource = label.GetValue() + case "availability_zone": + labels.AvailabilityZone = label.GetValue() + case "building_block": + labels.BuildingBlock = label.GetValue() + case "cpu_architecture": + labels.CPUArchitecture = label.GetValue() + case "workload_type": + labels.WorkloadType = label.GetValue() + case "enabled": + labels.Enabled = label.GetValue() + case "decommissioned": + labels.Decommissioned = label.GetValue() + case "external_customer": + labels.ExternalCustomer = label.GetValue() + case "maintenance": + labels.Maintenance = label.GetValue() + } + } + + actualMetrics[metricName] = append(actualMetrics[metricName], expectedMetric{ + Labels: labels, + Value: m.GetGauge().GetValue(), + }) + } + + // Verify expected metrics + for metricName, expectedList := range tt.expectedMetrics { + actualList, ok := actualMetrics[metricName] + if !ok { + t.Errorf("metric %q not found in actual metrics", metricName) + continue + } + + for _, expected := range expectedList { + found := false + for _, actual := range actualList { + if actual.Labels == expected.Labels { + found = true + if actual.Value != expected.Value { + t.Errorf("metric %q with labels %+v: expected value %f, got %f", + metricName, expected.Labels, expected.Value, actual.Value) + } + break + } + } + if !found { + t.Errorf("metric %q with labels %+v not found in actual metrics", + metricName, expected.Labels) + } + } + } + }) + } +} diff --git a/internal/knowledge/kpis/plugins/compute/resource_capacity_vmware.go b/internal/knowledge/kpis/plugins/compute/resource_capacity_vmware.go new file mode 100644 index 00000000..46a52d0a --- /dev/null +++ b/internal/knowledge/kpis/plugins/compute/resource_capacity_vmware.go @@ -0,0 +1,195 @@ +// Copyright SAP SE +// SPDX-License-Identifier: Apache-2.0 + +package compute + +import ( + "context" + "log/slog" + "strconv" + + "github.com/cobaltcore-dev/cortex/api/v1alpha1" + "github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins/compute" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/cobaltcore-dev/cortex/internal/knowledge/kpis/plugins" + "github.com/cobaltcore-dev/cortex/pkg/conf" + "github.com/cobaltcore-dev/cortex/pkg/db" + "github.com/prometheus/client_golang/prometheus" +) + +type VMwareResourceCapacityKPI struct { + // Common base for all KPIs that provides standard functionality. + plugins.BaseKPI[struct{}] // No options passed through yaml config + + availableCapacityPerHost *prometheus.Desc + totalCapacityPerHost *prometheus.Desc +} + +func (VMwareResourceCapacityKPI) GetName() string { + return "vmware_host_capacity_kpi" +} + +func (k *VMwareResourceCapacityKPI) Init(db *db.DB, client client.Client, opts conf.RawOpts) error { + if err := k.BaseKPI.Init(db, client, opts); err != nil { + return err + } + k.availableCapacityPerHost = prometheus.NewDesc( + "cortex_vmware_host_capacity_available", + "Available capacity per resource on the hosts currently (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "disabled_reason", + "pinned_projects", + }, + nil, + ) + k.totalCapacityPerHost = prometheus.NewDesc( + "cortex_vmware_host_capacity_total", + "Total resources available on the hosts currently (individually by host).", + []string{ + "compute_host", + "resource", + "availability_zone", + "cpu_architecture", + "workload_type", + "enabled", + "decommissioned", + "external_customer", + "pinned_projects", + }, + nil, + ) + return nil +} + +func (k *VMwareResourceCapacityKPI) Describe(ch chan<- *prometheus.Desc) { + ch <- k.availableCapacityPerHost + ch <- k.totalCapacityPerHost +} + +func (k *VMwareResourceCapacityKPI) Collect(ch chan<- prometheus.Metric) { + hostDetailsKnowledge := &v1alpha1.Knowledge{} + if err := k.Client.Get( + context.Background(), + client.ObjectKey{Name: "host-details"}, + hostDetailsKnowledge, + ); err != nil { + slog.Error("failed to get knowledge host-details", "err", err) + return + } + hostDetails, err := v1alpha1. + UnboxFeatureList[compute.HostDetails](hostDetailsKnowledge.Status.Raw) + if err != nil { + slog.Error("failed to unbox storage pool cpu usage", "err", err) + return + } + detailsByComputeHost := make(map[string]compute.HostDetails) + for _, detail := range hostDetails { + detailsByComputeHost[detail.ComputeHost] = detail + } + + hostUtilizationKnowledge := &v1alpha1.Knowledge{} + if err := k.Client.Get( + context.Background(), + client.ObjectKey{Name: "host-utilization"}, + hostUtilizationKnowledge, + ); err != nil { + slog.Error("failed to get knowledge host-utilization", "err", err) + return + } + hostUtilizations, err := v1alpha1. + UnboxFeatureList[compute.HostUtilization](hostUtilizationKnowledge.Status.Raw) + if err != nil { + slog.Error("failed to unbox host utilization", "err", err) + return + } + + for _, utilization := range hostUtilizations { + detail, exists := detailsByComputeHost[utilization.ComputeHost] + if !exists { + slog.Warn("host_available_capacity: missing host details for compute host", "compute_host", utilization.ComputeHost) + continue + } + if detail.HypervisorType == "ironic" { + continue // Ironic hosts do not run VMs/instances + } + + if detail.HypervisorFamily != "vmware" { + continue + } + + if utilization.TotalRAMAllocatableMB == 0 || utilization.TotalVCPUsAllocatable == 0 || utilization.TotalDiskAllocatableGB == 0 { + slog.Info( + "Skipping host since placement is reporting zero allocatable resources", + "metric", "cortex_available_capacity_per_host", + "host", utilization.ComputeHost, + "cpu", utilization.TotalVCPUsAllocatable, + "ram", utilization.TotalRAMAllocatableMB, + "disk", utilization.TotalDiskAllocatableGB, + ) + continue + } + + availableCPUs := float64(utilization.TotalVCPUsAllocatable - utilization.VCPUsUsed) + availableRAMMB := float64(utilization.TotalRAMAllocatableMB - utilization.RAMUsedMB) + availableDiskGB := float64(utilization.TotalDiskAllocatableGB - utilization.DiskUsedGB) + + k.exportCapacityMetricVMware(ch, "cpu", availableCPUs, utilization.TotalVCPUsAllocatable, detail) + k.exportCapacityMetricVMware(ch, "ram", availableRAMMB, utilization.TotalRAMAllocatableMB, detail) + k.exportCapacityMetricVMware(ch, "disk", availableDiskGB, utilization.TotalDiskAllocatableGB, detail) + } +} + +func (k *VMwareResourceCapacityKPI) exportCapacityMetricVMware(ch chan<- prometheus.Metric, resource string, available, total float64, host compute.HostDetails) { + enabled := strconv.FormatBool(host.Enabled) + decommissioned := strconv.FormatBool(host.Decommissioned) + externalCustomer := strconv.FormatBool(host.ExternalCustomer) + pinnedProjects := "" + if host.PinnedProjects != nil { + pinnedProjects = *host.PinnedProjects + } + + disabledReason := "-" + if host.DisabledReason != nil { + disabledReason = *host.DisabledReason + } + + ch <- prometheus.MustNewConstMetric( + k.availableCapacityPerHost, + prometheus.GaugeValue, + available, + host.ComputeHost, + resource, + host.AvailabilityZone, + host.CPUArchitecture, + host.WorkloadType, + enabled, + decommissioned, + externalCustomer, + disabledReason, + pinnedProjects, + ) + + ch <- prometheus.MustNewConstMetric( + k.totalCapacityPerHost, + prometheus.GaugeValue, + total, + host.ComputeHost, + resource, + host.AvailabilityZone, + host.CPUArchitecture, + host.WorkloadType, + enabled, + decommissioned, + externalCustomer, + pinnedProjects, + ) +} diff --git a/internal/knowledge/kpis/plugins/compute/host_available_capacity_test.go b/internal/knowledge/kpis/plugins/compute/resource_capacity_vmware_test.go similarity index 76% rename from internal/knowledge/kpis/plugins/compute/host_available_capacity_test.go rename to internal/knowledge/kpis/plugins/compute/resource_capacity_vmware_test.go index 92a3074c..d76053d7 100644 --- a/internal/knowledge/kpis/plugins/compute/host_available_capacity_test.go +++ b/internal/knowledge/kpis/plugins/compute/resource_capacity_vmware_test.go @@ -18,8 +18,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/fake" ) -func TestHostAvailableCapacityKPI_Init(t *testing.T) { - kpi := &HostAvailableCapacityKPI{} +func TestVMwareResourceCapacityKPI_Init(t *testing.T) { + kpi := &VMwareResourceCapacityKPI{} if err := kpi.Init(nil, nil, conf.NewRawOpts("{}")); err != nil { t.Fatalf("expected no error, got %v", err) } @@ -35,7 +35,7 @@ func getMetricName(desc string) string { return "" } -func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { +func TestVMwareResourceCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { scheme, err := v1alpha1.SchemeBuilder.Build() if err != nil { t.Fatalf("expected no error, got %v", err) @@ -55,6 +55,7 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { DisabledReason: nil, PinnedProjects: nil, }, + // Skip this because it's not a VMware host &compute.HostDetails{ ComputeHost: "kvm-host", AvailabilityZone: "az2", @@ -70,11 +71,11 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { }, // Skip this because placement doesn't report any capacity for this host &compute.HostDetails{ - ComputeHost: "kvm-host-2", + ComputeHost: "vmware-host-2", AvailabilityZone: "az2", CPUArchitecture: "cascade-lake", HypervisorType: "qemu", - HypervisorFamily: "kvm", + HypervisorFamily: "vmware", WorkloadType: "hana", Enabled: false, Decommissioned: false, @@ -82,12 +83,13 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { DisabledReason: testlib.Ptr("test"), PinnedProjects: testlib.Ptr("project1,project2"), }, + // Skip this because it's a ironic host &compute.HostDetails{ ComputeHost: "ironic-host", AvailabilityZone: "az2", CPUArchitecture: "cascade-lake", HypervisorType: "ironic", - HypervisorFamily: "kvm", + HypervisorFamily: "vmware", WorkloadType: "hana", Enabled: false, Decommissioned: false, @@ -134,7 +136,7 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { t.Fatalf("expected no error, got %v", err) } - kpi := &HostAvailableCapacityKPI{} + kpi := &VMwareResourceCapacityKPI{} client := fake.NewClientBuilder(). WithScheme(scheme). WithRuntimeObjects(&v1alpha1.Knowledge{ @@ -162,7 +164,6 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { ExternalCustomer string CPUArchitecture string WorkloadType string - HypervisorFamily string DisabledReason string PinnedProjects string Value float64 @@ -174,8 +175,8 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { desc := metric.Desc().String() metricName := getMetricName(desc) - // Only consider cortex_available_capacity_per_host metric in this test - if metricName != "cortex_available_capacity_per_host" { + // Only consider cortex_vmware_host_capacity_available metric in this test + if metricName != "cortex_vmware_host_capacity_available" { continue } @@ -200,7 +201,6 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { ExternalCustomer: labels["external_customer"], CPUArchitecture: labels["cpu_architecture"], WorkloadType: labels["workload_type"], - HypervisorFamily: labels["hypervisor_family"], DisabledReason: labels["disabled_reason"], PinnedProjects: labels["pinned_projects"], Value: m.GetGauge().GetValue(), @@ -217,7 +217,6 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { ExternalCustomer: "true", CPUArchitecture: "cascade-lake", WorkloadType: "general-purpose", - HypervisorFamily: "vmware", DisabledReason: "-", PinnedProjects: "", Value: 60, // 100 - 40 @@ -231,7 +230,6 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { ExternalCustomer: "true", CPUArchitecture: "cascade-lake", WorkloadType: "general-purpose", - HypervisorFamily: "vmware", DisabledReason: "-", PinnedProjects: "", Value: 160, // 200 - 40 @@ -245,53 +243,10 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { ExternalCustomer: "true", CPUArchitecture: "cascade-lake", WorkloadType: "general-purpose", - HypervisorFamily: "vmware", DisabledReason: "-", PinnedProjects: "", Value: 260, // 300 - 40 }, - "kvm-host-cpu": { - ComputeHost: "kvm-host", - Resource: "cpu", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - DisabledReason: "test", - PinnedProjects: "project1,project2", - Value: 25, // 100 - 75 - }, - "kvm-host-ram": { - ComputeHost: "kvm-host", - Resource: "ram", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - DisabledReason: "test", - PinnedProjects: "project1,project2", - Value: 20, // 100 - 80 - }, - "kvm-host-disk": { - ComputeHost: "kvm-host", - Resource: "disk", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - DisabledReason: "test", - PinnedProjects: "project1,project2", - Value: 15, // 100 - 85 - }, } if len(expectedMetrics) != len(actualMetrics) { @@ -311,7 +266,7 @@ func TestHostAvailableCapacityKPI_Collect_AbsoluteMetric(t *testing.T) { } } -func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { +func TestVMwareResourceCapacityKPI_Collect_TotalMetric(t *testing.T) { scheme, err := v1alpha1.SchemeBuilder.Build() if err != nil { t.Fatalf("expected no error, got %v", err) @@ -331,6 +286,7 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { DisabledReason: nil, PinnedProjects: nil, }, + // Skip this because it's not a VMware host &compute.HostDetails{ ComputeHost: "kvm-host", AvailabilityZone: "az2", @@ -341,35 +297,36 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { Enabled: false, Decommissioned: false, ExternalCustomer: false, - DisabledReason: testlib.Ptr("external customer"), + DisabledReason: testlib.Ptr("test"), PinnedProjects: testlib.Ptr("project1,project2"), }, // Skip this because placement doesn't report any capacity for this host &compute.HostDetails{ - ComputeHost: "kvm-host-2", + ComputeHost: "vmware-host-2", AvailabilityZone: "az2", CPUArchitecture: "cascade-lake", HypervisorType: "qemu", - HypervisorFamily: "kvm", + HypervisorFamily: "vmware", WorkloadType: "hana", Enabled: false, Decommissioned: false, ExternalCustomer: false, - DisabledReason: testlib.Ptr("external customer"), + DisabledReason: testlib.Ptr("test"), PinnedProjects: testlib.Ptr("project1,project2"), }, + // Skip this because it's a ironic host &compute.HostDetails{ ComputeHost: "ironic-host", AvailabilityZone: "az2", CPUArchitecture: "cascade-lake", HypervisorType: "ironic", - HypervisorFamily: "kvm", + HypervisorFamily: "vmware", WorkloadType: "hana", Enabled: false, Decommissioned: false, ExternalCustomer: false, + DisabledReason: testlib.Ptr("test"), PinnedProjects: testlib.Ptr("project1"), - DisabledReason: testlib.Ptr("external customer"), }, }) if err != nil { @@ -383,8 +340,8 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { TotalRAMAllocatableMB: 200, TotalDiskAllocatableGB: 300, VCPUsUsed: 40, - RAMUsedMB: 100, - DiskUsedGB: 150, + RAMUsedMB: 40, + DiskUsedGB: 40, }, &compute.HostUtilization{ ComputeHost: "kvm-host", @@ -410,7 +367,7 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { t.Fatalf("expected no error, got %v", err) } - kpi := &HostAvailableCapacityKPI{} + kpi := &VMwareResourceCapacityKPI{} client := fake.NewClientBuilder(). WithScheme(scheme). WithRuntimeObjects(&v1alpha1.Knowledge{ @@ -438,8 +395,7 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { ExternalCustomer string CPUArchitecture string WorkloadType string - HypervisorFamily string - DisabledReason string + PinnedProjects string Value float64 } @@ -449,8 +405,8 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { desc := metric.Desc().String() metricName := getMetricName(desc) - // Only consider cortex_available_capacity_per_host_pct metric in this test - if metricName != "cortex_available_capacity_per_host_pct" { + // Only consider cortex_vmware_host_capacity_total metric in this test + if metricName != "cortex_vmware_host_capacity_total" { continue } @@ -475,8 +431,7 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { ExternalCustomer: labels["external_customer"], CPUArchitecture: labels["cpu_architecture"], WorkloadType: labels["workload_type"], - HypervisorFamily: labels["hypervisor_family"], - DisabledReason: labels["disabled_reason"], + PinnedProjects: labels["pinned_projects"], Value: m.GetGauge().GetValue(), } } @@ -491,9 +446,8 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { ExternalCustomer: "true", CPUArchitecture: "cascade-lake", WorkloadType: "general-purpose", - HypervisorFamily: "vmware", - DisabledReason: "-", - Value: 60, // (100 - 40) / 100 * 100 + PinnedProjects: "", + Value: 100, }, "vmware-host-ram": { ComputeHost: "vmware-host", @@ -504,9 +458,8 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { ExternalCustomer: "true", CPUArchitecture: "cascade-lake", WorkloadType: "general-purpose", - HypervisorFamily: "vmware", - DisabledReason: "-", - Value: 50, // (200 - 100) / 200 * 100 + PinnedProjects: "", + Value: 200, }, "vmware-host-disk": { ComputeHost: "vmware-host", @@ -517,48 +470,8 @@ func TestHostAvailableCapacityKPI_Collect_PctMetric(t *testing.T) { ExternalCustomer: "true", CPUArchitecture: "cascade-lake", WorkloadType: "general-purpose", - HypervisorFamily: "vmware", - DisabledReason: "-", - Value: 50, // (300 - 150) / 300 * 100 - }, - "kvm-host-cpu": { - ComputeHost: "kvm-host", - Resource: "cpu", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - DisabledReason: "external customer", - Value: 25, // (100 - 75) / 100 * 100 - }, - "kvm-host-ram": { - ComputeHost: "kvm-host", - Resource: "ram", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - DisabledReason: "external customer", - Value: 20, // (100 - 80) / 100 * 100 - }, - "kvm-host-disk": { - ComputeHost: "kvm-host", - Resource: "disk", - AvailabilityZone: "az2", - Enabled: "false", - Decommissioned: "false", - ExternalCustomer: "false", - CPUArchitecture: "cascade-lake", - WorkloadType: "hana", - HypervisorFamily: "kvm", - DisabledReason: "external customer", - Value: 15, // (100 - 85) / 100 * 100 + PinnedProjects: "", + Value: 300, }, } diff --git a/internal/knowledge/kpis/supported_kpis.go b/internal/knowledge/kpis/supported_kpis.go index f98c8683..274c5ace 100644 --- a/internal/knowledge/kpis/supported_kpis.go +++ b/internal/knowledge/kpis/supported_kpis.go @@ -12,16 +12,15 @@ import ( // Configuration of supported kpis. var supportedKPIs = map[string]plugins.KPI{ - "kvm_host_capacity_kpi": &compute.HostCapacityKPI{}, - "vmware_host_contention_kpi": &compute.VMwareHostContentionKPI{}, - "vmware_project_noisiness_kpi": &compute.VMwareProjectNoisinessKPI{}, - "host_total_allocatable_capacity_kpi": &compute.HostTotalAllocatableCapacityKPI{}, - "host_capacity_kpi": &compute.HostAvailableCapacityKPI{}, - "host_running_vms_kpi": &compute.HostRunningVMsKPI{}, - "flavor_running_vms_kpi": &compute.FlavorRunningVMsKPI{}, - "vm_migration_statistics_kpi": &compute.VMMigrationStatisticsKPI{}, - "vm_life_span_kpi": &compute.VMLifeSpanKPI{}, - "vm_commitments_kpi": &compute.VMCommitmentsKPI{}, + "kvm_host_capacity_kpi": &compute.KVMResourceCapacityKPI{}, + "vmware_host_contention_kpi": &compute.VMwareHostContentionKPI{}, + "vmware_project_noisiness_kpi": &compute.VMwareProjectNoisinessKPI{}, + "vmware_host_capacity_kpi": &compute.VMwareResourceCapacityKPI{}, + "host_running_vms_kpi": &compute.HostRunningVMsKPI{}, + "flavor_running_vms_kpi": &compute.FlavorRunningVMsKPI{}, + "vm_migration_statistics_kpi": &compute.VMMigrationStatisticsKPI{}, + "vm_life_span_kpi": &compute.VMLifeSpanKPI{}, + "vm_commitments_kpi": &compute.VMCommitmentsKPI{}, "netapp_storage_pool_cpu_usage_kpi": &storage.NetAppStoragePoolCPUUsageKPI{}, diff --git a/tools/plutono/provisioning/dashboards/cortex-infrastructure-compute-global.json b/tools/plutono/provisioning/dashboards/cortex-compute-global.json similarity index 99% rename from tools/plutono/provisioning/dashboards/cortex-infrastructure-compute-global.json rename to tools/plutono/provisioning/dashboards/cortex-compute-global.json index 4615a199..99e7c40c 100644 --- a/tools/plutono/provisioning/dashboards/cortex-infrastructure-compute-global.json +++ b/tools/plutono/provisioning/dashboards/cortex-compute-global.json @@ -465,6 +465,6 @@ "timepicker": {}, "timezone": "", "title": "Global Cortex Infrastructure Dashboard - Compute", - "uid": "global-cortex-infrastructure-dashboard", + "uid": "global-cortex-infrastructure", "version": 7 } \ No newline at end of file diff --git a/tools/plutono/provisioning/dashboards/cortex-infrastructure-compute-global.json.license b/tools/plutono/provisioning/dashboards/cortex-compute-global.json.license similarity index 100% rename from tools/plutono/provisioning/dashboards/cortex-infrastructure-compute-global.json.license rename to tools/plutono/provisioning/dashboards/cortex-compute-global.json.license diff --git a/tools/plutono/provisioning/dashboards/cortex-compute-kvm-overview.json b/tools/plutono/provisioning/dashboards/cortex-compute-kvm-overview.json new file mode 100644 index 00000000..aac1741b --- /dev/null +++ b/tools/plutono/provisioning/dashboards/cortex-compute-kvm-overview.json @@ -0,0 +1,2429 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Plutono --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "iteration": 1767868544196, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "percentunit" + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 308, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "interval": "", + "legendFormat": "Available CPU", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Available RAM", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Available Disk", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Total CPU", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Total RAM", + "refId": "E" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Total Disk", + "refId": "F" + } + ], + "thresholds": [ + { + "$$hashKey": "object:3290", + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 0.2, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Capacity over time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available CPU (%)", + "binary": { + "left": "Available CPU", + "operator": "/", + "reducer": "sum", + "right": "Total CPU" + }, + "mode": "binary", + "reduce": { + "include": [ + "cortex_kvm_host_capacity_payg{availability_zone=\"qa-de-1b\", building_block=\"bb086\", component=\"nova-knowledge\", compute_host=\"node006-bb086\", container=\"manager\", cpu_architecture=\"sapphire-rapids\", decommissioned=\"false\", enabled=\"false\", endpoint=\"metrics\", external_customer=\"false\", github_org=\"cobaltcore-dev\", github_repo=\"cortex\", instance=\"10.1.51.29:2112\", job=\"cortex-nova-metrics\", namespace=\"default\", pod=\"cortex-nova-knowledge-controller-manager-686b8b5cd9-4g2hf\", resource=\"cpu\", service=\"cortex-nova-metrics\", workload_type=\"hana\"}" + ], + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Available RAM (%)", + "binary": { + "left": "Available RAM", + "operator": "/", + "reducer": "sum", + "right": "Total RAM" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Available Disk (%)", + "binary": { + "left": "Available Disk", + "operator": "/", + "reducer": "sum", + "right": "Total Disk" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Available CPU": true, + "Available Disk": true, + "Available RAM": true, + "Total CPU": true, + "Total Disk": true, + "Total RAM": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:3187", + "format": "percentunit", + "label": null, + "logBase": 1, + "max": "1", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:3188", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 12 + }, + "id": 294, + "options": { + "content": "

CPU

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 8, + "y": 12 + }, + "id": 295, + "options": { + "content": "

RAM

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 12 + }, + "id": 293, + "options": { + "content": "

Disk

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 14 + }, + "id": 302, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_utilized{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_failover{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_reserved{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "mbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 14 + }, + "id": 309, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_utilized{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_failover{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_reserved{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "gbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 14 + }, + "id": 310, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_utilized{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_failover{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(max(cortex_kvm_host_capacity_reserved{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 22 + }, + "hiddenSeries": false, + "id": 281, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1091", + "alias": "/.*/", + "color": "#73BF69" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "max(cortex_kvm_host_capacity_payg{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host)", + "instant": true, + "interval": "", + "legendFormat": "{{compute_host}}", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Available per Host", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "total" + ] + }, + "yaxes": [ + { + "$$hashKey": "object:636", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "-10", + "show": true + }, + { + "$$hashKey": "object:637", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "mbytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 22 + }, + "hiddenSeries": false, + "id": 305, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1091", + "alias": "/.*/", + "color": "#73BF69" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "max(cortex_kvm_host_capacity_payg{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host)", + "instant": true, + "interval": "", + "legendFormat": "{{compute_host}}", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "thresholds": [ + { + "$$hashKey": "object:83", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#8AB8FF", + "op": "lt", + "value": 2097152, + "yaxis": "left" + }, + { + "$$hashKey": "object:91", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#3274D9", + "op": "lt", + "value": 3145728, + "yaxis": "left" + }, + { + "$$hashKey": "object:98", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#C0D8FF", + "op": "lt", + "value": 1048576, + "yaxis": "left" + }, + { + "$$hashKey": "object:106", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "rgba(31, 96, 196, 0.6)", + "op": "lt", + "value": 4194304, + "yaxis": "left" + }, + { + "$$hashKey": "object:201", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#E02F44", + "op": "lt", + "value": 6291456, + "yaxis": "left" + }, + { + "$$hashKey": "object:212", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#C4162A", + "op": "lt", + "value": 8388608, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Available per Host", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "total" + ] + }, + "yaxes": [ + { + "$$hashKey": "object:636", + "format": "mbytes", + "label": null, + "logBase": 1, + "max": "12582912", + "min": "-10", + "show": true + }, + { + "$$hashKey": "object:637", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "description": "", + "fieldConfig": { + "defaults": { + "unit": "gbytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 22 + }, + "hiddenSeries": false, + "id": 306, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:1091", + "alias": "/.*/", + "color": "#73BF69" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "max(cortex_kvm_host_capacity_payg{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host)", + "instant": true, + "interval": "", + "legendFormat": "{{compute_host}}", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Available per Host", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": false, + "values": [ + "total" + ] + }, + "yaxes": [ + { + "$$hashKey": "object:636", + "format": "gbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "-10", + "show": true + }, + { + "$$hashKey": "object:637", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 291, + "panels": [], + "repeat": null, + "title": "$nodes", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 31 + }, + "id": 289, + "options": { + "content": "

CPU

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 8, + "y": 31 + }, + "id": 292, + "options": { + "content": "

RAM

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 31 + }, + "id": 296, + "options": { + "content": "

Disk

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 2, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:172", + "alias": "PAYG", + "color": "rgba(115, 191, 105, 0.46)" + }, + { + "$$hashKey": "object:305", + "alias": "Workload", + "color": "#8F3BB8" + }, + { + "$$hashKey": "object:313", + "alias": "Failover", + "color": "#FF7383" + }, + { + "$$hashKey": "object:321", + "alias": "Reservations", + "color": "#5794F2" + }, + { + "$$hashKey": "object:355", + "alias": "Total", + "dashes": true, + "fill": 0, + "lines": true, + "linewidth": 3, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reservations", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "PAYG", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": null, + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:83", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:84", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 4, + "y": 33 + }, + "id": 287, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "mbytes" + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 4, + "x": 8, + "y": 33 + }, + "hiddenSeries": false, + "id": 298, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:172", + "alias": "PAYG", + "color": "rgba(115, 191, 105, 0.46)" + }, + { + "$$hashKey": "object:305", + "alias": "Workload", + "color": "#8F3BB8" + }, + { + "$$hashKey": "object:313", + "alias": "Failover", + "color": "#FF7383" + }, + { + "$$hashKey": "object:321", + "alias": "Reservations", + "color": "#5794F2" + }, + { + "$$hashKey": "object:355", + "alias": "Total", + "dashes": true, + "fill": 0, + "lines": true, + "linewidth": 3, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reservations", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "PAYG", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": null, + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:83", + "format": "mbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:84", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "mbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 12, + "y": 33 + }, + "id": 297, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "gbytes" + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 4, + "x": 16, + "y": 33 + }, + "hiddenSeries": false, + "id": 300, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:172", + "alias": "PAYG", + "color": "rgba(115, 191, 105, 0.46)" + }, + { + "$$hashKey": "object:305", + "alias": "Workload", + "color": "#8F3BB8" + }, + { + "$$hashKey": "object:313", + "alias": "Failover", + "color": "#FF7383" + }, + { + "$$hashKey": "object:321", + "alias": "Reservations", + "color": "#5794F2" + }, + { + "$$hashKey": "object:355", + "alias": "Total", + "dashes": true, + "fill": 0, + "lines": true, + "linewidth": 3, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"disk\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reservations", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "PAYG", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": null, + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:83", + "format": "gbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:84", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "gbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 20, + "y": 33 + }, + "id": 299, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"disk\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + } + ], + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus-openstack", + "definition": "label_values(cortex_kvm_host_capacity_utilized, availability_zone)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Availability Zone", + "multi": true, + "name": "availability_zone", + "options": [], + "query": { + "query": "label_values(cortex_kvm_host_capacity_utilized, availability_zone)", + "refId": "prometheus-openstack-availability_zone-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus-openstack", + "definition": "label_values(cortex_kvm_host_capacity_utilized, building_block)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Building Block", + "multi": true, + "name": "building_block", + "options": [], + "query": { + "query": "label_values(cortex_kvm_host_capacity_utilized, building_block)", + "refId": "prometheus-openstack-building_block-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "prometheus-openstack", + "definition": "label_values(cortex_kvm_host_capacity_utilized, enabled)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Enabled", + "multi": false, + "name": "enabled", + "options": [], + "query": { + "query": "label_values(cortex_kvm_host_capacity_utilized, enabled)", + "refId": "prometheus-openstack-enabled-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus-openstack", + "definition": "label_values(cortex_kvm_host_capacity_utilized, compute_host)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Nodes", + "multi": true, + "name": "nodes", + "options": [], + "query": { + "query": "label_values(cortex_kvm_host_capacity_utilized{building_block=~\"$building_block\",enabled=~\"$enabled\"}, compute_host)", + "refId": "prometheus-openstack-nodes-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-14d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Cortex KVM Infrastructure - Compute", + "uid": "cortex-kvm-infrastructure-compute", + "version": 1 +} \ No newline at end of file diff --git a/tools/plutono/provisioning/dashboards/cortex-kvm-compute.json b/tools/plutono/provisioning/dashboards/cortex-compute-kvm.json similarity index 50% rename from tools/plutono/provisioning/dashboards/cortex-kvm-compute.json rename to tools/plutono/provisioning/dashboards/cortex-compute-kvm.json index 2d2217bd..74ab176f 100644 --- a/tools/plutono/provisioning/dashboards/cortex-kvm-compute.json +++ b/tools/plutono/provisioning/dashboards/cortex-compute-kvm.json @@ -15,8 +15,7 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 12, - "iteration": 1765355318435, + "iteration": 1767868544196, "links": [], "panels": [ { @@ -57,7 +56,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -68,7 +67,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "interval": "", "legendFormat": "Available CPU", "queryType": "randomWalk", @@ -76,7 +75,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Available RAM", @@ -84,7 +83,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\"})", + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Available Disk", @@ -92,7 +91,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Total CPU", @@ -100,7 +99,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Total RAM", @@ -108,7 +107,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\"})", + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Total Disk", @@ -163,7 +162,7 @@ "left": "Available RAM", "operator": "/", "reducer": "sum", - "right": "Available RAM" + "right": "Total RAM" }, "mode": "binary", "reduce": { @@ -179,7 +178,7 @@ "left": "Available Disk", "operator": "/", "reducer": "sum", - "right": "Available Disk" + "right": "Total Disk" }, "mode": "binary", "reduce": { @@ -217,7 +216,7 @@ "format": "percentunit", "label": null, "logBase": 1, - "max": null, + "max": "1", "min": "0", "show": true }, @@ -253,7 +252,7 @@ "content": "

CPU

", "mode": "markdown" }, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "targets": [ { "queryType": "randomWalk", @@ -281,7 +280,7 @@ "content": "

RAM

", "mode": "markdown" }, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "targets": [ { "queryType": "randomWalk", @@ -309,7 +308,7 @@ "content": "

Disk

", "mode": "markdown" }, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "targets": [ { "queryType": "randomWalk", @@ -396,11 +395,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_utilized{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "interval": "", "legendFormat": "Workload", "queryType": "randomWalk", @@ -408,7 +407,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_failover{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Failover", @@ -416,7 +415,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Available", @@ -424,7 +423,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Total", @@ -432,7 +431,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\"})", + "expr": "sum(max(cortex_kvm_host_capacity_reserved{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Reserved", @@ -539,7 +538,7 @@ "x": 8, "y": 14 }, - "id": 303, + "id": 309, "options": { "colorMode": "background", "graphMode": "none", @@ -555,11 +554,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_utilized{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "interval": "", "legendFormat": "Workload", "queryType": "randomWalk", @@ -567,7 +566,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_failover{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Failover", @@ -575,7 +574,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Available", @@ -583,7 +582,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Total", @@ -591,7 +590,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_reserved{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Reserved", @@ -698,7 +697,7 @@ "x": 16, "y": 14 }, - "id": 304, + "id": 310, "options": { "colorMode": "background", "graphMode": "none", @@ -714,11 +713,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_utilized{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "interval": "", "legendFormat": "Workload", "queryType": "randomWalk", @@ -726,7 +725,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_failover{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Failover", @@ -734,7 +733,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_payg{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Available", @@ -742,7 +741,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_total{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Total", @@ -750,7 +749,7 @@ }, { "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\"})", + "expr": "sum(max(cortex_kvm_host_capacity_reserved{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host))", "hide": false, "interval": "", "legendFormat": "Reserved", @@ -833,7 +832,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -850,10 +849,10 @@ "targets": [ { "exemplar": true, - "expr": "cortex_kvm_host_capacity_payg{resource=\"cpu\"}", + "expr": "max(cortex_kvm_host_capacity_payg{resource=\"cpu\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host)", "instant": true, "interval": "", - "legendFormat": "{{compute_host}} payg", + "legendFormat": "{{compute_host}}", "queryType": "randomWalk", "refId": "A" }, @@ -950,7 +949,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -967,7 +966,7 @@ "targets": [ { "exemplar": true, - "expr": "cortex_kvm_host_capacity_payg{resource=\"ram\"}", + "expr": "max(cortex_kvm_host_capacity_payg{resource=\"ram\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host)", "instant": true, "interval": "", "legendFormat": "{{compute_host}}", @@ -984,7 +983,74 @@ "refId": "B" } ], - "thresholds": [], + "thresholds": [ + { + "$$hashKey": "object:83", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#8AB8FF", + "op": "lt", + "value": 2097152, + "yaxis": "left" + }, + { + "$$hashKey": "object:91", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#3274D9", + "op": "lt", + "value": 3145728, + "yaxis": "left" + }, + { + "$$hashKey": "object:98", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#C0D8FF", + "op": "lt", + "value": 1048576, + "yaxis": "left" + }, + { + "$$hashKey": "object:106", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "rgba(31, 96, 196, 0.6)", + "op": "lt", + "value": 4194304, + "yaxis": "left" + }, + { + "$$hashKey": "object:201", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#E02F44", + "op": "lt", + "value": 6291456, + "yaxis": "left" + }, + { + "$$hashKey": "object:212", + "colorMode": "custom", + "fill": false, + "fillColor": "rgba(51, 162, 229, 0.2)", + "line": true, + "lineColor": "#C4162A", + "op": "lt", + "value": 8388608, + "yaxis": "left" + } + ], "timeFrom": null, "timeRegions": [], "timeShift": null, @@ -1010,7 +1076,7 @@ "format": "mbytes", "label": null, "logBase": 1, - "max": null, + "max": "12582912", "min": "-10", "show": true }, @@ -1068,7 +1134,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.37", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -1085,7 +1151,7 @@ "targets": [ { "exemplar": true, - "expr": "cortex_kvm_host_capacity_payg{resource=\"disk\"}", + "expr": "max(cortex_kvm_host_capacity_payg{resource=\"disk\",building_block=~\"$building_block\",enabled=~\"$enabled\",compute_host=~\"$nodes\"}) by (compute_host)", "instant": true, "interval": "", "legendFormat": "{{compute_host}}", @@ -1157,1056 +1223,1055 @@ "y": 30 }, "id": 291, - "panels": [ + "panels": [], + "repeat": "nodes", + "title": "$nodes", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 0, + "y": 31 + }, + "id": 289, + "options": { + "content": "

CPU

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ { - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 31 - }, - "id": 289, - "options": { - "content": "

CPU

", - "mode": "markdown" - }, - "pluginVersion": "7.5.37", - "targets": [ - { - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "type": "text" + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 8, + "y": 31 + }, + "id": 292, + "options": { + "content": "

RAM

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 8, + "x": 16, + "y": 31 + }, + "id": 296, + "options": { + "content": "

Disk

", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 2, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:172", + "alias": "PAYG", + "color": "rgba(115, 191, 105, 0.46)" }, { - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 31 - }, - "id": 292, - "options": { - "content": "

RAM

", - "mode": "markdown" - }, - "pluginVersion": "7.5.37", - "targets": [ - { - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "type": "text" + "$$hashKey": "object:305", + "alias": "Workload", + "color": "#8F3BB8" }, { - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 31 - }, - "id": 296, - "options": { - "content": "

Disk

", - "mode": "markdown" - }, - "pluginVersion": "7.5.37", - "targets": [ - { - "queryType": "randomWalk", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus-openstack", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 10, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 4, - "x": 0, - "y": 33 - }, - "hiddenSeries": false, - "id": 2, - "interval": "5m", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": null, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.37", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:172", - "alias": "PAYG", - "color": "rgba(115, 191, 105, 0.46)" - }, - { - "$$hashKey": "object:305", - "alias": "Workload", - "color": "#8F3BB8" - }, - { - "$$hashKey": "object:313", - "alias": "Failover", - "color": "#FF7383" - }, - { - "$$hashKey": "object:321", - "alias": "Reservations", - "color": "#5794F2" - }, - { - "$$hashKey": "object:355", - "alias": "Total", - "dashes": true, - "fill": 0, - "lines": true, - "linewidth": 3, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\",compute_host=\"$nodes\"})", - "interval": "", - "legendFormat": "Workload", - "queryType": "randomWalk", - "refId": "A" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Reservations", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Failover", - "refId": "C" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "PAYG", - "refId": "D" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": "1h", - "timeRegions": [], - "timeShift": null, - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:83", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:84", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "$$hashKey": "object:313", + "alias": "Failover", + "color": "#FF7383" }, { - "datasource": "prometheus-openstack", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(115, 191, 105, 0)", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Available (%)" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "yellow", - "value": 0.2 - }, - { - "color": "green", - "value": 0.3 - } - ] - } - }, - { - "id": "unit", - "value": "percentunit" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 4, - "x": 4, - "y": 33 - }, - "id": 287, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.37", - "targets": [ - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\",compute_host=\"$nodes\"})", - "interval": "", - "legendFormat": "Workload", - "queryType": "randomWalk", - "refId": "A" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Failover", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Available", - "refId": "C" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "D" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "E" - } - ], - "timeFrom": null, - "timeShift": null, - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Available (%)", - "binary": { - "left": "Available", - "operator": "/", - "reducer": "sum", - "right": "Total" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true - }, - "indexByName": { - "Available": 1, - "Available (%)": 0, - "Failover": 5, - "Reserved": 6, - "Time": 3, - "Total": 2, - "Workload": 4 - }, - "renameByName": {} - } - } - ], - "type": "stat" + "$$hashKey": "object:321", + "alias": "Reservations", + "color": "#5794F2" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus-openstack", - "fieldConfig": { - "defaults": { - "unit": "mbytes" - }, - "overrides": [] - }, - "fill": 10, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 4, - "x": 8, - "y": 33 - }, - "hiddenSeries": false, - "id": 298, - "interval": "5m", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, + "$$hashKey": "object:355", + "alias": "Total", + "dashes": true, + "fill": 0, "lines": true, - "linewidth": 1, - "maxDataPoints": null, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.37", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:172", - "alias": "PAYG", - "color": "rgba(115, 191, 105, 0.46)" - }, - { - "$$hashKey": "object:305", - "alias": "Workload", - "color": "#8F3BB8" - }, - { - "$$hashKey": "object:313", - "alias": "Failover", - "color": "#FF7383" - }, - { - "$$hashKey": "object:321", - "alias": "Reservations", - "color": "#5794F2" - }, - { - "$$hashKey": "object:355", - "alias": "Total", - "dashes": true, - "fill": 0, - "lines": true, - "linewidth": 3, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\",compute_host=\"$nodes\"})", - "interval": "", - "legendFormat": "Workload", - "queryType": "randomWalk", - "refId": "A" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Reservations", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Failover", - "refId": "C" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "PAYG", - "refId": "D" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": "1h", - "timeRegions": [], - "timeShift": null, - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:83", - "format": "mbytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:84", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "linewidth": 3, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" }, { - "datasource": "prometheus-openstack", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(115, 191, 105, 0)", - "value": null - } - ] - }, - "unit": "mbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Available (%)" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "yellow", - "value": 0.2 - }, - { - "color": "green", - "value": 0.3 - } - ] - } - }, - { - "id": "unit", - "value": "percentunit" - } - ] + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reservations", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "PAYG", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": null, + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:83", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:84", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 4, + "y": 33 + }, + "id": 287, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"cpu\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"cpu\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "mbytes" + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 4, + "x": 8, + "y": 33 + }, + "hiddenSeries": false, + "id": 298, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:172", + "alias": "PAYG", + "color": "rgba(115, 191, 105, 0.46)" + }, + { + "$$hashKey": "object:305", + "alias": "Workload", + "color": "#8F3BB8" + }, + { + "$$hashKey": "object:313", + "alias": "Failover", + "color": "#FF7383" + }, + { + "$$hashKey": "object:321", + "alias": "Reservations", + "color": "#5794F2" + }, + { + "$$hashKey": "object:355", + "alias": "Total", + "dashes": true, + "fill": 0, + "lines": true, + "linewidth": 3, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reservations", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "PAYG", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": null, + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:83", + "format": "mbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:84", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null + } + ] + }, + "unit": "mbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] + } + }, + { + "id": "unit", + "value": "percentunit" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 12, + "y": 33 + }, + "id": 297, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "gbytes" + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 4, + "x": 16, + "y": 33 + }, + "hiddenSeries": false, + "id": 300, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.45", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:172", + "alias": "PAYG", + "color": "rgba(115, 191, 105, 0.46)" + }, + { + "$$hashKey": "object:305", + "alias": "Workload", + "color": "#8F3BB8" + }, + { + "$$hashKey": "object:313", + "alias": "Failover", + "color": "#FF7383" + }, + { + "$$hashKey": "object:321", + "alias": "Reservations", + "color": "#5794F2" + }, + { + "$$hashKey": "object:355", + "alias": "Total", + "dashes": true, + "fill": 0, + "lines": true, + "linewidth": 3, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"disk\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reservations", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "PAYG", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": null, + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": false, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:83", + "format": "gbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:84", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(115, 191, 105, 0)", + "value": null } ] }, - "gridPos": { - "h": 9, - "w": 4, - "x": 12, - "y": 33 - }, - "id": 297, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.37", - "targets": [ - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"ram\",compute_host=\"$nodes\"})", - "interval": "", - "legendFormat": "Workload", - "queryType": "randomWalk", - "refId": "A" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Failover", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Available", - "refId": "C" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "D" + "unit": "gbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Available (%)" }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"ram\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "E" - } - ], - "timeFrom": null, - "timeShift": null, - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Available (%)", - "binary": { - "left": "Available", - "operator": "/", - "reducer": "sum", - "right": "Total" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 0.2 + }, + { + "color": "green", + "value": 0.3 + } + ] } + }, + { + "id": "unit", + "value": "percentunit" } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true - }, - "indexByName": { - "Available": 1, - "Available (%)": 0, - "Failover": 5, - "Reserved": 6, - "Time": 3, - "Total": 2, - "Workload": 4 - }, - "renameByName": {} - } - } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 20, + "y": 33 + }, + "id": 299, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "stat" + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"disk\",compute_host=\"$nodes\"})", + "interval": "", + "legendFormat": "Workload", + "queryType": "randomWalk", + "refId": "A" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "prometheus-openstack", - "fieldConfig": { - "defaults": { - "unit": "gbytes" - }, - "overrides": [] - }, - "fill": 10, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 4, - "x": 16, - "y": 33 - }, - "hiddenSeries": false, - "id": 300, - "interval": "5m", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": null, - "nullPointMode": "null", + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Failover", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "C" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Total", + "refId": "D" + }, + { + "exemplar": true, + "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"disk\",compute_host=\"$nodes\"})", + "hide": false, + "interval": "", + "legendFormat": "Reserved", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "transformations": [ + { + "id": "calculateField", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.37", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:172", - "alias": "PAYG", - "color": "rgba(115, 191, 105, 0.46)" - }, - { - "$$hashKey": "object:305", - "alias": "Workload", - "color": "#8F3BB8" - }, - { - "$$hashKey": "object:313", - "alias": "Failover", - "color": "#FF7383" - }, - { - "$$hashKey": "object:321", - "alias": "Reservations", - "color": "#5794F2" - }, - { - "$$hashKey": "object:355", - "alias": "Total", - "dashes": true, - "fill": 0, - "lines": true, - "linewidth": 3, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"disk\",compute_host=\"$nodes\"})", - "interval": "", - "legendFormat": "Workload", - "queryType": "randomWalk", - "refId": "A" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Reservations", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Failover", - "refId": "C" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "PAYG", - "refId": "D" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": "1h", - "timeRegions": [], - "timeShift": null, - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": false, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:83", - "format": "gbytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true + "alias": "Available (%)", + "binary": { + "left": "Available", + "operator": "/", + "reducer": "sum", + "right": "Total" }, - { - "$$hashKey": "object:84", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "mode": "binary", + "reduce": { + "reducer": "sum" } - ], - "yaxis": { - "align": false, - "alignLevel": null } }, { - "datasource": "prometheus-openstack", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(115, 191, 105, 0)", - "value": null - } - ] - }, - "unit": "gbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Available (%)" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "yellow", - "value": 0.2 - }, - { - "color": "green", - "value": 0.3 - } - ] - } - }, - { - "id": "unit", - "value": "percentunit" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 4, - "x": 20, - "y": 33 - }, - "id": 299, + "id": "organize", "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.37", - "targets": [ - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_utilized{resource=\"disk\",compute_host=\"$nodes\"})", - "interval": "", - "legendFormat": "Workload", - "queryType": "randomWalk", - "refId": "A" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_failover{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Failover", - "refId": "B" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_payg{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Available", - "refId": "C" - }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_total{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Total", - "refId": "D" + "excludeByName": { + "Time": true }, - { - "exemplar": true, - "expr": "sum(cortex_kvm_host_capacity_reserved{resource=\"disk\",compute_host=\"$nodes\"})", - "hide": false, - "interval": "", - "legendFormat": "Reserved", - "refId": "E" - } - ], - "timeFrom": null, - "timeShift": null, - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "Available (%)", - "binary": { - "left": "Available", - "operator": "/", - "reducer": "sum", - "right": "Total" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } + "indexByName": { + "Available": 1, + "Available (%)": 0, + "Failover": 5, + "Reserved": 6, + "Time": 3, + "Total": 2, + "Workload": 4 }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true - }, - "indexByName": { - "Available": 1, - "Available (%)": 0, - "Failover": 5, - "Reserved": 6, - "Time": 3, - "Total": 2, - "Workload": 4 - }, - "renameByName": {} - } - } - ], - "type": "stat" + "renameByName": {} + } } ], - "title": "$nodes", - "type": "row", - "repeat": "nodes" + "type": "stat" } ], "schemaVersion": 27, @@ -2217,7 +2282,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": [ "All" ], @@ -2252,7 +2317,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": [ "All" ], @@ -2318,7 +2383,7 @@ { "allValue": null, "current": { - "selected": false, + "selected": true, "text": [ "All" ], @@ -2337,7 +2402,7 @@ "name": "nodes", "options": [], "query": { - "query": "label_values(cortex_kvm_host_capacity_utilized{building_block=~\"$building_block\"}, compute_host)", + "query": "label_values(cortex_kvm_host_capacity_utilized{building_block=~\"$building_block\",enabled=~\"$enabled\"}, compute_host)", "refId": "prometheus-openstack-nodes-Variable-Query" }, "refresh": 1, @@ -2353,12 +2418,12 @@ ] }, "time": { - "from": "now-3h", + "from": "now-14d", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Cortex KVM Infrastructure - Compute", - "uid": "cortex-kvm-infra", + "uid": "cortex-compute-kvm", "version": 1 } \ No newline at end of file diff --git a/tools/plutono/provisioning/dashboards/cortex-infrastructure-compute.json.license b/tools/plutono/provisioning/dashboards/cortex-compute-kvm.json.license similarity index 100% rename from tools/plutono/provisioning/dashboards/cortex-infrastructure-compute.json.license rename to tools/plutono/provisioning/dashboards/cortex-compute-kvm.json.license diff --git a/tools/plutono/provisioning/dashboards/cortex-infrastructure-compute.json b/tools/plutono/provisioning/dashboards/cortex-compute-vmware.json similarity index 74% rename from tools/plutono/provisioning/dashboards/cortex-infrastructure-compute.json rename to tools/plutono/provisioning/dashboards/cortex-compute-vmware.json index 9ae456b1..79a6243b 100644 --- a/tools/plutono/provisioning/dashboards/cortex-infrastructure-compute.json +++ b/tools/plutono/provisioning/dashboards/cortex-compute-vmware.json @@ -15,8 +15,7 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 317, - "iteration": 1758785405057, + "iteration": 1767859983442, "links": [], "panels": [ { @@ -73,7 +72,7 @@ "x": 0, "y": 1 }, - "id": 312, + "id": 319, "panels": [ { "datasource": null, @@ -82,33 +81,288 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 8, + "h": 1, + "w": 24, "x": 0, "y": 2 }, - "id": 314, - "links": [ + "id": 323, + "options": { + "content": "\n ", + "mode": "markdown" + }, + "pluginVersion": "7.5.41", + "targets": [ { - "title": "Commitments Dashboard", - "url": "/d/cortex-commitments?orgId=1&refresh=1m" + "queryType": "randomWalk", + "refId": "A" } ], + "timeFrom": null, + "timeShift": null, + "title": "Total General Purpose Capacity (with commitments, no cpu architecture distinction)", + "type": "text" + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": "" + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Disabled" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 2, + "x": 0, + "y": 3 + }, + "id": 326, "options": { - "content": "# Committed Resources\n\nCustomers can commit to resources for a specific time frame, which enables better capacity planning and provides them with discounted pricing.\n\nWhen a customer purchases a commitment, we must reserve that capacity even if it's not actively being used. This reduces our available capacity pool, ensuring the committed resources remain accessible to the customer when needed.\n\n**Current Limitations**: \n- Commitments are not tied to specific hosts yet\n- Filtering of the commitments is currently limited to availability zones only\n\n**Filters you can apply here to the available capacity**:\n- `project_id`\n- `enabled`", - "mode": "markdown" + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" }, "pluginVersion": "7.5.41", "targets": [ { + "exemplar": true, + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", + "instant": false, + "interval": "", + "legendFormat": "Available", "queryType": "randomWalk", "refId": "A" + }, + { + "exemplar": true, + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", + "hide": false, + "interval": "", + "legendFormat": "Disabled", + "refId": "B" } ], "timeFrom": null, "timeShift": null, - "title": "Description", - "type": "text" + "title": "Amount Hypervisors", + "transparent": true, + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Active hypervisors" + }, + "properties": [ + { + "id": "unit", + "value": "short" + } + ] + } + ] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 7, + "x": 2, + "y": 3 + }, + "hiddenSeries": false, + "id": 327, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.41", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:253", + "alias": "Active hypervisors", + "color": "#8F3BB8", + "dashes": true, + "linewidth": 2, + "nullPointMode": "connected", + "yaxis": 2 + }, + { + "$$hashKey": "object:367", + "alias": "vCPU Capacity", + "nullPointMode": "connected" + }, + { + "$$hashKey": "object:374", + "alias": "RAM Capacity", + "nullPointMode": "connected" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "(\n sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n -\n sum(\n clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n or\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n)\n) \n/ \nsum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "instant": false, + "interval": "", + "legendFormat": "vCPU Capacity", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "(\n sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n -\n sum(\n clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n or\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n)\n) \n/ \nsum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "hide": false, + "interval": "", + "legendFormat": "RAM Capacity", + "refId": "B" + }, + { + "exemplar": true, + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "hide": false, + "interval": "", + "legendFormat": "Active hypervisors", + "refId": "C" + } + ], + "thresholds": [ + { + "$$hashKey": "object:786", + "colorMode": "critical", + "fill": true, + "line": true, + "op": "lt", + "value": 0.2, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Available Capacity over time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:348", + "format": "percentunit", + "label": "Capacity (%)", + "logBase": 1, + "max": "1", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:349", + "format": "short", + "label": "Amount of active hypervisors", + "logBase": 1, + "max": null, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "datasource": "prometheus-openstack", @@ -165,10 +419,10 @@ ] }, "gridPos": { - "h": 8, + "h": 11, "w": 8, - "x": 8, - "y": 2 + "x": 9, + "y": 3 }, "id": 310, "options": { @@ -190,7 +444,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n)", + "expr": "sum(\n clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n or\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n)", "instant": true, "interval": "", "legendFormat": "vCPU", @@ -208,7 +462,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "hide": false, "instant": true, "interval": "", @@ -217,7 +471,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -281,6 +535,7 @@ } } ], + "transparent": true, "type": "stat" }, { @@ -300,7 +555,7 @@ } ] }, - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [ { @@ -338,10 +593,10 @@ ] }, "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 2 + "h": 11, + "w": 7, + "x": 17, + "y": 3 }, "id": 315, "options": { @@ -363,7 +618,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n)", + "expr": "sum(\n clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n or\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n)", "instant": true, "interval": "", "legendFormat": "RAM", @@ -372,7 +627,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "hide": false, "instant": true, "interval": "", @@ -381,7 +636,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -446,6 +701,7 @@ } } ], + "transparent": true, "type": "stat" }, { @@ -483,7 +739,7 @@ "properties": [ { "id": "unit", - "value": "decmbytes" + "value": "mbytes" } ] }, @@ -505,7 +761,7 @@ "h": 8, "w": 24, "x": 0, - "y": 10 + "y": 14 }, "id": 317, "options": { @@ -536,7 +792,7 @@ }, { "exemplar": true, - "expr": "max by (project_id, availability_zone) (\n limes_project_usage_per_az{service=\"compute\",resource=\"cores\",availability_zone=~\"$availability_zone\"}\n)", + "expr": "max by (project_id, availability_zone) (\n limes_project_usage_per_az{service=\"compute\",resource=\"ram\",availability_zone=~\"$availability_zone\"}\n)", "format": "table", "hide": false, "instant": true, @@ -546,7 +802,7 @@ }, { "exemplar": true, - "expr": "max by (project_id, availability_zone) (\n limes_project_committed_per_az{service=\"compute\",resource=\"cores\",availability_zone=~\"$availability_zone\"}\n)", + "expr": "max by (project_id, availability_zone) (\n limes_project_committed_per_az{service=\"compute\",resource=\"ram\",availability_zone=~\"$availability_zone\"}\n)", "format": "table", "hide": false, "instant": true, @@ -556,7 +812,7 @@ }, { "exemplar": true, - "expr": "clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )", + "expr": " clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n or\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"cores\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )", "format": "table", "hide": false, "instant": true, @@ -566,7 +822,7 @@ }, { "exemplar": true, - "expr": "clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )", + "expr": " clamp_min(\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )\n -\n on(project_id, availability_zone)\n max by (project_id, availability_zone) (\n limes_project_usage_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\"\n }\n ),\n 0\n )\n or\n max by (project_id, availability_zone) (\n limes_project_committed_per_az{\n service=\"compute\",\n resource=\"ram\",\n availability_zone=~\"$availability_zone\" # Will not be any for compute service\n }\n )", "format": "table", "hide": false, "instant": true, @@ -607,11 +863,11 @@ "Time 5": 15, "Time 6": 17, "Value #Committed CPU": 3, - "Value #Committed RAM": 7, + "Value #Committed RAM": 6, "Value #Unused CPU": 5, "Value #Unused RAM": 8, "Value #Usage CPU": 4, - "Value #Usage RAM": 6, + "Value #Usage RAM": 7, "availability_zone 1": 2, "availability_zone 2": 10, "availability_zone 3": 12, @@ -635,22 +891,36 @@ } ], "type": "table" - } - ], - "title": "Commitments", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 214, - "panels": [ + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 324, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "7.5.41", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Cascade Lake (without commitments)", + "type": "text" + }, { "datasource": "prometheus-openstack", "fieldConfig": { @@ -707,12 +977,12 @@ "h": 11, "w": 2, "x": 0, - "y": 3 + "y": 23 }, "id": 291, "options": { "colorMode": "value", - "graphMode": "area", + "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { @@ -729,7 +999,7 @@ "targets": [ { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", "instant": false, "interval": "", "legendFormat": "Available", @@ -738,7 +1008,7 @@ }, { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", "hide": false, "interval": "", "legendFormat": "Disabled", @@ -748,6 +1018,7 @@ "timeFrom": null, "timeShift": null, "title": "Amount Hypervisors", + "transparent": true, "type": "stat" }, { @@ -760,7 +1031,20 @@ "defaults": { "unit": "percentunit" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Active hypervisor" + }, + "properties": [ + { + "id": "unit", + "value": "short" + } + ] + } + ] }, "fill": 0, "fillGradient": 0, @@ -768,7 +1052,7 @@ "h": 11, "w": 7, "x": 2, - "y": 3 + "y": 23 }, "hiddenSeries": false, "id": 292, @@ -792,14 +1076,23 @@ "pointradius": 2, "points": false, "renderer": "flot", - "seriesOverrides": [], + "seriesOverrides": [ + { + "$$hashKey": "object:709", + "alias": "Active hypervisor", + "color": "#8F3BB8", + "dashes": true, + "linewidth": 2, + "yaxis": 2 + } + ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "interval": "", "legendFormat": "Available vCPU", "queryType": "randomWalk", @@ -807,7 +1100,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Available RAM", @@ -815,7 +1108,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Available Disk", @@ -823,7 +1116,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total vCPU", @@ -831,7 +1124,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total RAM", @@ -839,11 +1132,19 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total Disk", "refId": "TotalDiskCapacity" + }, + { + "exemplar": true, + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "hide": false, + "interval": "", + "legendFormat": "Active hypervisor", + "refId": "A" } ], "thresholds": [ @@ -931,6 +1232,7 @@ } } ], + "transparent": true, "type": "graph", "xaxis": { "buckets": null, @@ -943,7 +1245,7 @@ { "$$hashKey": "object:149", "format": "percentunit", - "label": null, + "label": "Capacity (%)", "logBase": 1, "max": "1", "min": "0", @@ -952,10 +1254,10 @@ { "$$hashKey": "object:150", "format": "short", - "label": null, + "label": "Amount of active hypervisors", "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true } ], @@ -1054,7 +1356,7 @@ "h": 11, "w": 5, "x": 9, - "y": 3 + "y": 23 }, "id": 293, "options": { @@ -1076,7 +1378,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -1085,7 +1387,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -1094,7 +1396,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -1149,6 +1451,7 @@ } } ], + "transparent": true, "type": "stat" }, { @@ -1168,7 +1471,7 @@ } ] }, - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [ { @@ -1241,7 +1544,7 @@ "h": 11, "w": 5, "x": 14, - "y": 3 + "y": 23 }, "id": 294, "options": { @@ -1263,7 +1566,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -1272,7 +1575,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -1281,7 +1584,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -1336,6 +1639,7 @@ } } ], + "transparent": true, "type": "stat" }, { @@ -1355,7 +1659,7 @@ } ] }, - "unit": "decgbytes" + "unit": "gbytes" }, "overrides": [ { @@ -1428,7 +1732,7 @@ "h": 11, "w": 5, "x": 19, - "y": 3 + "y": 23 }, "id": 295, "options": { @@ -1450,7 +1754,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -1459,7 +1763,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -1468,7 +1772,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -1513,34 +1817,48 @@ } }, { - "id": "organize", - "options": { - "excludeByName": { - "Predicted Capacity": true - }, - "indexByName": {}, - "renameByName": {} - } + "id": "organize", + "options": { + "excludeByName": { + "Predicted Capacity": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 322, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "7.5.41", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" } ], - "type": "stat" - } - ], - "repeat": null, - "title": "General Purpose | Cascade Lake", - "type": "row" - }, - { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 230, - "panels": [ + "timeFrom": null, + "timeShift": null, + "title": "Sapphire Rapids (without commitments)", + "type": "text" + }, { "datasource": "prometheus-openstack", "fieldConfig": { @@ -1597,12 +1915,12 @@ "h": 11, "w": 2, "x": 0, - "y": 4 + "y": 35 }, "id": 246, "options": { "colorMode": "value", - "graphMode": "area", + "graphMode": "none", "justifyMode": "center", "orientation": "auto", "reduceOptions": { @@ -1619,7 +1937,7 @@ "targets": [ { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", "instant": false, "interval": "", "legendFormat": "Available", @@ -1628,7 +1946,7 @@ }, { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", "hide": false, "interval": "", "legendFormat": "Disabled", @@ -1638,6 +1956,7 @@ "timeFrom": null, "timeShift": null, "title": "Amount Hypervisors", + "transparent": true, "type": "stat" }, { @@ -1650,7 +1969,20 @@ "defaults": { "unit": "percentunit" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Active hypervisor" + }, + "properties": [ + { + "id": "unit", + "value": "short" + } + ] + } + ] }, "fill": 0, "fillGradient": 0, @@ -1658,7 +1990,7 @@ "h": 11, "w": 7, "x": 2, - "y": 4 + "y": 35 }, "hiddenSeries": false, "id": 243, @@ -1682,14 +2014,23 @@ "pointradius": 2, "points": false, "renderer": "flot", - "seriesOverrides": [], + "seriesOverrides": [ + { + "$$hashKey": "object:527", + "alias": "Active hypervisor", + "color": "#8F3BB8", + "dashes": true, + "linewidth": 2, + "yaxis": 2 + } + ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "interval": "", "legendFormat": "Available vCPU", "queryType": "randomWalk", @@ -1697,7 +2038,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Available RAM", @@ -1705,7 +2046,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Available Disk", @@ -1713,7 +2054,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total vCPU", @@ -1721,7 +2062,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total RAM", @@ -1729,11 +2070,19 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total Disk", "refId": "TotalDiskCapacity" + }, + { + "exemplar": true, + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "hide": false, + "interval": "", + "legendFormat": "Active hypervisor", + "refId": "A" } ], "thresholds": [ @@ -1821,6 +2170,7 @@ } } ], + "transparent": true, "type": "graph", "xaxis": { "buckets": null, @@ -1833,7 +2183,7 @@ { "$$hashKey": "object:149", "format": "percentunit", - "label": null, + "label": "Capacity (%)", "logBase": 1, "max": "1", "min": "0", @@ -1842,10 +2192,10 @@ { "$$hashKey": "object:150", "format": "short", - "label": null, + "label": "Amount of active hypervisors", "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true } ], @@ -1944,7 +2294,7 @@ "h": 11, "w": 5, "x": 9, - "y": 4 + "y": 35 }, "id": 288, "options": { @@ -1966,7 +2316,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -1975,7 +2325,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -1984,7 +2334,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -2039,6 +2389,7 @@ } } ], + "transparent": true, "type": "stat" }, { @@ -2058,7 +2409,7 @@ } ] }, - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [ { @@ -2131,7 +2482,7 @@ "h": 11, "w": 5, "x": 14, - "y": 4 + "y": 35 }, "id": 289, "options": { @@ -2153,7 +2504,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -2162,7 +2513,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -2171,7 +2522,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -2226,6 +2577,7 @@ } } ], + "transparent": true, "type": "stat" }, { @@ -2245,7 +2597,7 @@ } ] }, - "unit": "decgbytes" + "unit": "gbytes" }, "overrides": [ { @@ -2318,7 +2670,7 @@ "h": 11, "w": 5, "x": 19, - "y": 4 + "y": 35 }, "id": 290, "options": { @@ -2340,7 +2692,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -2349,7 +2701,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -2358,7 +2710,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"general-purpose\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -2413,10 +2765,11 @@ } } ], + "transparent": true, "type": "stat" } ], - "title": "General Purpose | Sapphire Rapids", + "title": "General Purpose", "type": "row" }, { @@ -2426,7 +2779,7 @@ "h": 1, "w": 24, "x": 0, - "y": 4 + "y": 2 }, "id": 226, "panels": [ @@ -2486,7 +2839,7 @@ "h": 11, "w": 2, "x": 0, - "y": 5 + "y": 3 }, "id": 299, "options": { @@ -2508,7 +2861,7 @@ "targets": [ { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", "instant": false, "interval": "", "legendFormat": "Available", @@ -2517,7 +2870,7 @@ }, { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", "hide": false, "interval": "", "legendFormat": "Disabled", @@ -2547,7 +2900,7 @@ "h": 11, "w": 7, "x": 2, - "y": 5 + "y": 3 }, "hiddenSeries": false, "id": 300, @@ -2578,7 +2931,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "interval": "", "legendFormat": "Available vCPU", "queryType": "randomWalk", @@ -2586,7 +2939,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Available RAM", @@ -2594,7 +2947,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Available Disk", @@ -2602,7 +2955,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total vCPU", @@ -2610,7 +2963,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total RAM", @@ -2618,7 +2971,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total Disk", @@ -2722,7 +3075,7 @@ { "$$hashKey": "object:149", "format": "percentunit", - "label": null, + "label": "Capacity (%)", "logBase": 1, "max": "1", "min": "0", @@ -2731,7 +3084,7 @@ { "$$hashKey": "object:150", "format": "short", - "label": null, + "label": "Amount of active hypervisors", "logBase": 1, "max": null, "min": null, @@ -2833,7 +3186,7 @@ "h": 11, "w": 5, "x": 9, - "y": 5 + "y": 3 }, "id": 301, "options": { @@ -2855,7 +3208,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -2864,7 +3217,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -2873,7 +3226,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -2947,7 +3300,7 @@ } ] }, - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [ { @@ -3020,7 +3373,7 @@ "h": 11, "w": 5, "x": 14, - "y": 5 + "y": 3 }, "id": 302, "options": { @@ -3042,7 +3395,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -3051,7 +3404,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -3060,7 +3413,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -3134,7 +3487,7 @@ } ] }, - "unit": "decgbytes" + "unit": "gbytes" }, "overrides": [ { @@ -3207,7 +3560,7 @@ "h": 11, "w": 5, "x": 19, - "y": 5 + "y": 3 }, "id": 303, "options": { @@ -3229,7 +3582,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -3238,7 +3591,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -3247,7 +3600,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"cascade-lake\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -3315,7 +3668,7 @@ "h": 1, "w": 24, "x": 0, - "y": 5 + "y": 3 }, "id": 228, "panels": [ @@ -3375,7 +3728,7 @@ "h": 11, "w": 2, "x": 0, - "y": 6 + "y": 4 }, "id": 304, "options": { @@ -3397,7 +3750,7 @@ "targets": [ { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) or on() vector(0)", "instant": false, "interval": "", "legendFormat": "Available", @@ -3406,7 +3759,7 @@ }, { "exemplar": true, - "expr": "count(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"false\"\n }\n )\n) or on() vector(0)", "hide": false, "interval": "", "legendFormat": "Disabled", @@ -3428,7 +3781,20 @@ "defaults": { "unit": "percentunit" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Active hypervisor" + }, + "properties": [ + { + "id": "unit", + "value": "short" + } + ] + } + ] }, "fill": 0, "fillGradient": 0, @@ -3436,7 +3802,7 @@ "h": 11, "w": 7, "x": 2, - "y": 6 + "y": 4 }, "hiddenSeries": false, "id": 305, @@ -3460,14 +3826,23 @@ "pointradius": 2, "points": false, "renderer": "flot", - "seriesOverrides": [], + "seriesOverrides": [ + { + "$$hashKey": "object:299", + "alias": "Active hypervisor", + "color": "#8F3BB8", + "dashes": true, + "linewidth": 2, + "yaxis": 2 + } + ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "interval": "", "legendFormat": "Available vCPU", "queryType": "randomWalk", @@ -3475,7 +3850,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Available RAM", @@ -3483,7 +3858,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Available Disk", @@ -3491,7 +3866,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total vCPU", @@ -3499,7 +3874,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total RAM", @@ -3507,11 +3882,19 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "interval": "", "legendFormat": "Total Disk", "refId": "TotalDiskCapacity" + }, + { + "exemplar": true, + "expr": "count(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n # Use any resource here, otherwise the amount would have to be divided by 3, since the metric is exported 3 times per hypervisor (cpu, ram, disk)\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n) ", + "hide": false, + "interval": "", + "legendFormat": "Active hypervisor", + "refId": "A" } ], "thresholds": [ @@ -3611,7 +3994,7 @@ { "$$hashKey": "object:149", "format": "percentunit", - "label": null, + "label": "Capacity (%)", "logBase": 1, "max": "1", "min": "0", @@ -3620,10 +4003,10 @@ { "$$hashKey": "object:150", "format": "short", - "label": null, + "label": "Amount of active hypervisors", "logBase": 1, "max": null, - "min": null, + "min": "0", "show": true } ], @@ -3722,7 +4105,7 @@ "h": 11, "w": 5, "x": 9, - "y": 6 + "y": 4 }, "id": 306, "options": { @@ -3744,7 +4127,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -3753,7 +4136,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -3762,7 +4145,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -3836,7 +4219,7 @@ } ] }, - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [ { @@ -3909,7 +4292,7 @@ "h": 11, "w": 5, "x": 14, - "y": 6 + "y": 4 }, "id": 307, "options": { @@ -3931,7 +4314,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -3940,7 +4323,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -3949,7 +4332,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -4023,7 +4406,7 @@ } ] }, - "unit": "decgbytes" + "unit": "gbytes" }, "overrides": [ { @@ -4096,7 +4479,7 @@ "h": 11, "w": 5, "x": 19, - "y": 6 + "y": 4 }, "id": 308, "options": { @@ -4118,7 +4501,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -4127,7 +4510,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -4136,7 +4519,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=\"hana\",\n cpu_architecture=\"sapphire-rapids\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=\"true\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -4204,7 +4587,7 @@ "h": 1, "w": 24, "x": 0, - "y": 6 + "y": 4 }, "id": 165, "panels": [], @@ -4301,7 +4684,7 @@ "h": 9, "w": 8, "x": 0, - "y": 7 + "y": 5 }, "id": 296, "options": { @@ -4319,11 +4702,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -4332,7 +4715,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -4341,7 +4724,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -4415,7 +4798,7 @@ } ] }, - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [ { @@ -4488,7 +4871,7 @@ "h": 9, "w": 8, "x": 8, - "y": 7 + "y": 5 }, "id": 297, "options": { @@ -4506,11 +4889,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -4519,7 +4902,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -4528,7 +4911,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -4602,7 +4985,7 @@ } ] }, - "unit": "decgbytes" + "unit": "gbytes" }, "overrides": [ { @@ -4675,7 +5058,7 @@ "h": 9, "w": 8, "x": 16, - "y": 7 + "y": 5 }, "id": 298, "options": { @@ -4693,11 +5076,11 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host, resource) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host, resource) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", "instant": true, "interval": "", "legendFormat": "Available", @@ -4706,7 +5089,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", "hide": false, "instant": true, "interval": "", @@ -4715,7 +5098,7 @@ }, { "exemplar": true, - "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n )\n[56d:4h], 4838400)", + "expr": "predict_linear(\n sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n )\n[56d:4h], 4838400)", "hide": false, "instant": true, "interval": "", @@ -4788,7 +5171,7 @@ "h": 8, "w": 8, "x": 0, - "y": 16 + "y": 14 }, "hiddenSeries": false, "id": 183, @@ -4808,7 +5191,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -4831,7 +5214,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", "interval": "", "legendFormat": "Available", "queryType": "randomWalk", @@ -4839,7 +5222,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Total", @@ -4897,7 +5280,7 @@ "datasource": "prometheus-openstack", "fieldConfig": { "defaults": { - "unit": "decmbytes" + "unit": "mbytes" }, "overrides": [] }, @@ -4907,7 +5290,7 @@ "h": 8, "w": 8, "x": 8, - "y": 16 + "y": 14 }, "hiddenSeries": false, "id": 184, @@ -4927,7 +5310,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -4950,7 +5333,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", "interval": "", "legendFormat": "Available", "queryType": "randomWalk", @@ -4958,7 +5341,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Total", @@ -4986,7 +5369,7 @@ "yaxes": [ { "$$hashKey": "object:97", - "format": "decmbytes", + "format": "mbytes", "label": null, "logBase": 1, "max": null, @@ -5016,7 +5399,7 @@ "datasource": "prometheus-openstack", "fieldConfig": { "defaults": { - "unit": "decgbytes" + "unit": "gbytes" }, "overrides": [] }, @@ -5026,7 +5409,7 @@ "h": 8, "w": 8, "x": 16, - "y": 16 + "y": 14 }, "hiddenSeries": false, "id": 185, @@ -5046,7 +5429,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -5069,7 +5452,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_available_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_available{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)", "interval": "", "legendFormat": "Available", "queryType": "randomWalk", @@ -5077,7 +5460,7 @@ }, { "exemplar": true, - "expr": "sum(\n max by (compute_host) (\n cortex_total_allocatable_capacity_per_host{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", + "expr": "sum(\n max by (compute_host) (\n cortex_vmware_host_capacity_total{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n )\n)\n", "hide": false, "interval": "", "legendFormat": "Total", @@ -5105,7 +5488,7 @@ "yaxes": [ { "$$hashKey": "object:97", - "format": "decgbytes", + "format": "gbytes", "label": null, "logBase": 1, "max": null, @@ -5143,7 +5526,7 @@ "h": 8, "w": 8, "x": 0, - "y": 24 + "y": 22 }, "hiddenSeries": false, "id": 187, @@ -5163,7 +5546,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -5185,7 +5568,7 @@ "targets": [ { "exemplar": true, - "expr": "sort(\n max by (compute_host, enabled) (\n cortex_available_capacity_per_host_pct{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", + "expr": "sort(\n max by (compute_host, enabled) (\n cortex_vmware_host_capacity_available_pct{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", "instant": true, "interval": "", "legendFormat": "{{compute_host}} {{enabled}}", @@ -5262,7 +5645,7 @@ "h": 8, "w": 8, "x": 8, - "y": 24 + "y": 22 }, "hiddenSeries": false, "id": 188, @@ -5282,7 +5665,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -5304,7 +5687,7 @@ "targets": [ { "exemplar": true, - "expr": "sort(\n max by (compute_host, enabled) (\n cortex_available_capacity_per_host_pct{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", + "expr": "sort(\n max by (compute_host, enabled) (\n cortex_vmware_host_capacity_available_pct{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", "instant": true, "interval": "", "legendFormat": "{{compute_host}} {{enabled}}", @@ -5373,7 +5756,7 @@ "h": 8, "w": 8, "x": 16, - "y": 24 + "y": 22 }, "hiddenSeries": false, "id": 189, @@ -5393,7 +5776,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "pointradius": 2, "points": false, "renderer": "flot", @@ -5415,7 +5798,7 @@ "targets": [ { "exemplar": true, - "expr": "sort(\n max by (compute_host, enabled) (\n cortex_available_capacity_per_host_pct{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", + "expr": "sort(\n max by (compute_host, enabled) (\n cortex_vmware_host_capacity_available_pct{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", "instant": true, "interval": "", "legendFormat": "{{compute_host}} {{enabled}}", @@ -5606,7 +5989,7 @@ "properties": [ { "id": "unit", - "value": "decmbytes" + "value": "mbytes" }, { "id": "custom.width", @@ -5622,7 +6005,7 @@ "properties": [ { "id": "unit", - "value": "decgbytes" + "value": "gbytes" }, { "id": "custom.width", @@ -5638,7 +6021,7 @@ "properties": [ { "id": "unit", - "value": "decmbytes" + "value": "mbytes" }, { "id": "custom.width", @@ -5654,7 +6037,7 @@ "properties": [ { "id": "unit", - "value": "decgbytes" + "value": "gbytes" }, { "id": "custom.width", @@ -5848,18 +6231,23 @@ "h": 28, "w": 24, "x": 0, - "y": 32 + "y": 30 }, "id": 217, "options": { "showHeader": true, - "sortBy": [] + "sortBy": [ + { + "desc": true, + "displayName": "Disabled Reason" + } + ] }, - "pluginVersion": "7.5.41", + "pluginVersion": "7.5.45", "targets": [ { "exemplar": true, - "expr": "# Add all column names here\nmax by (compute_host, enabled, disabled_reason, workload_type, availability_zone, cpu_architecture, pinned_projects) (cortex_available_capacity_per_host{resource=\"cpu\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", + "expr": "# Add all column names here\nmax by (compute_host, enabled, disabled_reason, workload_type, availability_zone, cpu_architecture, pinned_projects) (cortex_vmware_host_capacity_available{resource=\"cpu\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", "format": "table", "instant": true, "interval": "", @@ -5869,7 +6257,7 @@ }, { "exemplar": true, - "expr": "max by (compute_host) (cortex_available_capacity_per_host{resource=\"ram\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", + "expr": "max by (compute_host) (cortex_vmware_host_capacity_available{resource=\"ram\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", "format": "table", "hide": false, "instant": true, @@ -5879,7 +6267,7 @@ }, { "exemplar": true, - "expr": "max by (compute_host) (cortex_available_capacity_per_host{resource=\"disk\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", + "expr": "max by (compute_host) (cortex_vmware_host_capacity_available{resource=\"disk\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", "format": "table", "hide": false, "instant": true, @@ -5889,7 +6277,7 @@ }, { "exemplar": true, - "expr": "max by (compute_host) (cortex_total_allocatable_capacity_per_host{resource=\"cpu\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", + "expr": "max by (compute_host) (cortex_vmware_host_capacity_total{resource=\"cpu\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", "format": "table", "hide": false, "instant": true, @@ -5899,7 +6287,7 @@ }, { "exemplar": true, - "expr": "max by (compute_host) (cortex_total_allocatable_capacity_per_host{resource=\"ram\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", + "expr": "max by (compute_host) (cortex_vmware_host_capacity_total{resource=\"ram\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", "format": "table", "hide": false, "instant": true, @@ -5909,7 +6297,7 @@ }, { "exemplar": true, - "expr": "max by (compute_host) (cortex_total_allocatable_capacity_per_host{resource=\"disk\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", + "expr": "max by (compute_host) (cortex_vmware_host_capacity_total{resource=\"disk\", availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"})", "format": "table", "hide": false, "instant": true, @@ -5919,7 +6307,7 @@ }, { "exemplar": true, - "expr": "max by (compute_host) (cortex_running_vms_per_host{availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"}) ", + "expr": "max by (compute_host) (cortex_sap_running_vms_per_host{availability_zone=~\"$availability_zone\", compute_host=~\"$compute_host\", hypervisor_family=~\"$hypervisor_family\", workload_type=~\"$workload_type\", enabled=~\"$enabled\", cpu_architecture=~\"$cpu_architecture\", pinned_projects=~\"(^$|.*$project_id.*)\"}) ", "format": "table", "hide": false, "instant": true, @@ -6105,7 +6493,7 @@ "h": 23, "w": 24, "x": 0, - "y": 60 + "y": 58 }, "heatmap": {}, "hideZeroBuckets": false, @@ -6120,7 +6508,7 @@ "targets": [ { "exemplar": true, - "expr": "sort(\n max by (compute_host) (\n cortex_available_capacity_per_host_pct{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", + "expr": "sort(\n max by (compute_host) (\n cortex_vmware_host_capacity_available_pct{\n resource=\"cpu\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", "interval": "", "legendFormat": "{{compute_host}}", "queryType": "randomWalk", @@ -6177,7 +6565,7 @@ "h": 23, "w": 24, "x": 0, - "y": 83 + "y": 81 }, "heatmap": {}, "hideZeroBuckets": false, @@ -6192,7 +6580,7 @@ "targets": [ { "exemplar": true, - "expr": "sort(\n max by (compute_host) (\n cortex_available_capacity_per_host_pct{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", + "expr": "sort(\n max by (compute_host) (\n cortex_vmware_host_capacity_available_pct{\n resource=\"ram\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", "interval": "", "legendFormat": "{{compute_host}}", "queryType": "randomWalk", @@ -6249,7 +6637,7 @@ "h": 23, "w": 24, "x": 0, - "y": 106 + "y": 104 }, "heatmap": {}, "hideZeroBuckets": false, @@ -6264,7 +6652,7 @@ "targets": [ { "exemplar": true, - "expr": "sort(\n max by (compute_host) (\n cortex_available_capacity_per_host_pct{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", + "expr": "sort(\n max by (compute_host) (\n cortex_vmware_host_capacity_available_pct{\n resource=\"disk\",\n availability_zone=~\"$availability_zone\",\n compute_host=~\"$compute_host\",\n hypervisor_family=~\"$hypervisor_family\",\n workload_type=~\"$workload_type\",\n cpu_architecture=~\"$cpu_architecture\",\n pinned_projects=~\"(^$|.*$project_id.*)\",\n enabled=~\"$enabled\"\n }\n ) \n)", "interval": "", "legendFormat": "{{compute_host}}", "queryType": "randomWalk", @@ -6296,6 +6684,175 @@ "yBucketBound": "middle", "yBucketNumber": null, "yBucketSize": null + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 127 + }, + "id": 329, + "panels": [], + "title": "Flavor Usage", + "type": "row" + }, + { + "datasource": "prometheus-openstack", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "#" + }, + "properties": [ + { + "id": "custom.displayMode", + "value": "color-background" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 100 + }, + { + "color": "red", + "value": 1000 + } + ] + } + } + ] + } + ] + }, + "gridPos": { + "h": 18, + "w": 12, + "x": 0, + "y": 128 + }, + "id": 331, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "#" + } + ] + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "exemplar": true, + "expr": "cortex_sap_flavor_running_vms{availability_zone=~\"$availability_zone\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Running Workload", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "__name__": true, + "cluster": true, + "cluster_type": true, + "component": true, + "container": true, + "endpoint": true, + "github_org": true, + "github_repo": true, + "instance": true, + "job": true, + "namespace": true, + "pod": true, + "prometheus": true, + "region": true, + "service": true + }, + "indexByName": {}, + "renameByName": { + "Value": "#", + "availability_zone": "Availability Zone", + "cluster": "", + "flavor_name": "Flavor", + "pod": "" + } + } + } + ], + "type": "table" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 18, + "w": 12, + "x": 12, + "y": 128 + }, + "id": 333, + "options": { + "content": "# Flavor Usage\n\nThe table shows how many virtuals machines there are by flavor and availability zone. The only filter that you can apply here is the `availability_zone` filter.\n ", + "mode": "markdown" + }, + "pluginVersion": "7.5.45", + "targets": [ + { + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "README", + "type": "text" } ], "refresh": "5m", @@ -6312,7 +6869,7 @@ "value": "$__all" }, "datasource": "prometheus-openstack", - "definition": "label_values(cortex_available_capacity_per_host, availability_zone)", + "definition": "label_values(cortex_vmware_host_capacity_available, availability_zone)", "description": null, "error": null, "hide": 0, @@ -6322,7 +6879,7 @@ "name": "availability_zone", "options": [], "query": { - "query": "label_values(cortex_available_capacity_per_host, availability_zone)", + "query": "label_values(cortex_vmware_host_capacity_available, availability_zone)", "refId": "prometheus-openstack-availability_zone-Variable-Query" }, "refresh": 1, @@ -6347,7 +6904,7 @@ ] }, "datasource": "prometheus-openstack", - "definition": "label_values(cortex_available_capacity_per_host, hypervisor_family)", + "definition": "label_values(cortex_vmware_host_capacity_available, hypervisor_family)", "description": null, "error": null, "hide": 0, @@ -6357,7 +6914,7 @@ "name": "hypervisor_family", "options": [], "query": { - "query": "label_values(cortex_available_capacity_per_host, hypervisor_family)", + "query": "label_values(cortex_vmware_host_capacity_available, hypervisor_family)", "refId": "prometheus-openstack-hypervisor_family-Variable-Query" }, "refresh": 1, @@ -6382,7 +6939,7 @@ ] }, "datasource": "prometheus-openstack", - "definition": "label_values(cortex_available_capacity_per_host, compute_host)", + "definition": "label_values(cortex_vmware_host_capacity_available, compute_host)", "description": null, "error": null, "hide": 0, @@ -6392,7 +6949,7 @@ "name": "compute_host", "options": [], "query": { - "query": "label_values(cortex_available_capacity_per_host, compute_host)", + "query": "label_values(cortex_vmware_host_capacity_available, compute_host)", "refId": "prometheus-openstack-compute_host-Variable-Query" }, "refresh": 1, @@ -6413,7 +6970,7 @@ "value": "$__all" }, "datasource": "prometheus-openstack", - "definition": "label_values(cortex_available_capacity_per_host, enabled)", + "definition": "label_values(cortex_vmware_host_capacity_available, enabled)", "description": null, "error": null, "hide": 0, @@ -6423,7 +6980,7 @@ "name": "enabled", "options": [], "query": { - "query": "label_values(cortex_available_capacity_per_host, enabled)", + "query": "label_values(cortex_vmware_host_capacity_available, enabled)", "refId": "prometheus-openstack-enabled-Variable-Query" }, "refresh": 1, @@ -6439,12 +6996,16 @@ { "allValue": null, "current": { - "selected": false, - "text": "All", - "value": "$__all" + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] }, "datasource": "prometheus-openstack", - "definition": "label_values(cortex_available_capacity_per_host, workload_type)", + "definition": "label_values(cortex_vmware_host_capacity_available, workload_type)", "description": null, "error": null, "hide": 0, @@ -6454,7 +7015,7 @@ "name": "workload_type", "options": [], "query": { - "query": "label_values(cortex_available_capacity_per_host, workload_type)", + "query": "label_values(cortex_vmware_host_capacity_available, workload_type)", "refId": "prometheus-openstack-workload_type-Variable-Query" }, "refresh": 1, @@ -6470,12 +7031,16 @@ { "allValue": null, "current": { - "selected": false, - "text": "All", - "value": "$__all" + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] }, "datasource": "prometheus-openstack", - "definition": "label_values(cortex_available_capacity_per_host, cpu_architecture)", + "definition": "label_values(cortex_vmware_host_capacity_available, cpu_architecture)", "description": null, "error": null, "hide": 0, @@ -6485,7 +7050,7 @@ "name": "cpu_architecture", "options": [], "query": { - "query": "label_values(cortex_available_capacity_per_host, cpu_architecture)", + "query": "label_values(cortex_vmware_host_capacity_available, cpu_architecture)", "refId": "prometheus-openstack-cpu_architecture-Variable-Query" }, "refresh": 1, @@ -6500,7 +7065,7 @@ }, { "current": { - "selected": false, + "selected": true, "text": "", "value": "" }, @@ -6528,7 +7093,7 @@ }, "timepicker": {}, "timezone": "", - "title": "Cortex Infrastructure Dashboard - Compute", - "uid": "cortex-infrastructure-dashboard-compute", - "version": 3 + "title": "Cortex VMware Infrastructure - Compute", + "uid": "cortex-compute-vmware", + "version": 1 } \ No newline at end of file diff --git a/tools/plutono/provisioning/dashboards/cortex-kvm-compute.json.license b/tools/plutono/provisioning/dashboards/cortex-compute-vmware.json.license similarity index 100% rename from tools/plutono/provisioning/dashboards/cortex-kvm-compute.json.license rename to tools/plutono/provisioning/dashboards/cortex-compute-vmware.json.license