Skip to content

Commit

Permalink
fix: Swap kind and type values
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreZiviani committed Dec 30, 2022
1 parent 04590c9 commit 28f4d65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Expose the cost of each pod relative to the cost of the instance that it is runn

```
eks_cost_pod_cpu{kind="fargate",namespace="kube-system",pod="coredns-687d8ddc5b-psk7t",type="fargate"} 0.00020879999999999998
eks_cost_pod_memory{kind="fargate",namespace="kube-system",pod="coredns-687d8ddc5b-psk7t",type="fargate"} 0.00013095550537109375
eks_cost_pod_total{kind="fargate",namespace="kube-system",pod="coredns-687d8ddc5b-psk7t",type="fargate"} 0.00033975550537109373
eks_cost_pod_memory{kind="fargate",namespace="kube-system",pod="coredns-687d8ddc5b-psk7t",type="fargate"} 0.000132550048828125
eks_cost_pod_total{kind="fargate",namespace="kube-system",pod="coredns-687d8ddc5b-psk7t",type="fargate"} 0.00034135004882812495
...
eks_cost_pod_cpu{kind="m6i.xlarge",namespace="kube-system",pod="aws-node-4mqg5",type="ec2"} 9.835714285714287e-05
eks_cost_pod_memory{kind="m6i.xlarge",namespace="kube-system",pod="aws-node-4mqg5",type="ec2"} 0.0002456796169281006
eks_cost_pod_total{kind="m6i.xlarge",namespace="kube-system",pod="aws-node-4mqg5",type="ec2"} 0.0003440367597852435
eks_cost_pod_cpu{kind="ec2",namespace="kube-system",pod="aws-node-4mqg5",type="m6i.xlarge"} 0.0001475357142857143
eks_cost_pod_memory{kind="ec2",namespace="kube-system",pod="aws-node-4mqg5",type="m6i.xlarge"} 0.0002456796169281006
eks_cost_pod_total{kind="ec2",namespace="kube-system",pod="aws-node-4mqg5",type="m6i.xlarge"} 0.00039321533121381493
```

# permissions
Expand Down
4 changes: 2 additions & 2 deletions exporter/ondemand.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func (m *Metrics) getInstances(ctx context.Context) {
m.Instances[string(instance.InstanceType)] = &Instance{
Memory: aws.ToInt64(instance.MemoryInfo.SizeInMiB),
VCpu: aws.ToInt32(instance.VCpuInfo.DefaultVCpus),
Type: "ec2",
Kind: string(instance.InstanceType),
Kind: "ec2",
Type: string(instance.InstanceType),
}
}
}
Expand Down

0 comments on commit 28f4d65

Please sign in to comment.