Enabling and Initializing the APM ETL

Overview of the APM ETL Enablement and Initialization Process

When you enable and initialize the APM ETL package, the following actions are performed:
Enablement of Application Response Measurement (ARM)
The SAS Application server environment is modified to enable ARM.
Activation of loggers and appenders
SAS logging facility loggers and log appenders are activated to support the ARM-enabled SASApp deployment
Note: One of the SAS resources for which logging is enabled is the SAS Workspace Server. Logging of this server causes a separate log file to be created in the Lev1/SASApp/WorkspaceServer/PerfLogs directory for each spawned SAS Workspace Server. You must be aware of the potential for the large number of log files that can be created in this directory. This situation can occur if you have a large number of SAS Enterprise Guide or SAS Data Integration Studio users, because each session for those applications generates a separate log file. You can create a daily archive of the logs in a .zip or .tar file and then copy the daily archive to another storage location. This process enables you to manage the large number of log files while maintaining IT best practices for retaining usage logs.
Note: SAS Workspace Servers are typically configured to run under the client's user identity. In order for logging of SAS Workspace Servers to function correctly, you must ensure that the permissions are specified correctly on the log directories. All users of the SAS Workspace Server and all SAS Environment Manager users that run the APM ETL processes must have Read, Write, and Execute permissions for the /SAS/Config/Lev1/SASApp/WorkspaceServer/Logs and /SAS/Config/Lev1/SASApp/WorkspaceServer/PerfLogs directories.
After the APM ETL is enabled and initialized, the ETL process begins extracting data from SAS logs and loading that data into the SAS Environment Manager Data Mart so that the applicable stored processes and stored process reports have data to work with. Data is extracted from the SAS logs only when the logs roll over (usually after midnight). You must wait until after midnight before data appears in Service Management Architecture metrics and reports.

APM ETL Enablement and Initialization Steps

