Create high-availability cluster provider for Azure Monitor for SAP solutions

In this how-to guide, you learn how to create a high-availability (HA) Pacemaker cluster provider for Azure Monitor for SAP solutions. You install the HA agent and then create the provider for Azure Monitor for SAP solutions.

Prerequisites

Install an HA agent

Before you add providers for HA (Pacemaker) clusters, install the appropriate agent for RHEL/SUSE in your environment in each of the cluster node.

For SUSE-based clusters, install ha_cluster_provider in each node. For more information, see the HA cluster exporter installation guide. Supported SUSE versions include SLES for SAP 12 SP3 and later versions.

For SUSE-based Pacemaker clusters, Please follow below steps to install in each of the cluster node

Install an HA cluster exporter on SUSE

  1. Install the required packages for Prometheus cluster exporter on the system.

    sudo zypper install prometheus-ha_cluster_exporter
    
  2. Enable and start the Prometheus cluster exporter as service

    sudo systemctl start prometheus-ha_cluster_exporter
    
    sudo systemctl enable prometheus-ha_cluster_exporter
    
  3. Data is collected in the system through the ha_cluster_exporter. You can export the data via URL http://<ip address of the server>:9664/metrics. To check if the metrics are fetched via URL on the server where the ha_cluster_exporter is installed, Run the following command on the server.

     curl http://localhost:9664/metrics
    

For RHEL-based clusters, install performance co-pilot (PCP) and the pcp-pmda-hacluster subpackage in each node. For more information, see the PCP HACLUSTER agent installation guide. Supported RHEL versions include 8.2, 8.4, and later versions.

For RHEL-based Pacemaker clusters, Please follow below steps to install in each of the cluster node

Install an HA cluster exporter on RHEL

  1. Install the required packages for PCP on the system.

    sudo yum install pcp pcp-pmda-hacluster
    
  2. Enable and start the required PCP Collector Services.

    sudo systemctl start pmcd
    
    sudo systemctl enable pmcd
    
  3. Install and enable the HA cluster PMDA. Replace $PCP_PMDAS_DIR with the path where hacluster is installed. Use the find command in Linux to find the path of "hacluster" bits. Usually hacluster is in path "/var/lib/pcp/pmdas". Example: cd /var/lib/pcp/pmdas/hacluster

    cd $PCP_PMDAS_DIR/hacluster
    
    sudo ./Install
    
  4. Enable and start the pmproxy service.

    sudo systemctl start pmproxy
    
    sudo systemctl enable pmproxy
    
  5. Data gets collected in the system by PCP. You can export the data by using pmproxy via URL http://<ipaddress of the serrver>:44322/metrics?names=ha_cluster. To check if the metrics are fetched via URL on the server where the hacluster is installed, Run the following command on the server.

     curl http://localhost:44322/metrics?names=ha_cluster
    

Prerequisites to enable secure communication

To enable TLS 1.2 or higher, follow the steps in this article.

Create a provider for Azure Monitor for SAP solutions

  1. Sign in to the Azure portal.

  2. Go to the Azure Monitor for SAP solutions service.

  3. Open your Azure Monitor for SAP solutions resource.

  4. On the resource menu, under Settings, select Providers.

  5. Select Add to add a new provider.

    Diagram that shows Azure Monitor for SAP solutions resource in the Azure portal, showing button to add a new provider.

  6. For Type, select High-availability cluster (Pacemaker).

  7. (Optional) Select Enable secure communication and choose a certificate type.

  8. Configure providers for each node of the cluster by entering the endpoint URL for HA Cluster Exporter Endpoint.

    1. For SUSE-based clusters, enter http://<IP-address>:9664/metrics.

      Diagram that shows the setup for an Azure Monitor for SAP solutions resource, showing the fields for SUSE-based clusters.

    2. For RHEL-based clusters, enter http://<'IP address'>:44322/metrics?names=ha_cluster.

      Diagram that shows the setup for an Azure Monitor for SAP solutions resource, showing the fields for RHEL-based clusters.

  9. Enter the SID - SAP system ID, Hostname - SAP hostname of the Virtual machine (Command hostname -s for SUSE and RHEL based servers provide hostname detail), and Cluster - Provide any custom name that is easy to identify the SAP system cluster - this Name is visible in the workbook for metrics (need not have to be the cluster name configured on the server).

  10. Select "Start test" under "Prerequisite check (Preview) - highly recommended" - This test helps validate the connectivity from AMS subnet to the SAP source system and list out if any errors are found - which need to be addressed before provider creation otherwise the provider creation will fail with error.

  11. Select Create to finish creating the Provider.

  12. Create provider for each of the servers in the cluster to be able to see the metrics in the workbook. For example, if the Cluster has three servers configured, Create three providers for each of the three servers with all of the above steps followed.

Troubleshooting

Use the following troubleshooting steps for common errors.

Unable to reach the Prometheus endpoint

When the provider settings validation operation fails with the code PrometheusURLConnectionFailure:

  1. Restart the HA cluster exporter agent.

    sudo systemctl start pmproxy
    
  2. Reenable the HA cluster exporter agent.

    sudo systemctl enable pmproxy
    
  3. Verify that the Prometheus endpoint is reachable from the subnet that you provided when you created the Azure Monitor for SAP solutions resource.

Next steps