outscale / osc-cost

Analysis of cloud costs for 3DS Outscale
5 stars 3 forks source link

Publish resources even if they don't exist in api #110

Closed albundy83 closed 8 months ago

albundy83 commented 1 year ago

Hello,

when you don't have a resource in your environment, the output of osccost does not publish them. To easily manage output (for example with formulas etc ...), it will be nice to have them displayed with 0 value instead of nothing.

albundy83 commented 1 year ago

Hello, any update on this request ? (by the way, if you have time to publich a release with this : https://github.com/outscale/osc-cost/pull/111)

jerome-jutteau commented 1 year ago

Hi @albundy83,

Just to understand your usecase: when a resource type does not exist, I suppose you don't see that line which says "0" for that type of resources?

Example: Lets say you don't have any LoadBalancer, osc-cost --format=human will not show a "LoadBalancer" line?

What are the output formats you would need a resource type to show zero?

albundy83 commented 1 year ago

Hello,

honestly, my issue was more oriented for prometheus output. And, yes, I'd like to see every metrics with a 0 instead of not display it.

I think at least prometheus and json format need to show the 0 (what is usually managed by automations stuff)

jerome-jutteau commented 1 year ago

Ok so just 1 fake entry with a value of zero in json and prometheus would do it?

albundy83 commented 1 year ago

Yes, the idea is just to have every "metrics" possible with the corresponding value (or zero if nothing has been created) Thanks a lot for this improvement :)