To enable and initialize APM ETL:
  1. Ensure that SAS Environment Manager Extended Monitoring has been initialized.
  2. Back up your configuration files and the SAS metadata repository.
  3. Change to the directory [levelroot]/Web/SASEnvironmentManager/emi-framework/bin.
  4. Verify that the SAS Metadata Server is running, and then run the command ./apm_init.sh (UNIX) or apm_init.bat (Windows). If you have a host alias, you must add the option -–hostAlias hostAliasName.
    The command creates the files configureAPMlocal_<machine>.sh (UNIX) or configureAPMlocal_<machine>.bat (Windows) for each machine in your environment.
    Note: If your SAS environment contains servers that have been manually configured, that are not part of a standard installation by the SAS Deployment Wizard, or that make up a load-balancing deployment, the generated configureAPM files represent a best attempt at creating the configuration for the servers.
  5. Check the logs under the emi-framework/Logs directory for errors.
  6. Change to the directory [levelroot]/Web/SASEnvironmentManager/emi-framework/apm.
  7. Run the command ./configureAPMlocal_<localmachine>.sh (UNIX) or configureAPMlocal_<localmachine>.bat (Windows), where <localmachine> corresponds to the machine that you are currently using.
  8. If your environment has multiple machines, copy each configureAPMlocal_<machine>.sh or configureAPMlocal_<machine>.bat file to each machine that corresponds to the <machine> value. Make sure that each script has Execute permissions on the machine that it was copied to, and then run the script on each machine.
  9. If your environment has multiple machines, edit the file [levelroot]/Web/SASEnvironmentManager/emi-framework/Conf/log_definitions.json. Locate the entries labeled “levRoot” :”DEFINE_THIS_MOUNT_POINT”. Above each of these entries is a description of the remote host’s name and the definition for the levRoot path from the perspective of the remote host. Change the DEFINE_THIS_MOUNT_POINT string to the path of the levRoot directory from as seen from the APM ETL host.
    For example, if you have a two-machine deployment with the EMI framework deployed on machine alpah.example.com and additional SAS resources on a second host named beta.example.com, the log-definitions.json file on apla.example.com has several entries like this:
    “name”: “SAS – Logical Pooled Workspace Server”,
    “hostname”: “beta.example.com”,
    “hostLevRoot”: “/usr/local/SAS/config/Lev1”,
    “levRoot”: “DEFINE_THIS_MOUNT_POINT”,
    “contextName”: “SASApp”,
    “logLocation”: “PooledWorkspaceServer/PerfLogs”,
    “baseFilename”: “arm4_PooledWSServer”,
    “operation”: “Move”
    
    The hostLevRoot value specifies the path to the SAS configuration from the perspective of the machine specified by the hostname value (beta.example.com). If the beta.example.com machine uses NFS to export the specified directory, it might be specified differently on the alpha.example.com machine (such as /remote/beta/Lev1). In that case you would change the levRoot value to “levRoot”: “/remote/beta/Lev1”,.
  10. On each machine in your deployment, ensure that no other users are working in the SAS server environment, and then restart the SAS Metadata Server, SAS Object Spawner, SAS OLAP Server, and Connect Server. Because you should not restart the SAS Environment Manager Server, do not issue the sas.servers restart command..
    On UNIX, issue these commands for each SAS Application Server context:
    <levelroot>/SASMeta/MetadataServer.sh restart
    <levelroot>/ObjectSpawner/ObjectSpawner.sh restart
    <levelroot>/ConnectSpawner/ConnectSpawner.sh restart
    <levelroot>/SASApp/OLAPServer/OLAPServer.sh restart
    On Windows, the servers are usually deployed as Windows services. Follow these steps to restart the servers:
    1. Run Windows using an administrative user ID, and then select Windows Startthen selectControl Panelthen selectAdministrative Toolsthen selectServices. The Services window appears.
    2. Right-click each of the following entries in the window and select Stop from the pop-up menu:
      • SAS [Config-Lev1] SASApp – OLAP Server
      • SAS [Config-Lev1] Connect Spawner
      • SAS [Config-Lev1] Object Spawner
    3. After you have stopped the previous three servers, right-click SAS [Config-Lev1] SASMeta – Metadata Server and select Restart from the pop-up menu. Restarting the SAS Metadata Server automatically restarts the OLAP Server, the connect spawner, and the object spawner.
  11. After the configuration commands have completed, sign on to SAS Management Console. Using the Server Manager plug-in, validate the SAS Metadata Server and the other Enterprise BI servers. The servers generate initial entries in the associated /Logs or /PerfLogs directories. Sign off from SAS Management Console after you validate the servers.
  12. On the machine on which SAS Environment Manager is installed, change to the [levelroot]/Web/SASEnvironmentManager/emi-framework/bin directory.
  13. From a command line, issue the command ./emi_init.sh --enable APM (UNIX) or emi_init.bat --enable APM (Windows).
  14. After the initialization process has completed, sign in to SAS Environment Manager. Select Resourcesthen selectBrowsethen selectServersthen selectSAS Environment Manager Data Mart 9.4.
  15. On the Resource Detail page for the SAS Environment Manager Data Mart 9.4, select the APM ETL Processing service.
  16. On the Resource Detail page for APM ETL Processing, select Tools Menuthen selectConfigure Service. Specify the information in the required fields and then click OK.

Setting up OLAP Server Log Parsing

Although the APM ETL process can parse and analyze logs from an OLAP server, the best practice is to specify a rolling log appender for the OLAP server. This appender enables the ETL process to copy and process the log entries from the previous day. To specify the appender, follow these steps:
  1. In the directory [levelroot]/Web/SASEnvironmentManager/emi-framework/ConfigureFiles, edit the file logconfig.apm.xml.
  2. In the file logconfig.apm.xml, replace the three instances of the string <DEFINE_THIS_VALUE> with the path name for the OLAP server at your site. To determine the value for this path, you can check the logconfig.apm.xml file in the [levelroot]/SASApp/OLAPServer directory.
  3. After modifying and saving the logconfig.apm.xml file, copy the file to the [levelroot]SASApp/OLAPServer directory, replacing the file that is already in that directory.
  4. Restart the OLAP Server. Use the command [levelroot]/SASApp/OLAPServer/OLAPServer.sh restart (UNIX) or OLAPServer.bat restart (Windows).
  5. Log on to SAS Management Console and validate the OLAP server to make sure that it has successfully restarted.
Last updated: February 22, 2018