• Home
  • Setup and configuration
  • Dynatrace OneAgent
  • Installation and operation
  • z/OS
  • z/OS installation overview
  • Install the zRemote module
  • Customize the zRemote module

Customize the zRemote module

You can customize the zRemote module to enable optional features:

  • Define host groups to organize multiple LPARs.
  • Fetch full SQL statements from DB2 databases.

Host groups

Host groups are helpful when you need to organize multiple LPARs connecting to a single zRemote module. An LPAR can be assigned to a host group by setting the [HostGroup] attribute in the zremoteagentuserconfig.conf file. An LPAR can belong to only one host group.

Location of the zremoteagentuserconfig.conf file:

txt
/var/lib/dynatrace/zremote/agent/conf/zremoteagentuserconfig.conf
txt
C:/ProgramData/dynatrace/zremote/agent/conf/zremoteagentuserconfig.conf

To assign an LPAR to a host group, specify the group name in between a pair of [HostGroup] attributes. The [HostGroup] attribute pair can occur anywhere in the zremoteagentuserconfig.conf file.

dns
[HostGroup] <LPAR_Name1>=<HostGroupName> <LPAR_Name2>=<HostGroupName> [HostGroup]

The LPAR name is the 8 characters logical partition name defined in the LPARNAME() parameter in IEASYMxx member in z/OS.

The LPAR name is also displayed in the Properties and tags section on the host screen.

The following requirements apply to the <HostGroupName> string:

  • Can contain only alphanumeric characters, hyphens (-), underscores (_), and dots (.)
  • Must not start with dt.
  • Maximum length is 100 characters
Combining three LPARs to a single host group

In this example, we add three LPARs—LPARA, LPARB, and LPARC to a single host group TEST_HOST.

dns
[HostGroup] LPARA=TEST_HOST LPARB=TEST_HOST LPARC=TEST_HOST [HostGroup]
Assigning three LPARs to different host groups

In this example we assign each LPAR to a separate host group.

dns
[HostGroup] LPARA=TEST_HOST LPARB=PROD_HOST LPARC=PERF_HOST [HostGroup]
Notes
  • In host settings, only the General, Monitoring mode, and Detected processes are applicable for a host group pertaining to a z/OS host.
  • ActiveGate version 1.213+ Store your host group settings only in the zremoteagentuserconfig.conf file and migrate your host group settings from the ruxitagent.conf file.
  • Host group settings take effect during zRemote start up. You must restart the zRemote module after defining host group in the zremoteagentuserconfig.conf file.

SQL statement fetch

Dynatrace can provide insight into SQL statements based on tracing of DB2 and DL/I database calls. These SQL statements are shown in Dynatrace, for example, as:

  • FETCH (PROGNAME;165;3)
  • CLOSE (PROGNAME;441;2)

The string represents the program name (DBRM name), the line number, and the section number.

Example for captured SQL statements

zRemote SQL statement fetch off

ActiveGate version 1.241+ Dynatrace can provide deeper insight into DB2 database calls by fetching the full SQL statements from the DB2 catalog. With the SQL statement fetch feature enabled, the SQL statements are shown in Dynatrace, for example, as:

  • FETCH (GETTAB INTO : H , : H , : H , : H , : H)
  • CLOSE (GETTAB)
Example for captured SQL statements with enabled SQL statement fetch feature

zRemote SQL statement fetch on

Enable SQL Statement fetch

The SQL statement fetch feature is disabled by default. To enable it

  1. Install and configure the IBM Data Server Driver for ODBC and CLI software on Linux or Windows. Further reading: IBM DB2 ODBC CLI driver Download and Installation information.

    In the installation step take note of the location of the CLI driver library:

    • libdb2.so for Linux
    • db2app64.dll for Windows

    In the configuration step, take note of the DB2 aliases (or DSN).

    Both are required in the next steps.

    Notes
    • The zRemote module supports only 64-bit CLI driver.
    • Be sure to test the CLI driver configuration to ensure good DB2 connections.
  2. In the zremoteagentuserconfig.conf file of the zRemote module, define the CLI driver library and DB2 alias group (similar as defining host groups), for example:

    console
    # Linux cli_driver_lib=/opt/IBM/CLIDRIVER/lib/libdb2.so # ... or Windows cli_driver_lib=C:/IBM/CLIDRIVER/bin/db2app64.dll [DbAlias] dbHost1.dbName1=alias1 dbHost2.dbName2=alias2 dbHostN.dbNameN=aliasN [DbAlias]

    where dbHost is the z/OS SMF ID and dbName is the DB2 subsystem name. All is case sensitive.

  3. optional Define sqlStmtCacheFileName=/tmp/sqlStmtCacheFileName, as an example, to cache the fetched SQL statements to a file and use it upon a zRemote module restart, thus reducing DB2 interactions. Be sure to use the appropriate fully qualified file name.

  4. Restart the zRemote module.

    Notes
    • The zRemote module will only enable the SQL statement fetch feature if the CLI driver can be loaded successfully and there is at least one DB2 alias defined.
    • If the DB2 alias is later found to be invalid, the feature is disabled.