Skip to content

Commit

Permalink
docs: Add docs for Amazon Managed Prometheus (#2777)
Browse files Browse the repository at this point in the history
adding AMP doc

Signed-off-by: Kevin Lewin <lewinke@amazon.com>
  • Loading branch information
lewinkedrs committed May 14, 2023
1 parent fef9cdb commit 13b988e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/analysis/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,26 @@ you validate your [PromQL expression](https://prometheus.io/docs/prometheus/late

See the [Analysis Overview page](../../features/analysis) for more details on the available options.

## Utilizing Amazon Managed Prometheus

Amazon Managed Prometheus can be used as the prometheus data source for analysis. In order to do this the namespace where you analysis is running will have to have the appropriate [IRSA attached](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-ingest-metrics-new-Prometheus.html#AMP-onboard-new-Prometheus-IRSA) to allow for prometheus queries. Once you ensure the proper permissions are in place to access AMP, you can use an AMP workspace url in your ```provider``` block:

```yaml
provider:
prometheus:
address: https://aps-workspaces.$REGION.amazonaws.com/workspaces/$WORKSPACEID
query: |
sum(irate(
istio_requests_total{reporter="source",destination_service=~"{{args.service-name}}",response_code!~"5.*"}[5m]
)) /
sum(irate(
istio_requests_total{reporter="source",destination_service=~"{{args.service-name}}"}[5m]
))
```

# Additional Metadata

Any additional metadata from the Prometheus controller, like the resolved queries after substituting the template's
arguments, etc. will appear under the `Metadata` map in the `MetricsResult` object of `AnalysisRun`.


0 comments on commit 13b988e

Please sign in to comment.