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

feat: Provide overview of available scrapers #23

Merged
merged 10 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ In addition, [Mike](https://github.com/jimporter/mike) is being used to leverage

For every new Promitor version, a new Git tag is created which [automatically builds and pushes a new doc version](https://github.com/promitor/docs/actions/workflows/publish-new-version.yml). Next to that, every push on `main` branch will update the `unreleased` version of the documentation that is [automatically published through GitHub Actions](https://github.com/promitor/docs/actions/workflows/publish-next.yml).

## Contribution Guides

### Documenting a new scraper

Documenting a new scraper is fairly simple and only requires a few steps in the `docs\` folder:

1. Create a new document in `scraping\providers` based on `scraping\scraper.md.template`.
2. Add the new scraper to the navigation in `mkdocs.yml`.
- Ensure that the scraper is listed alphabetically in the `Scraping` section of the navigation.
3. Add the new scraper to the supported scrapers list for resource discovery in `mkdocs.yml`, when applicable.
- The `Supported Providers` section of `Resource Discovery` in the navigation
- Ensure that the scraper is listed alphabetically.
4. If the scraper provides scraper-specific labels, they should be documented in `scraping/labels.md` under "Scraper-specific labels".

## Creating a PR with live preview

Every PR will automatically build and deploy a preview version of the documentation for you with [Netlify](https://netlify.com). This allows you to easily contribute changes without having to fully configure your local environment.
Expand Down
15 changes: 0 additions & 15 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Here are a list of questions you may have:
- [What Azure clouds are supported?](#what-azure-clouds-are-supported)
- [Why does Azure Blob & File Storage only report account-level information?](#why-does-azure-blob-file-storage-only-report-account-level-information)
- [Why does my multi-dimensional metric report label value `unknown` with Prometheus?](#why-does-my-multi-dimensional-metric-report-label-value-unknown-with-prometheus)
- [What Helm version is supported?](#what-helm-version-is-supported)
- [What operating systems are supported?](#what-operating-systems-are-supported)

## Are multi-dimensional metrics supported?
Expand Down Expand Up @@ -75,20 +74,6 @@ When Promitor is unable to find a metric for a multi-dimensional metric, it will

You can read more about it in our [Prometheus sink documentation](/configuration/v2.x/runtime/scraper/#what-happens-when-metrics-are-unavailable-for-multi-dimensional-metrics).

## What Helm version is supported?

Promitor supports deployments with **Helm v3.0** for all versions.

Helm has [deprecated support for v2.0](https://helm.sh/blog/helm-v2-deprecation-timeline/) and is out of support.
Because of that, Promitor supported to remove support for Helm 2.0 as of Promitor 2.0.

However, while we don't support it out-of-the-box it is possible that it is still compatible with Helm 2.0 but we do
not provide support for it.

Join the discussion on our Helm v2.0 support deprecation on [GitHub Discussions](https://github.com/tomkerkhove/promitor/discussions/1375).

## What operating systems are supported?

We support running on both Linux & Windows platforms.

[← back](/)
17 changes: 17 additions & 0 deletions docs/resource-discovery/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Overview

Resource discovery allows you to define criteria to automatically discover resources in your Azure tenant and scrape metrics for all of the Azure resources that are found.

## How it works

While Promitor Scraper uses a declarative approach for defining Azure resources to scrape; as of Promitor Scraper 2.0 you can integrate with **Promitor Resource Discovery**!

With resource discovery, you can define **resource discovery groups** that represent Azure resources of a given type and optionally define criteria for the resources to comply with.

By doing this, you can **change your metric declaration for Promitor Scraper so that,** instead of using declared resources, **reference a resource discovery group** which be used to determine what Azure resources it should scrape metrics for.

Behind the scenes, Promitor Resource Discovery integrates with **Azure Resource Graph** which will query your Azure landscape to discover the corresponding resources.

Here's an overview of how they work together:

![Promitor Scraper with resource discovery](./../media/concepts/how-it-works-with-discovery.png)
2 changes: 1 addition & 1 deletion docs/metrics/labels.md → docs/scraping/labels.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## What labels do we provide?
# Metric Labelling

Here is an overview of how we label metrics.

Expand Down
File renamed without changes.
45 changes: 45 additions & 0 deletions docs/scraping/providers/api-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Azure API Management

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v1.3-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can scrape an Azure API Management via the `ApiManagement`
resource type.

When using declared resources, the following fields need to be provided:

- `instanceName` - The name of the Azure API Management instance.
- `locationName` - The name of the regional deployment of the gateway. *(optional)*

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftapimanagementservice).

## Multi-region support

Azure API Management instances can be deployed to multiple regions across the world.

Promitor supports different scenarios:

1. Report metrics for metrics for all locations (default)
2. Scope metric to a single region by configuring `locationName`.
3. Report metrics but split it across all regions by using the `Location` dimension.

The following scraper-specific metric label will be added for scenario 2 & 3:

- `location` - Name of the location

## Example

Here is an example configuration:

```yaml
name: promitor_demo_azureapimanagement_capacity
description: "The amount of capacity used an Azure API Management instance."
resourceType: ApiManagement
azureMetricConfiguration:
metricName: Capacity
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- instanceName: promitor-api-gateway
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: api-management-landscape
``
30 changes: 30 additions & 0 deletions docs/scraping/providers/app-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Azure App Plan

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v1.2-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure App Plan via the `AppPlan` resource
type.

When using declared resources, the following fields need to be provided:

- `appPlanName` - The name of the Azure App Plan

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftwebserverfarms).

## Example

Here is an example configuration:

```yaml
name: azure_app_plan_percentage_memory
description: "Average percentage of memory usage on an Azure App Plan"
resourceType: AppPlan
azureMetricConfiguration:
metricName: MemoryPercentage
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- appPlanName: promitor-app-plan
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: app-plans-landscape
```
31 changes: 31 additions & 0 deletions docs/scraping/providers/application-gateway.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Azure Application Gateway

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v2.0-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure Application Gateway via the `ApplicationGateway` resource
type.

When using declared resources, the following fields need to be provided:

- `applicationGatewayName` - The name of the Azure Application Gateway

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftnetworkapplicationgateways).

