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

docs: Provide changelog & docs for new runtime metrics #1721

Merged
merged 3 commits into from
Aug 9, 2021
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
9 changes: 7 additions & 2 deletions changelog/content/experimental/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ version:

#### Scraper

None.
- {{% tag added %}} Provide system metrics related to agent performance & resources ([docs](https://promitor.io/operations/#performance)
| [#341](https://github.com/tomkerkhove/promitor/issues/341))

#### Resource Discovery

None.
- {{% tag added %}} Provide Prometheus endpoint for scraping metrics
- {{% tag added %}} Provide system metrics related to agent performance & resources ([docs](https://promitor.io/operations/#performance))
| [#341](https://github.com/tomkerkhove/promitor/issues/341))
- {{% tag added %}} Provide system metric related to HTTP request performance ([docs](https://promitor.io/operations/#performance)
| [#1717](https://github.com/tomkerkhove/promitor/issues/1717))
70 changes: 53 additions & 17 deletions docs/operations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Here is an overview of how you can operate Promitor.
- [Health](#health)
- [Consuming the health endpoint](#consuming-the-health-endpoint)
- [Performance](#performance)
- [Scraping Prometheus endpoint](#scraping-prometheus-endpoint)
- [Scraping Azure Monitor](#scraping-azure-monitor)
- [System](#system)
- [Consuming the System endpoint](#consuming-the-system-endpoint)
- [Exploring our REST APIs](#exploring-our-rest-apis)
Expand All @@ -17,6 +19,9 @@ Here is an overview of how you can operate Promitor.

## Health

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

Promitor provides a basic health endpoint that indicates the state of the scraper.

Health endpoints can be useful for monitoring the scraper, running sanity tests
Expand All @@ -41,25 +46,21 @@ The endpoint provides more details on integration with following dependencies:

## Performance

You can easily monitor the performance of Promitor through the following Prometheus metrics:

- `promitor_scrape_error` - Provides indication of all configured metrics that were unable to be scraped in Azure Monitor

```prom
# HELP promitor_scrape_error Provides an indication that the scraping of the resource has failed
# TYPE promitor_scrape_error gauge
promitor_scrape_error{metric_name="promitor_demo_app_insights_dependency_duration_200_OK",resource_group="docker-hub-metrics",resource_name="Microsoft.Insights/Components/docker-hub-metrics",resource_type="Generic",subscription_id="0f9d7fea-99e8-4768-8672-06a28514f77e",tenant_id="c8819874-9e56-4e3f-b1a8-1c0325138f27"} 1 1623691623231
```

- `promitor_scrape_success` - Provides indication of all configured metrics that were successfully scraped and reported in
the configured metric sinks
![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-Yes-green.svg)
![Scraper Support Badge](https://img.shields.io/badge/Support%20for%20Scraper-Yes-green.svg)

```text
# HELP promitor_scrape_success Provides an indication that the scraping of the resource was successful
# TYPE promitor_scrape_success gauge
promitor_scrape_success{metric_name="promitor_demo_automation_update_deployment_machine_runs",resource_group="promitor-sources",resource_name="promitor-sandbox",resource_type="AutomationAccount",subscription_id="0f9d7fea-99e8-4768-8672-06a28514f77e",tenant_id="c8819874-9e56-4e3f-b1a8-1c0325138f27"} 1 1623691626335
```
You can easily monitor the performance of Promitor through the following Prometheus metrics:

- `promitor_runtime_dotnet_collection_count_total` - Provides information related to garbage collection count per generation
- `promitor_runtime_dotnet_totalmemory` - Provides information related to total known allocated memory
- `promitor_runtime_process_cpu_seconds_total` - Provides information related to total user & system CPU time spent in seconds
- `promitor_runtime_process_virtual_bytes` - Provides information related to virtual memory size
- `promitor_runtime_process_working_set` - Provides information related to process working set
- `promitor_runtime_process_private_bytes` - Provides information related to process private memory size
- `promitor_runtime_process_num_threads` - Provides information related to total number of threads
- `promitor_runtime_process_processid` - Provides information related to process ID
- `promitor_runtime_process_start_time_seconds` - Provides information related to the start time of the process since
unix epoch in seconds
- `promitor_runtime_http_request_duration_seconds` - Provides information related to the performance of HTTP routes and outcomes

```text
Expand All @@ -84,8 +85,40 @@ promitor_runtime_http_request_duration_seconds_sum{status_code="200",method="GET
promitor_runtime_http_request_duration_seconds_count{status_code="200",method="GET",path="/scrape"} 34
```

### Scraping Prometheus endpoint

Every Promitor agent supports exposing Prometheus metrics:

- **Resource Discovery agent** - Exposed on `/metrics` endpoint
- **Scraper agent** - Exposed through Prometheus metric sink ([docs](/configuration/v2.x/runtime/scraper#prometheus-scraping-endpoint))

### Scraping Azure Monitor

You can easily monitor the performance of Promitor Scraper agent integrating with Azure Monitor
through the following Prometheus metrics:

- `promitor_scrape_error` - Provides indication of all configured metrics that were unable to be scraped in Azure Monitor

```prom
# HELP promitor_scrape_error Provides an indication that the scraping of the resource has failed
# TYPE promitor_scrape_error gauge
promitor_scrape_error{metric_name="promitor_demo_app_insights_dependency_duration_200_OK",resource_group="docker-hub-metrics",resource_name="Microsoft.Insights/Components/docker-hub-metrics",resource_type="Generic",subscription_id="0f9d7fea-99e8-4768-8672-06a28514f77e",tenant_id="c8819874-9e56-4e3f-b1a8-1c0325138f27"} 1 1623691623231
```

- `promitor_scrape_success` - Provides indication of all configured metrics that were successfully scraped and reported in
the configured metric sinks

```text
# HELP promitor_scrape_success Provides an indication that the scraping of the resource was successful
# TYPE promitor_scrape_success gauge
promitor_scrape_success{metric_name="promitor_demo_automation_update_deployment_machine_runs",resource_group="promitor-sources",resource_name="promitor-sandbox",resource_type="AutomationAccount",subscription_id="0f9d7fea-99e8-4768-8672-06a28514f77e",tenant_id="c8819874-9e56-4e3f-b1a8-1c0325138f27"} 1 1623691626335
```

## System

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

Promitor provides a basic system endpoint that provides information about itself such as its version.

### Consuming the System endpoint
Expand All @@ -111,6 +144,9 @@ We provide API documentation to make it easier for you to consume our REST APIs

### Azure Resource Manager API - Consumption & Throttling

![Resource Discovery Support Badge](https://img.shields.io/badge/Support%20for%20Resource%20Discovery-No-red.svg)
![Scraper Support Badge](https://img.shields.io/badge/Support%20for%20Scraper-Yes-green.svg)

Promitor exposes runtime metrics to provide insights on the API consumption of
Azure Resource Manager API:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Promitor.Agents.ResourceDiscovery.Scheduling
{
public class AzureLandscapeDiscoveryBackgroundJob
{
}
}