You have configured SSL for enabling secure connections to SAP Host Agent. In such a case you need to regularly update or extend the validity of the SAP Host Agent PSE certificate. With Focused run System Monitoring you can create custom metric for monitoring SAP Host Agent PSE certificate expiry.
Step1: Navigate to Host Template maintenance
SAP Host Agent resides at OS level of each host of systems that you are monitoring using Focused Run. Hence you need to monitor the PSE certificate for SAP Host Agents of each host in your customer network.
In our recent blog we have explained how you can configure URL Certificate monitoring in Health Monitoring in SAP Focused Run. However configuring certificate monitoring for each SAP Host Agent in your customer network using Health Monitoring will be very cumbersome.
An easier way will be to setup a custom metric in the host level system monitoring template which when activated will be automatically applied to all hosts for which the monitoring template is used.
For template maintenance you can navigate to System Monitoring Template Maintenance app on the Focused Run launch pad.
In the template maintenance app navigate down to the Host (Server) node and then to the respective template which you want to edit and click on Edit button.
Step2: Create Custom Metric
In order to create a custom metric you need to activate expert mode. For this click on the Expert Mode button as shown below.
After enabling expert mode you can click on Create button. Select Metric in the drop down from Create button.
In the Metric creation pane, under Overview tab enter the details as shown below.
Then in the Data Collection tab, provide the details as shown below.
For the URL field you need to mention the URL https://$SAP_ComputerSystem.FQDName$:1129/SAPHostControl/?wsdl in which the expression $SAP_ComputerSystem.FQDName$ will dynamically resolve the respective FQDN of the host picked up from LMDB. Hence it is important to select the check box under Placeholder and select LMDB under Placeholder type.
Then navigate to the Threshold tab and provide the threshold as shown below. In this example the threshold is Yellow if certificate is expiring in 30 days and Red if its expiring in 15 days.
Then click on Next button to navigate to the Assignment tab where we assign this metric to an existing alert. In this step just click on the Finish button to save the metric. In this step we don’t assign to any alerts yet as we are yet to create a custom alert for this custom metric.
Step3: Create custom Alert and assign to custom Metric
In the expert mode maintenance go to the Create button and then from the drop down select Alert.
Enter the details as shown below and click on Next button.
Then in the Assignments tab you will see the custom metric you just created. Select the check box for this metric and click on Finish to save the alert.
Now your custom metric is ready together with alerting active.
To activate this template update on all hosts navigate to Managed Objects tab for the template and click on Apply and Activate button.
Upon activation the new metric will be available in system monitoring as shown below.
For more details on how to setup SSL for SAP Host Agent you can refer to the SAP documentation here.