-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inclusion of date as part costByResource output #183
Comments
Thanks for opening your first issue! Reports like these help improve the project! |
As it is the cost by resource, the data returned is from the period specified in the filter. So there is no explicit field in the dataset returned from the Azure Cost API. So just to clarify; you would like to see the period the data applies to? so like:
As it looks like, I cannot directly get it, so need to infer it from the date range used. But I will have to further dive into it. |
Hi Michiel,
Thanks for your response. While the output is generated for a date range,
may be gathering data for each day and including that specific day in the
output; might help here?
For ex, query for Cost for resource for last week, could be split into each
day and could actually include the day for which query was made, if there
is a challenge in Azure cost API returning the data.
In this case, in addition to all standard columns we could potentially add
" azure-cost costByResource -t custom --from 2024-09-01 --to --from
2024-09-01" and include "date"... for each line of output..
Also, having the date input for cost for resource; would greatly help to
plot the trends visually and create anomaly visualizations as well.
Thanks
Narayana
…On Fri, Oct 25, 2024 at 2:04 AM Michiel van Oudheusden < ***@***.***> wrote:
As it is the cost by resource, the data returned is from the period
specified in the filter. So there is no explicit field in the dataset
returned from the Azure Cost API. So just to clarify; you would like to see
the period the data applies to?
so like:
fromdate, todate, 2.57400000,2.86814174,/subscriptions/e5291ea1-ae55-4ef6-a4ad-7dc9ca4384b3/resourcegroups/temp-vm/providers/microsoft.network/publicipaddresses/tempvmtestregion-ip,microsoft.network/publicipaddresses,EU West,Usage,temp-vm,Azure,Virtual Network,IP Addresses,Standard IPv4 Static Public IP,,EUR
As it looks like, I cannot directly get it, so need to infer it from the
date range used. But I will have to further dive into it.
—
Reply to this email directly, view it on GitHub
<#183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEJO6GE6MMN3KYD43APMB5DZ5EEA5AVCNFSM6AAAAABQNUMCV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZVGU2TENBWGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Your suggestion is indeed one way to use the system; loop through each date and fetch the data for a period (day). Then you know for sure that the cost is per that period. And then add the date used as a post step to your processing. You might also be able to use the I m a bit reluctant to add the date to the CSV output as I simply do not get it from the API and it is implicit from the date range provided. |
Hi,
Would like to capture the the date of the spend as part "azure-cost costByResource -s " csv export.
While this is possible with individual date export, not having the date in output csv is causing bit of an issue in analysis.
Appreciate if there is method added to include the date as one additional item against each line of spend.
Thanks
Narayana
The text was updated successfully, but these errors were encountered: