Query metrics from AMP

Configure AMP data source

Select AWS services from the AWS logo on the left navigation bar, which will take you to the screen as shown below showing all the AWS data sources available for you to choose from.

AWS Datasources

Select Prometheus from the list, select the AWS Region where you created the AMP workspace. This will automatically populate the AMP workspaces available in that Region as shown below.

AMP data source config

Simply select the AMP workspace from the list and click Add data sources. Once added you will able to see that the AMP data source is authenticated through SigV4 protocol. Grafana (7.3.5 and above) has the AWS SigV4 proxy built-in as a plugin which makes this possible.

AMP configuration

Query Metrics

1. Kubernetes metrics

In this section we will be importing a public Grafana dashboard that allows us to visualize metrics from a Kubernetes environment.

Go to the plus sign on the left navigation bar and select Import. Import link

In the Import screen, type 3119 in Import via grafana.com textbox and click Load

Select the AMP data source in the drop down at the bottom and click on Import

Import 3119 Dashboard

Once complete, you will be able to see the Grafana dashboard showing metrics from the EKS cluster through AMP data source as shown below.

3119 Dashboard

You can also create your own custom dashboard using PromQL by creating a custom dashboard and adding a panel connecting AMP as the data source.

2. Application metrics

The PetSite front end application exposes metrics in Prometheus format on /metrics/ endpoint. The ADOT collector scrapes metrics from that endpoint and ingests them into the AMP workspace.

Open the file /resources/petadoptions-grafana-dashboard.json file and copy the contents from it.

Go to the plus sign on the left navigation bar and select Import. Import link

In the Import screen, paste the contents of the copied file into the Import via panel json textbox and click Load and then click Import in the following screen

Import PetAdoptions Dashboard

You should now be able to see the PetAdoptions Dashboard as shown below

PetAdoptions Dashboard