Amazon Managed Service for Prometheus is a Prometheus-compatible service that monitors and provides alerts on containerized applications and infrastructure at scale.
Read more about it here:
https://aws.amazon.com/prometheus/
- Configure this data source similar to the Prometheus data source.
- Configure AWS authentication with SigV4. Read these docs for more information on using AWS authentication in Grafana data sources. Read more about SigV4 here.
If you are using core Prometheus with SigV4 authentication, you must migrate to the Amazon Managed Service for Prometheus data source because SigV4 auth is deprecated in core Prometheus. This topic summarizes the steps required to migrate from core Prometheus to Amazon Managed Service for Prometheus.
- Get the
UID
for Prometheus using SigV4. - Get the
UID
for your new Amazon Managed Service for Prometheus. - Update dashboards with the new datasource
UID
. - Update alert rules by exporting provisioning files and updating the data source in the model or create new alert rules.
- Recreate correlations.
- Recreate recorded queries.
-
Get the UID for the old and new data source.
- Navigate to the configuration page for your new data source.
- Find the
UID
in the url.- Example:
“connections/datasources/edit/<DATA SOURCE UID>”
- Example:
- Copy the UID for both the old and new data sources.
"<Prom SigV4 UID>"
"<AMP UID>"
-
Dashboard migration
- Navigate to the dashboard JSON panel of your dashboard that uses the old Prometheus with SigV4 authentication.
- Click on Dashboard settings.
- Select the JSON model in the tabs.
- Search for the
"<Prom SigV4 UID>"
.- Example:
"uid": "<Prom SigV4 UID>"
- Change both the
UID
and thetype
. - The old type is
prometheus
. - Example for changing
type
andUID
.
"type": "prometheus", "uid": "<Prom SigV4 UID>" // can be change to "type": "grafana-amazonprometheus-datasource", "uid": "<AMP UID>"
- Example:
- Confirm the "datasource" change for all of the following categories in the JSON model.
annotations
panels
targets
templating
- Click “Save changes” in the bottom left side of the JSON model UI. Save your dashboard.
-
Alert rules migration
- Alert rule data sources cannot be changed without wiping out the query.
- There are two ways to migrate alert rules.
- First, edit the rule by exporting to a provisioned file [documentation here].
- Navigate to the Alert rules page.
- Identify the alert rule that uses the Prom SigV4 data source.
- Select “Export rule.”
- Export the rule in your choice of JSON, YAML or Terraform.
- Search the exported rule for the
"<Prom SigV4 UID>"
. - Change the
UID
and thetype
in the exported rule.
"type": "prometheus", "uid": "<Prom SigV4 UID>" // can be change to "type": "grafana-amazonprometheus-datasource", "uid": "<AMP UID>"
- Rename the rule and update the
name
field in the exported rule. - Delete the old rule.
- OR second, Create a new new alert rule documentation here.
- Copy the fields from the Prom SigV4 rule.
- Create a new alert rule and select your AMP data source.
- Add the fields from the old rule to the new rule.
- Delete the old rule.
- First, edit the rule by exporting to a provisioned file [documentation here].
-
Correlations migration
- Create a new correlation, see documentation here.
- Identify the correlation that uses the old Prom SigV4 data source.
- Copy the fields from your correlation.
- Create a brand new correlation using the new AMP data source.
- Add the fields from the old correlation to the new correlation.
- Delete the old correlation.
-
Recorded queries migration
- Only available in Grafana Enterprise and Grafana Cloud.
- Create a new recorded query, see documentation here.
- Identify the recorded query that uses the old Prom SigV4 data source.
- Copy the fields from your recorded query.
- Create a brand new recorded query using the new AMP data source.
- Add the fields from the old recorded query to the new recorded query.
- Delete the old recorded query.