Why updating the Host Agent is essential for Solution Manager Applications
What is one of the most common mistakes SAP clients make? Failing to keep the Host Agent up to date on all of their hosts that are running SAP and Non-SAP Applications or databases. This mistake is especially easy to make when your SAP landscape is very large, due to the extensive amount of time it take to manually update the host agent on every single host in a large SAP landscape. The other mistake I see on a regular basis is that most clients don’t think that the Host agent is critical enough to spend the time and money to keep it up to date. This blog is meant to outline the importance of why you must keep the host agent up to date and how to configure the auto update feature for host agents.
What is the Host Agent and what is it used for?
First lets discuss what the host agent is designed to do. The Host agent is designed collect all types of information on the host. From Performance data, Disk Space usage to the technical details of a host; Hostname, OS version, and IP address are collected with the application SAPOsCol built into the host agent. The host agent can also collect data on a database, if a database is running on that host. The process of collecting these technical details is called Outside Discovery and is absolutely essential for Solution Manager to monitor the host. The host agent is a primary component of Technical Monitoring or Root Cause Analysis within Solution manager 7.1. Besides the Host itself, the host agent also collects data on the SAP application running on the host. SAP Instance discovery and inventory provides the detailed information on the release of the Kernel, Application, and instance details. This SAP application information is critical to the functionality of Maintenance Optimizer Transactions (MOPZ). Beyond data collections, the host agent provides Instance and Host control to the SAP application and Solution Manager. The host agent is owned by an administrator level user. Within the host agent profile the Diagnostic Agent User “DAAADM” is listed as an administrator of the Host agent, therefore giving Solution Manager direct access and control of the SAP instance and the host via the host agent. This control can be used in a variety of ways including executing scripts directly on the host.
All of this data collection and host/SAP Instance control capabilities are critical to the Functionality of many applications within Solution Manager 7.1. If any of the components of the Host Agent are not functioning properly the Solution Manager Application will not have the data or the control that is required to function properly. Therefore it is critical to keep the host agent up to date at all times. In my experience I have seen a number of issues that were directly caused by an out of date Host Agent. Primarily within both Root Cause analysis and Technical Monitoring. Root cause analysis pulls statistical data on the host via the Diagnostic agent and the SAP Application. Both the Diagnostics agent and the SAP application running on the host utilize the Host Agent to collect data on the host. In many cases old versions of the host agent failed to collect different types of data, in turn causing Root Cause Analysis within Solution Manager to be lacking this data. Also Host level metrics within Technical Monitoring utilize this same data to send alerts on many areas including Memory usage, Disk capacity, and SAP application Process availability. Many times old versions of the host agent cause these metric to fail to either function properly or collect data.
The latest issue I have confronted was while utilizing SAP’s latest Solution Manager Application, Scope and Effort Analyzer (SEA). This new tool is provided with the latest version of Solution Manager 7.1 SP12. This tool allows you to analyze the scope of activities and the effort that will be required to complete an upgrade of an SAP system; before you even start the upgrade. SEA utilizes the data provided when completing a Maintenance Optimizer Transaction (MOPZ). Maintenance Optimizer analyzes a system and provids the exact installation media that is required to complete the deployment of an Enhancement Package (EHP) or a Support Package (SP). Maintenance Optimizer does this by pulling data in a variety of ways, some of this data is pulled directly by the Host Agent. The SAP Instance discovery and inventory capabilities of the Host agent are responsible for providing this data. In older versions, as recent as patch 170, the host agent fails to collect the Release version of the Kernel of the SAP application. This data is key to the successful implementation of Scope and Effort Analyzer. Yet another reason to keep the host agent up to date.
Configuring Auto Update
The easiest way to keep you host agent up to date is to configure automatic update. The process of configuring automatic update means that each host agent is configured to check a single central shared location for a new patch. The latest patch available from SAP is 201. SAP releases a new patch every couple weeks, making it incredibly hard to keep the host agent up to date on all of your SAP application and Database hosts, unless you have automatic update configured.
First you must create a shared directory on your internal network that all of your hosts can access. Then add 2 parameters to the host agent profile in the “exe” directory of every host agent in your SAP landscape. The first parameter sets the agent check the shared directory you just created for a new patch; <DIR_NEW = (path to shared directory)>. The second parameter changes the frequency that the host agent performs a check of the directory for a new patch; <hostexec/autoupgrade_delay = (minutes)>. To enable the new parameters execute the command <saphostexec –restart> in the exe directory of the host agent.
By default the auto upgrade check is every 5 minutes, this is way to frequent for medium to large SAP environments with 30+ host agents. If you have a large number of hosts, 50+ plus host agents, I would recommend configuring the host agent to randomly check for a new patch. This will ensure you don’t create an issue where a network bandwidth bottleneck is caused or in some cases even causing a network outage. All that is required is to create a text file in the shared directory that holds the new patches. Name the file “.delay” and enter the following formula, (value1)random(value2). Both values are entered inminutes. Value 1 signifies frequency in which a new patch check is performed. Value 2 is the maximum amount of time at which the actual upgrade is started. So if you enter 500random500, the check is performed every 8 hours and the actual patch will happen randomly in the next 8 hours after a new patch is detected. Increase these values as the number of host agent’s increase. A restart of the host agent is not required if the .delay file is changed.
To perform an upgrade extract the (hostagentpatch).sar file into a directory on your pc. Create a file called “.upgrading” in the shared directory that holds the new host agent patches. This .upgrading file tells any host agents that check for a new patch, not to execute an upgrade. The .upgrading file will ensure that no host agents are partially patched while you copy in the new patch files. Delete the old patch files and copy in the new extracted host agent patch. Lastly delete the .upgrading file. Wait the amount of time that is expected for all patches to be complete and check a few of the host agents to ensure they are up to date with the latest patch that you just copied into the shared directory. Use the command <saphostexec –version> in the exe directory of any host agent. This will give you the current version of the host agent. You can also check the version in Solution Manager.