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
- An Azure subscription.
- An existing Azure Monitor for SAP solutions resource. To create an Azure Monitor for SAP solutions resource, see the quickstart for the Azure portal or the quickstart for PowerShell.
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
Install the required packages for Prometheus cluster exporter on the system.
sudo zypper install prometheus-ha_cluster_exporter
Enable and start the Prometheus cluster exporter as service
sudo systemctl start prometheus-ha_cluster_exporter
sudo systemctl enable prometheus-ha_cluster_exporter
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
Install the required packages for PCP on the system.
sudo yum install pcp pcp-pmda-hacluster
Enable and start the required PCP Collector Services.
sudo systemctl start pmcd
sudo systemctl enable pmcd
Install and enable the HA cluster PMDA. Replace
$PCP_PMDAS_DIR
with the path wherehacluster
is installed. Use thefind
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/haclustercd $PCP_PMDAS_DIR/hacluster
sudo ./Install
Enable and start the
pmproxy
service.sudo systemctl start pmproxy
sudo systemctl enable pmproxy
Data gets collected in the system by PCP. You can export the data by using
pmproxy
via URLhttp://<ipaddress of the server>: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
Sign in to the Azure portal.
Go to the Azure Monitor for SAP solutions service.
Open your Azure Monitor for SAP solutions resource.
On the resource menu, under Settings, select Providers.
Select Add to add a new provider.
For Type, select High-availability cluster (Pacemaker).
(Optional) Select Enable secure communication and choose a certificate type.
Configure providers for each node of the cluster by entering the endpoint URL for HA Cluster Exporter Endpoint.
For SUSE-based clusters, enter
http://<IP-address>:9664/metrics
.For RHEL-based clusters, enter
http://<'IP address'>:44322/metrics?names=ha_cluster
.
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).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.
Select Create to finish creating the Provider.
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
:
Restart the HA cluster exporter agent.
sudo systemctl start pmproxy
Reenable the HA cluster exporter agent.
sudo systemctl enable pmproxy
Verify that the Prometheus endpoint is reachable from the subnet that you provided when you created the Azure Monitor for SAP solutions resource.