Azure Managed Prometheus Plugin

The Azure Managed Prometheus plugin enables you to query data from Microsoft’s Azure Monitor managed service for Prometheus. This plugin is similar to the Prometheus plugin, but is designed to work in an Azure environment, with easier setup and Azure-specific dashboards.

Adding a data source

To add a data source click on the + next to Data Sources on the left-hand menu in SquaredUp. Search for the data source and click on it to open the Configure data source page.

Before you start

Prerequisites

You will need:

  1. The query endpoint URL for your Prometheus instance. See Finding the query endpoint URL below.
  2. Application credentials for an application that has the Reader role for your Prometheus data. See Configuring application credentials below.

Finding the query endpoint URL

  1. Open the Azure portal.
  2. Navigate to the Azure Monitor workspace that contains the managed Prometheus instance.
  3. Select the Overview tab.
  4. Copy the value of Query endpoint. The URL is typically of the form: https://<id>.<region>.prometheus.monitor.azure.com.

Configuring application credentials

You will need an application in Azure that has the Reader role assigned for the Azure Monitor workspace containing your managed Prometheus instance.

  1. In the Azure portal, navigate to App registrations and do one of the following:
    • If you don't have an app registration for SquaredUp, create a new one using the default options (no redirect URL is needed).
      1. Click New registration.
      2. Name:
        Enter a name for the app, for example, SquaredUp.
      3. Click Register.
    • If you already have an app registration configured for SquaredUp, select it from the list.
      Azure App registrations page
  2. Make a note of the Application (client) ID and the Directory (tenant) ID.
    Azure credentials to note
  3. Click Add a certificate or secret to open Certificates and secrets, then do the following:
    1. On the Client secrets tab, click New client secret.
    2. Enter a Description for the secret. For example, SquaredUp plugin.
    3. Select when the secret Expires.
    4. Click Add to create the secret and add it to the list.
    5. Make a note of the Value. For more information see Microsoft: Use the portal to create an Microsoft Entra application and service principal that can access resources.
      Client secret for app registration
  4. Navigate to the Subscription or Resource Group that contains the Azure Monitor workspace.
    1. In Access control (IAM) click Add > Add role assignments and choose the Reader role.
    2. Search for the name of the app registration you created, select it and click Review + assign.
    3. Repeat these steps to integrate multiple subscriptions and resources groups.

Configuring the data source

  1. Display name:
    Enter a name for your data source. This helps you to identify this data source in the list of your data sources.

    If connecting to multiple Prometheus instances, you may want to give this data source a more descriptive name such as Prometheus Prod.
  2. Query endpoint:
    Enter the URL obtained in Finding the query endpoint URL above.
  3. Directory (tenant) ID:
    Enter the value obtained in Configuring application credentials above.
  4. Application (client) ID:
    Enter the value obtained in Configuring application credentials above.
  5. Client secret:
    Enter the value obtained in Configuring application credentials above.
  6. Enable object indexing:
    Select to index Prometheus labels as objects in SquaredUp. Indexing labels as objects makes it easier to correlate, explore and query your Prometheus data. The following options display:
    1. Import common Kubernetes labels:
      Select to index labels commonly used for Kubernetes environments, such as cluster, node and namespaces.
    2. Index custom labels:
      Select to index custom labels as. Custom labels are configured using the following JSON format, where:
      • match is the PromQL selector that returns a vector with the labels to index.
      • labels is an array of the labels in the vector to index.
      • nameLabel is the name of the label to use as the object display name.
        [
          {
            match: 'kube_pod_info{namespace="myapp"}',
            labels: [
              'cluster',
              'namespace'
            ],
            nameLabel: 'namespace'
          }
        ]
    3. Restrict access to this data source:
      Optionally, enable this toggle if you only want certain users/groups to have access to the data source, or those with the permission to link it to new workspaces. See data source access control for more information.

    4. Click Test and add to validate the data source configuration. SquaredUp will now attempt to connect to SquaredUp using the provided authentication method.

      • Testing passed – a success message will be displayed and then the configuration will be saved.
      • Testing passed with warnings – warnings will be listed and potential fixes suggested. You can still use the data source with warnings. Select Save with warnings if you believe that you can still use the data source as required with the warnings listed. Alternatively, address the issues listed and then select Rerun tests to validate the data source configuration again. If the validation now passes, click Save.
      • Testing Failed – errors will be listed and potential fixes suggested. You cannot use the data source with errors. You are able to select Save with errors if you believe that a system outside of SquaredUp is causing the error that you need to fix. Alternatively, address the issues listed and then select Rerun tests to validate the data source configuration again. If the validation now passes, click Save.

      You can edit data source configurations at any time from Settings > Data Sources.

Next steps

Data streams

You can use these data streams to create new tiles to show data, or if there are preconfigured dashboards installed you can copy or edit those.

Data streams standardize data from all the different shapes and formats your tools use into a straightforward tabular format.

While creating a tile you can tweak data streams by grouping or aggregating specific columns.

Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.

Data streams can be either global or scoped:

  • Global data streams are unscoped and return information of a general nature (e.g. "Get the current number of unused hosts").
  • A scoped data stream gets information relevant to the specific set objects supplied in the tile scope (e.g. "Get the current session count for these hosts").

See Data Streams for more information.

The following data streams are installed with this plugin.

PromQL

Executes a PromQL query

Parameters

Was this article helpful?


Have more questions or facing an issue?