Plugins 〉Amazon Managed Service for Prometheus


Developer
Grafana Labs

Resources

Sign up to receive occasional product news and updates:



Data Source
grafana

Amazon Managed Service for Prometheus

  • Overview
  • Installation
  • Change log
  • Related content

Amazon Managed Service for Prometheus Data Source

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/

Add the data source

  1. Configure this data source similar to the Prometheus data source.
  2. Configure AWS authentication with SigV4. Read these docs for more information on using AWS authentication in Grafana data sources. Read more about SigV4 here.

Migrate from core Prometheus to Amazon Managed Service for Prometheus

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.

Migration instructions

  1. 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>”
    • Copy the UID for both the old and new data sources.
      • "<Prom SigV4 UID>"
      • "<AMP UID>"
  2. 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 the type.
      • The old type is prometheus.
      • Example for changing type and UID.
        "type": "prometheus",
        "uid": "<Prom SigV4 UID>"
      

      // can be change to

      “type”: “grafana-amazonprometheus-datasource”, “uid”: “<AMP UID>”

    • 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.

  1. 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 the type 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.
  2. 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.
  3. 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.

Installing Amazon Managed Service for Prometheus on Grafana Cloud:

For more information, visit the docs on plugin installation.

Changelog

1.0.1

  • Fix sigv4 auth in Cloud

1.0.0

  • Initial public release

0.3.0

  • Rename plugin & repo

0.2.0 (Private release for testing)

  • Initial private release of the Amazon Managed Prometheus plugin, a wrapper around the core Prometheus datasource that uses Amazon-specific authentication.

0.1.0 (Unreleased)

Initial release.