Automated Diagnostic Agent Installation

      Comments Off on Automated Diagnostic Agent Installation

In SAP world, Solution Manager with focus insights provides us the dashboard features in various perspectives useful for Operation Team, Managers and Governance Team for audits.

Diagnostic Agent need to installed in all Managed systems to collect the data for the Solution Manager. When our landscape has only few SAP products, its feasible option to perform manually. Imagine for example, if you have more than 500 systems in your entire SAP landscape. Do you want to install them manually?

In such cases, SAP provided us an option to run the SWPM in silent mode.

Step 1: Pick a system to start installation manually. Continue till the end of the preparation Phase.

Step 2: Go to the sapinst_instdir folder created in TEMP location and copy the inifile.params files to other location for the next systems.

Step 3: Adjust the parameter files with SID and SLD details.

Step 4: Run the below command by passing parameter files as argument

 ./sapinst SAPINST_INPUT_PARAMETERS_URL=inifile.params SAPINST_EXECUTE_PRODUCT_ID=NW_DiagnosticsAgent:GENERIC.IND.PD SAPINST_SKIP_DIALOGS=true -nogui -noguiserver

Note: For any queries , refer snote -2509959

Now we need to write a shell/python/Ansible script to call the above command after setting the environment

I am writing shell script here to do it.

#!/bin/csh
setenv TEMP $1
setenv ifile $2
chmod -R 755 TEMP
chown root:sapinst TEMP
./sapinst SAPINST_INPUT_PARAMETERS_URL=ifile SAPINST_PARAMETER_CONTAINER_URL=inifile.xml SAPINST_EXECUTE_PRODUCT_ID=NW_DiagnosticsAgent:NW740.IND.PD SAPINST_SKIP_DIALOGS=true

We are passing TEMP and ifile as command line parameters to the shell script

#csh install.sh /usr/sap/DASID/TEMP inifile.params

Even we can generate template (params files) by using regular expressions in the shell libraries. once after having all parameters files for entire landscape and TEMP locations for installation we can schedule above command to run installation as cron jobs