Skip to content
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

Provide support for automatically discovering Azure subscriptions #1665

Open
ahurtaud opened this issue Jun 29, 2021 · 7 comments
Open

Provide support for automatically discovering Azure subscriptions #1665

ahurtaud opened this issue Jun 29, 2021 · 7 comments
Assignees
Labels
agents:discovery-agent All issues related to the resource discovery agent end-user:msft-defender feature-request New feature requests Hacktoberfest All issues available for contribution during Hacktoberfest help-wanted All issues where people can contribute to the project integration:azure-resource-graph All issues related to Azure Resource Graph integration

Comments

@ahurtaud
Copy link

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

[email protected]

@ahurtaud ahurtaud added the feature-request New feature requests label Jun 29, 2021
@tomkerkhove tomkerkhove changed the title resource-discovery: auto discover subscriptions Provide support for automatically discovering Azure subscriptions Jul 2, 2021
@tomkerkhove tomkerkhove added the agents:discovery-agent All issues related to the resource discovery agent label Jul 2, 2021
@tomkerkhove
Copy link
Owner

Thank you for the suggestion!

@tomkerkhove
Copy link
Owner

Is it fair to assume those subscriptions are all in the same Azure AD tenant?

@tomkerkhove
Copy link
Owner

POCed it and should be feasible.

@ahurtaud
Copy link
Author

ahurtaud commented Jul 7, 2021

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.

@tomkerkhove
Copy link
Owner

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.

@JeremyBoulanger
Copy link

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.

@tomkerkhove
Copy link
Owner

It's coming in v0.1.0 and will most likely be split indeed, but this will definitely be added.

@tomkerkhove tomkerkhove added integration:azure-resource-graph All issues related to Azure Resource Graph integration help-wanted All issues where people can contribute to the project Hacktoberfest All issues available for contribution during Hacktoberfest labels Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents:discovery-agent All issues related to the resource discovery agent end-user:msft-defender feature-request New feature requests Hacktoberfest All issues available for contribution during Hacktoberfest help-wanted All issues where people can contribute to the project integration:azure-resource-graph All issues related to Azure Resource Graph integration
Projects
Status: Design
Development

No branches or pull requests

3 participants