## Example

Here is an example configuration:

```yaml
name: azure_application_gateway_milli_total_time
description: "Average milliseconds of total time on an Azure application gateway"
resourceType: ApplicationGateway
azureMetricConfiguration:
metricName: ApplicationGatewayTotalTime
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- applicationGatewayName: promitor-application-gateway-1
- applicationGatewayName: promitor-application-gateway-2
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: application-gateway-landscape
```
31 changes: 31 additions & 0 deletions docs/scraping/providers/application-insights.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Azure Application Insights

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v2.6-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure Application Insights via the `ApplicationInsights` resource
type.

When using declared resources, the following fields need to be provided:

- `name` - The name of the Azure Application Insights

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported#microsoftinsightscomponents).

## Example

Here is an example configuration:

```yaml
name: azure_application_insights_exceptions
description: "Average amount of server exceptions in Azure Application Insights"
resourceType: ApplicationInsights
azureMetricConfiguration:
metricName: exceptions/server
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- name: promitor-application-gateway-1
- name: promitor-application-gateway-2
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: application-insights-landscape
```
37 changes: 37 additions & 0 deletions docs/scraping/providers/automation-account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Azure Automation account

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v2.1-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can scrape an Azure Automation account via the `AutomationAccount`
resource type.

When using declared resources, the following fields need to be provided:

- `accountName` - The name of the Azure Automation account.
- `runbookName` - The name of the runbook. (optional and only supported on limited metrics)

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftautomationautomationaccounts).

The following scraper-specific metric label will be added :

- `runbook_name` - Name of the runbook

## Example

Here is an example configuration:

```yaml
name: promitor_demo_automation_job_count
description: "Amount of jobs per Azure Automation account & job"
resourceType: AutomationAccount
azureMetricConfiguration:
metricName: TotalJob
aggregation:
type: Total
resources: # Optional, required when no resource discovery is configured
- resourceGroupName: promitor-sources
accountName: promitor-sandbox
runbookName: Example # Optional, currently only supported for 'TotalJob' metric
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: automation-accounts
```
28 changes: 28 additions & 0 deletions docs/scraping/providers/blob-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Azure Blob Storage

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v1.3-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-No-red.svg)

You can declare to scrape an Azure Queue via the `BlobStorage` resource type.

The following fields need to be provided:

- `accountName` - The name of the Azure Storage account

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftstoragestorageaccountsblobservices).

## Example

Here is an example configuration:

```yaml
name: azure_storage_blobs_capacity
description: "The average capacity used by blobs in the storage account"
resourceType: BlobStorage
azureMetricConfiguration:
metricName: BlobCapacity
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- accountName: promitor-1
- accountName: promitor-2
```
33 changes: 33 additions & 0 deletions docs/scraping/providers/cdn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Azure Content Delivery Network (CDN)

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v2.6-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure CDN via the `Cdn` resource
type.

When using declared resources, the following fields need to be provided:

- `cdnName` - The name of the Azure CDN resource

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported#microsoftcdnprofiles).

> 🚨 The availability of metrics depends on the SKU of the Azure CDN resource.

## Example

Here is an example configuration:

```yaml
name: azure_cdn_requests
description: "Amount of requests sent to Azure CDN"
resourceType: Cdn
azureMetricConfiguration:
metricName: RequestCount
aggregation:
type: Total
resources: # Optional, required when no resource discovery is configured
- cdnName: promitor-cdn-1
- cdnName: promitor-cdn-2
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: cdn-landscape
```
31 changes: 31 additions & 0 deletions docs/scraping/providers/container-instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Azure Container Instances

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v1.0-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure Container Instances via the `ContainerInstance`
resource type.

When using declared resources, the following fields need to be provided:

- `containerGroup` - The name of the container group

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftcontainerinstancecontainergroups).

## Example

Here is an example configuration:

```yaml
name: azure_container_instance_cpu_usage
description: "Average cpu usage of our 'promitor-container-instance' container instance"
resourceType: ContainerInstance
azureMetricConfiguration:
metricName: CpuUsage
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- containerGroup: promitor-container-instance-1
- containerGroup: promitor-container-instance-2
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: container-instances-landscape
```
33 changes: 33 additions & 0 deletions docs/scraping/providers/container-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Azure Container Registry

![Availability Badge](https://img.shields.io/badge/Available%20Starting-v1.0-green.svg)![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)

You can declare to scrape an Azure Container Registry via the `ContainerRegistry`
resource type.

When using declared resources, the following fields need to be provided:

- `registryName` - The name of the registry

All supported metrics are documented in the official [Azure Monitor documentation](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported#microsoftcontainerregistryregistries).

## Example

Here is an example configuration:

```yaml
name: azure_container_registry_total_pull_count
description: "Amount of images that were pulled from the container registry"
resourceType: ContainerRegistry
azureMetricConfiguration:
metricName: TotalPullCount
aggregation:
type: Average
resources: # Optional, required when no resource discovery is configured
- registryName: promitor-1
- registryName: promitor-2
resourceDiscoveryGroups:
- name: registry-group
resourceDiscoveryGroups: # Optional, requires Promitor Resource Discovery agent (https://promitor.io/concepts/how-it-works#using-resource-discovery)
- name: container-registry-landscape
```
Loading