promitor
promitor copied to clipboard
Provide support for automatically discovering Azure subscriptions
Proposal
Hello,
As of today, the list of subscriptions has to be set to resource-discovery-declaration.yaml
in the azureLandscape key.
I would like the resource-discovery component to automatically discover this list of subscriptions so that when a new one is created in the tenant, the resources of that subscriptions are automatically scraped by the scraper (thanks to the already available "monitor multiple subscriptions" feature on the scraper.
use case
I want to monitor all cpu of any VM of any subscription:
- resource-discovery -> give tenantId and create a landscape for the VirtualMachines of every subscriptions
- scraper -> create metrics regarding the CPU for all subscriptions given by the discovery component.
That would make it completely automatic regardless of subscriptions creation/deletion.
technical input
I have thought of using this API to do so: https://docs.microsoft.com/en-us/rest/api/resources/subscriptions/list
but this is part of resource management and not graph.
Thank you for consideration
Component
Resource Discovery
Contact Details
Thank you for the suggestion!
Is it fair to assume those subscriptions are all in the same Azure AD tenant?
POCed it and should be feasible.
I would also add the subscription name (displayName?) to metrics alongside the subscriptionid as label, this shouldn't increase cardinality as 1-1 matching with the subscriptionid and easier to filter by name when we have a lot of subscriptions.
That might be possible, but what about cases whare no resource discovery is being used?
There would be inconsistent metric labels though. I'll think about it.
Hello, I am also interested by these features, do you think we could have them soon? If the second part is tricky, is it possible to split this issue in 2 ? I mean 1 issue for discovering Azure subscriptions and another for the subscription displayName label.
It's coming in v0.1.0 and will most likely be split indeed, but this will definitely be added.