Functional Overview of ESM
This document is intended as a quick reference which attempts to explain the ESM's basic mechanisms of operation. It is referenced by the installation and configuration documentation. Any users looking to install, configure or administer the ESM application should read this document first.
High Level Overview
An ESM deployment is comprised of one or more instances of ESM Agents, a single instance of the ESM Server application, and any number of client machines which access the ESM application interface through the thin client browser-based front end.
An ESM Agent runs on each SAS Application Server node and is responsible for collecting process and server events and metrics, and submitting them to the ESM Server Application. The ESM Server Application collects metric data from each instance of an ESM Agent and stores it in the ESM Database. It also serves the web-based front end for the ESM application interface and performs a minimal level of scheduled database maintenance.
Mechanisms of Communication
In order to maximise compatibility and stability and eliminate any possibility of interfering with the SAS processes being monitored, ESM depends on SAS DATA Step and the filesystem for inter-process communication.
A SAS process 'reports in' to an ESM agent for monitoring by writing a trigger file to a defined filesystem location. The flat file mostly contains a session's System Options, such as process ID, user, temporary directory location, and process/job name. The creation of this flat file is triggered by a SAS macro function called by the new SAS process' autoexec_usermods.sas, which in turn executes the SAS DATA Step code to create the flat file in order to pass the relevant process information to the ESM Agent process. All ESM supplied SAS macro functions act in this way, ensuring that no locking can occur, or interference can be caused by the integration between SAS and ESM.
The ESM agent on each machine is configured with an events directory, which it continually monitors for trigger files generated by the SAS processes as above. As soon as these triggers appear they are read and archived. The agent acts upon the event (ie. starts monitoring a new process) while continuously monitoring the resource usage of any other active SAS processes that it knows about. The ESM agents submit their data to the ESM Server web application via a periodic Web Service call. The data resolution, disk polilng interval, and other agent settings are configurable via the ESM Admin interface, accessed via the Web GUI.
ESM Agent Events
As the ESM Agent runs on each SAS Application Server node and is responsible for collecting process and server events and metrics specific to that node, each node has its own dedicated Events Directory which the agent monitors for event trigger files. In a multi-node or GRID installation, where the filesystem is clustered, the layout of the event directories may look something like this: