node_cpu_hourly_cost value not reconciling with actual Azure Price Rates #2640
Labels
E2
Estimated level of Effort (1 is easiest, 4 is hardest)
kubecost
Relevant to Kubecost's downstream project
needs-follow-up
needs-triage
opencost
OpenCost issues vs. external/downstream
P1
Estimated Priority (P0 is highest, P4 is lowest)
Describe the bug
We are trying to reconcile the data results from OpenCost for our AKS cluster. The results from our prometheus
/api/v1/query?query=node_cpu_hourly_cost
for the Azure VM SKUStandard_DS2_v2
give us a value of$0.058301/core/hour
That's a two core machine so the total hourly cost for the VM instance is$0.116602/hour
. When we download our Azure Billing Account/Billing Profile Pricing Sheet and lookup this VM SKU the hourly price is$0.1360/hour
. Meaning OpenCost is using a hourly price that is off by$0.019398/hour
for nodes in our cluster usingStandard_DS2_v2
VMs.We are a MCA Azure customer (Microsoft Customer Agreement) which uses standard pay-as-you-go rates with Offer Id ms-azr-0017g (https://azure.microsoft.com/en-gb/pricing/offers/ms-azr-0017g/)
I noticed that the logs from OpenCost is referring to
MS-AZR-0003p
(https://azure.microsoft.com/en-gb/pricing/offers/ms-azr-0003p/) as the durable offer id. That I believe refers to customers who contract with Azure under the general Microsoft Online Subscription Agreement . (https://azure.microsoft.com/en-gb/support/legal/subscription-agreement). This also using allegedly using standard PAYG rates.I can't prove if the offer id difference is to blame, in theory I would not expect it to given they both use standard PAYG rates.
We are not a Enterprise Agreement Customer and so can't use the instructions here https://www.opencost.io/docs/configuration/azure#customer-specific-pricing
Would love some assistance to debug this further.
To Reproduce
Steps to reproduce the behavior:
query=node_cpu_hourly_cost
(https://www.opencost.io/docs/troubleshooting#verifying-pricing)Cost Management + Billing
Expected behaviour
I can reconcile the
node_cpu_hourly_cost
value to the Azure price sheet for a given VM SKU/RegionWhich version of OpenCost are you using?
1.109.0 (Chart version 1.31.0)
Additional context
AKS - k8s version 1.28.3
The text was updated successfully, but these errors were encountered: