|
|
@@ -710,14 +710,13 @@ func (a *Accesses) recordPrices() {
|
|
|
}
|
|
|
nodeType := node.InstanceType
|
|
|
nodeRegion := node.Region
|
|
|
- nodeUsageType := node.UsageType
|
|
|
|
|
|
totalCost := cpu*cpuCost + ramCost*(ram/1024/1024/1024) + gpu*gpuCost
|
|
|
|
|
|
- a.CPUPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion, nodeUsageType).Set(cpuCost)
|
|
|
- a.RAMPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion, nodeUsageType).Set(ramCost)
|
|
|
- a.GPUPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion, nodeUsageType).Set(gpuCost)
|
|
|
- a.NodeTotalPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion, nodeUsageType).Set(totalCost)
|
|
|
+ a.CPUPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion).Set(cpuCost)
|
|
|
+ a.RAMPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion).Set(ramCost)
|
|
|
+ a.GPUPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion).Set(gpuCost)
|
|
|
+ a.NodeTotalPriceRecorder.WithLabelValues(nodeName, nodeName, nodeType, nodeRegion).Set(totalCost)
|
|
|
labelKey := getKeyFromLabelStrings(nodeName, nodeName)
|
|
|
nodeSeen[labelKey] = true
|
|
|
}
|
|
|
@@ -970,22 +969,22 @@ func Initialize(additionalConfigWatchers ...ConfigWatchers) {
|
|
|
cpuGv := prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
|
|
Name: "node_cpu_hourly_cost",
|
|
|
Help: "node_cpu_hourly_cost hourly cost for each cpu on this node",
|
|
|
- }, []string{"instance", "node", "instance_type", "region", "usage_type"})
|
|
|
+ }, []string{"instance", "node", "instance_type", "region"})
|
|
|
|
|
|
ramGv := prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
|
|
Name: "node_ram_hourly_cost",
|
|
|
Help: "node_ram_hourly_cost hourly cost for each gb of ram on this node",
|
|
|
- }, []string{"instance", "node", "instance_type", "region", "usage_type"})
|
|
|
+ }, []string{"instance", "node", "instance_type", "region"})
|
|
|
|
|
|
gpuGv := prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
|
|
Name: "node_gpu_hourly_cost",
|
|
|
Help: "node_gpu_hourly_cost hourly cost for each gpu on this node",
|
|
|
- }, []string{"instance", "node", "instance_type", "region", "usage_type"})
|
|
|
+ }, []string{"instance", "node", "instance_type", "region"})
|
|
|
|
|
|
totalGv := prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
|
|
Name: "node_total_hourly_cost",
|
|
|
Help: "node_total_hourly_cost Total node cost per hour",
|
|
|
- }, []string{"instance", "node", "instance_type", "region", "usage_type"})
|
|
|
+ }, []string{"instance", "node", "instance_type", "region"})
|
|
|
|
|
|
pvGv := prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
|
|
Name: "pv_hourly_cost",
|