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

Document how to add support for resource discovery #1139

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions adding-a-new-scraper.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,20 @@ This requires the following steps:

## Scraping

We'll add a new scraper that pulls the metrics from Azure Monitor:

1. Implement a scraper, that inherits from `AzureMonitorScraper<TResourceDefinition>`, which will specify what resource to scrape with Azure Monitor.
2. Hook your new scraper in our `MetricScraperFactory` which determines what scraper
to use for the passed configuration.

## Resource Discovery

We'll add dynamic resource discovery support by using Azure Resource Graph:

1. Implement a new discovery query that [create an Azure Resource Graph query](https://docs.microsoft.com/en-us/azure/governance/resource-graph/concepts/query-language).It should inherits from `ResourceDiscoveryQuery` and be located in `.\src\Promitor.Agents.ResourceDiscovery\Graph\ResourceTypes`
2. Support the new resource type in `ResourceDiscoveryFactory`
3. Add discovery support badge in scraper documentation page - `![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)`

<!-- markdownlint-enable -->

------------------------
Expand Down