Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions helm/bundles/cortex-nova/templates/kpis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,6 @@ spec:
---
apiVersion: cortex.cloud/v1alpha1
kind: KPI
metadata:
name: vmware-host-capacity
spec:
schedulingDomain: nova
impl: vmware_host_capacity_kpi
dependencies:
knowledges:
- name: host-details
- name: host-utilization
description: |
This KPI tracks the total, utilized, reserved and failover capacity of VMware hosts.
---
apiVersion: cortex.cloud/v1alpha1
kind: KPI
metadata:
name: host-running-vms
spec:
Expand Down Expand Up @@ -215,4 +201,18 @@ spec:
- name: nova-flavors
- name: limes-project-commitments
description: |
This KPI tracks the resource commitments of projects running VMs on VMware hosts.
This KPI tracks the resource commitments of projects running VMs on VMware hosts.
---
apiVersion: cortex.cloud/v1alpha1
kind: KPI
metadata:
name: vmware-host-capacity
spec:
schedulingDomain: nova
impl: vmware_host_capacity_kpi
dependencies:
knowledges:
- name: host-details
- name: host-utilization
description: |
This KPI tracks the capacity and utilization of VMware hosts in terms of CPU, RAM, and disk resources.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package compute

import (
"regexp"
"testing"

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
Expand Down Expand Up @@ -38,6 +39,16 @@ type kvmMetricLabels struct {
Maintenance string
}

var fqNameRe = regexp.MustCompile(`fqName: "([^"]+)"`)

func getMetricName(desc string) string {
match := fqNameRe.FindStringSubmatch(desc)
if len(match) > 1 {
return match[1]
}
return ""
}

type kvmExpectedMetric struct {
Name string // metric family name (e.g. "cortex_kvm_host_capacity_total")
Labels kvmMetricLabels
Expand Down
201 changes: 0 additions & 201 deletions internal/knowledge/kpis/plugins/compute/resource_capacity_vmware.go

This file was deleted.

Loading
Loading