Configure the Dynatrace APM Polling LAM

Dynatrace AppMon provides comprehensive application monitoring and performance lifecycle management. Moogsoft Dynatrace APM Polling LAM connects with Dynatrace AppMon, fetches incidents from it and forwards them to Moogsoft AIOps.

You can install a basic Dynatrace APM Polling integration in the UI. See Dynatrace APM Polling for UI integration steps.

Before You Begin

The Dynatrace APM Plugin LAM has been validated with Dynatrace APM v 6.5 and v. 7.0. Before you start to set up the LAM, ensure you have met the following requirements for each Dynatrace server:

  • You have the URL for your Dynatrace APM server.

  • You have the credentials to connect to Dynatrace APM.

  • The port for your Dynatrace APM server is open and accessible from the Moogsoft AIOps server.

Additionally, you can provide optional configuration details. See the LAM and Integration Reference for a description of all properties.

Configure the LAM

Edit the configuration file to control the behavior of the Dynatrace APM Polling LAM. You can find the file at $MOOGSOFT_HOME/config/dynatrace_apm_lam.conf

The Dynatrace APM Polling LAM is a REST-based LAM as it provides an HTTP endpoint for data ingestion. Note that only the generic REST LAM properties in dynatrace_apm_lam.conf apply to integrating with Dynatrace; see the LAM and Integration Reference for a full description of all properties.

Some properties in the file are commented out by default; uncomment these to enable them. For a full description of all properties, see Dynatrace APM Polling LAM Reference and LAM and Integration Reference.

  1. Configure the connection properties for each target source:

    • url: Address on the Moogsoft AIOps server that listens for REST messages. Defaults to all interfaces.

    • username: Username of the account you use to connect to your Dynatrace APM console.

    • password or encrypted_password: Password or encrypted password of the account you use to connect to your Dynatrace APM console.

  2. If you want to connect through a proxy server, configure the host, port, user, and password or encrypted password properties in the proxy section for the target.

  3. Configure the SSL properties if you want to encrypt communications between the LAM and the REST connection:

    • path_to_ssl_files: Path to the directory that contains the SSL certificates.

    • server_cert_filename: SSL root CA file.

    • client_key_filename: Client SSL key file.

    • client_cert_filename: Client certificate file.

  4. Configure the LAM behavior for each target:

    • request_interval: Length of time to wait between requests, in seconds.

    • timeout: Length of time to wait before halting a connection or read attempt, in seconds.

    • max_retries: Number of times the LAM attempts to reconnect after connection failure.

    • retry_interval: Length of time to wait between reconnection attempts, in seconds.

  5. Optionally configure filtering to determine which events the LAM fetches. See Dynatrace APM Polling LAM Reference for the options.

  6. Optionally configure the LAM identification and capture logging details:

    • name: Maps to $Laminstancename, so that the agent field indicates events Moogsoft AIOps ingests from this LAM.

    • capture_log: Name and location of the LAM's capture log file, which it writes to for debugging purposes.

  7. Optionally configure severity conversions. See Severity Reference for further information and "Conversion Rules" in Data Parsing for details on conversions in general.

  8. Optionally configure the process logging details:

    • configuration_file: Name and location of the LAM's process log configuration file. See Configure Logging for more information.

Example

You can configure the Dynatrace APM LAM to retrieve events from one or more sources. The following example demonstrates a configuration that targets two Dynatrace APM sources. For a single source comment out the target2 section. If you have more than two sources, add a target section for each one and uncomment properties to enable them.

monitor:
        {
            name                                    : "DynatraceApm Lam Monitor",
            class                                   : "CDynatraceApmMonitor",
            request_interval                        : 60,
            max_retries                             : -1,
            retry_interval                          : 60,
            targets:
                    {
                        target1:
                                {
                                    url                             : "http://exampledynatraceapm1:8021",
                                    user_name                       : "dynatraceapm_user1",
                                    #password                       : "password",
                                    encrypted_password              : "qJAFVXpNDTk6ANq65pEfVGNCu2vFdcoj70AF5BIebEc=",
                                    disable_certificate_validation  : false,
                                    path_to_ssl_files               : "config",
                                    server_cert_filename            : "server1.crt",
                                    client_key_filename             : "client1.key",
                                    client_cert_filename            : "client1.crt",
                                    ssl_protocols                   : [ "TLSv1.2" ]
                                    request_interval                : 60,
                                    timeout                                                 : 120,
                                    max_retries                     : -1,
                                    retry_interval                  : 60,
                                    filter                          :
                                                                    {
                                                                        #profilename: "",
                                                                        #incidentRule: "",
                                                                        #state: "",
                                                                        #time_from: "",
                                                                        #time_till: "",
                                                                    }
                    }

                        target2:
                                {
                                    url                             : "http://exampledynatraceapm2:8021",
                                    user_name                       : "dynatraceapm_user2",
                                    #password                       : "password",
                                    encrypted_password              : "bDGFSClSHBn8DSw43nGwSPLSv2dGwdsj50WD4BHdfVa&",
                                    disable_certificate_validation  : false,
                                    path_to_ssl_files               : "config",
                                    server_cert_filename            : "server2.crt",
                                    client_key_filename             : "client2.key",
                                    client_cert_filename            : "client2.crt",
                                    ssl_protocols                   : [ "TLSv1.2" ]
                                    request_interval                : 60,
                                    timeout                         : 120,
                                    max_retries                     : -1,
                                    retry_interval                  : 60,
                                    filter                          :
                                                                    {
                                                                        profilename: "Profile1",
                                                                        incidentRule: "Rule1",
                                                                        state: "Created",
                                                                        time_from: "2018-01-31T12:00:00.235-0700",
                                                                        time_till: "2018-02-30T12:00:00.235-0700",
                                                                    }
                                }
                    }
        }

Configure for High Availability

Configure the Dynatrace APM Polling LAM for high availability if required. See High Availability Overview for details.

Configure LAMbot processing

The Dynatrace APM Polling LAMbot processes and filters events before sending them to the Message Bus. You can customize or bypass this processing if required. You can also load JavaScript files into the LAMbot and execute them.

See LAMbot Configuration for more information. An example Dynatrace APM Polling LAM filter configuration is shown below.

filter:
{
    presend: "DynatraceAPMLam.js",
    modules: [ "CommonUtils.js" ]
}

Start and Stop the LAM

Restart the Dynatrace APM Polling LAM to activate any changes you make to the configuration file or LAMbot.

The LAM service name is dynatraceapmlamd.

See Control Moogsoft AIOps Processes for the commands to start, stop and restart the LAM.

You can use a GET request to check the status of the Dynatrace APM Polling LAM. See "Check the LAM Status" in Configure the REST LAM for further information and examples.

Configure Dynatrace

After you have the Dynatrace APM Polling LAM running and listening for incoming requests, you can configure Dynatrace. See "Configure Dynatrace" in Dynatrace APM Polling.