Introduction
The SAP Host Agent provides a REST-API to deploy the Simple Diagnostic Agent (SDA). The SDA is usually deployed via Focused Run (FRUN). However, it is also possible to deploy the SDA directly over the REST-API with tools such as cURL. The SAP Host Agent installs the SDA from the provided archives and starts the SDA subsequently.
Prerequisites
- SAP Host Agent is installed.
- SDA package and JVM package. To obtain the packages please refer to chapter 5.2.2 of the FRUN documentation and follow the steps described in the first item under Activities (https://help.sap.com/doc/b2c1230aa12c4c52a2a9f64fc2e85dbd/).
SDA Deployment
Some hints about the deployment
- A running SDA will be stopped automatically before deployment.
- The old SDA installation will be removed based on the manifest information from the installed packages.
- After a successful deployment the SDA will be started automatically.
- After a successful deployment the SDA OutsideDiscovery will be executed and scheduled.
To deploy the SDA with cURL you need to specify the location of the SDA package (SDA.SAR) and the JVM package (SAPJVM.SAR).
curl -u sapadm -F sda-archive=@/path/to/SDA/SDA.SAR -F jvm-archive=@/path/to/SAPJVM/SAPJVM.SAR http://<hostname>:1128/SMDAgent/deploy
After entering the command you will be prompted to enter the sapadm password.
Alternatively you can skip this step by using Unix domain sockets (Unix only). The respective curl command is:
The usage of Unix domain sockets is available in Unix environments only!
curl --unix-socket /tmp/.sapstream1128 -F sda-archive=@/path/to/SDA/SDA.SAR -F jvm-archive=@/path/to/SAPJVM/SAPJVM.SAR http://<hostname>/SMDAgent/deploy
If the SDA is installed correctly you should see the following output:
<html><head><link rel="stylesheet" type="text/css" href="SAPHostAgent.css"></head> <body> <div>SMD agent successfully deployed</div><div>OutsideDiscovery executed and scheduled</div></body> </html>
To verify that the SDA is running you can issue the command:
curl -u sapadm http://<hostname>:1128/lmsl/sda/default/?service=ping