Dynatrace AppMon Integration

Dynatrace AppMon  provides deep application monitoring and performance lifecycle management. OpsGenie is an alert and notification management solution that is highly complementary to Dynatrace AppMon's alerting mechanism.

What does OpsGenie offer to Dynatrace AppMon users?

OpsGenie provides a powerful two-way integration with Dynatrace AppMon. When a new incident is created in Dynatrace AppMon, a corresponding OpsGenie alert will be automatically created, containing rich information about the incident. OpsGenie will provide rich notifications with on-call rotation, scheduling etc. features and alert escalations; to ensure the best incident management for Dynatrace AppMon customers.

Functionality of the integration

  • When an incident is created in Dynatrace AppMon, it creates an alert in OpsGenie.
  • When an incident is closed in Dynatrace AppMon, the related alert will be closed in OpsGenie automatically.
  • If Send Alert Updates Back to Dynatrace AppMon is enabled, actions for Dynatrace AppMon will be executed in Dynatrace AppMon when the chosen action is executed in OpsGenie for alerts which are created by the Dynatrace AppMon integration.

Add Dynatrace AppMon Integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done so already.
  2. Go to OpsGenie's Dynatrace AppMon Integration page.
  3. Specify who should be notified for Dynatrace AppMon alerts using the "Teams" field. Autocomplete suggestions will be provided as you type.
  4. Copy the integration URL by clicking on the copy button. You will be using this during Dynatrace AppMon Plugin configuration.
  5. Click on "Save Integration."

Configuration in Dynatrace AppMon

  1. First download the OpsGenie Dynatrace AppMon Plugin.
  2. Go to Dynatrace Client and select Manage Plugins from the Tools menu.
  3. Then, click Install Plugin in the opening window.
  4. Select OpsGenie Plugin JAR you downloaded before and click Open.
  5. Then, select OpsGenie Plugin from the listed plugins and click Properties.
  6. Paste the integration URL you copied before to the Webhook URL field in the opening Plugin Properties window. This field can be configured during Edit Incident Rule to use different integrations.
  7. Enter the team names that exist in OpsGenie so that alerts can be created in OpsGenie for those specific teams only. This field can be kept empty and configured during Edit Incident Rule in order to assign different alerts to different teams in OpsGenie.
  8. Click OK, then go to Incidents from left side menu.
  9. From Incidents, select the incident you want to use for OpsGenie alerts and choose Edit Incident Rule from the dropdown menu.
  10. Click Advanced Configuration on the Actions tab.
  11. Then click Add.
  12. Select Dynatrace OpsGenie Plugin from the listed plugins and click Add. Fields in Properties part can be configured here in order to use different integration or assign alerts to different teams in OpsGenie.
  13. Choose on incident begin as Execution option and click OK.

Integration via Marid

You can use OpsGenie's Dynatrace AppMon integration package to update incidents on Dynatrace AppMon. This will enable you to deploy your own scripts / modify the ones provided and execute customized actions on Dynatrace AppMon.

To use Dynatrace AppMon integration package, you need to follow the steps in the sections below through the end.

Download and install Dynatrace AppMon package

For Red Hat Based Distributions
During upgrades, rpm package does not overwrite your existing configurations. It saves the new default configuration file as opsgenie-integration.conf.rpmnew. You can find more information about rpm upgrade config file handling from here.
For Debian Based Distributions For Windows
  • Download OpsGenie Dynatrace AppMon (Windows)
  • Unzip opsgenie integration zip file which contains Marid package into a directory (C:\opsgenie-integration is the preferred path. C:\opsgenie-integration\marid will be referred as MARID_HOME in the rest of documentation.)
  • To install Marid as a service:
    • Open a command window
    • Go to <MARID_HOME> directory
    • For 32 bit systems, run marid.exe -install
    • For 64 bit systems, run marid_64.exe -install
    Name of the service will be assigned to "OpsGenie Marid"
To set JAVA_HOME environment variable, refer to Setting JAVA_HOME for more information.
To enable Ruby scripting, you need to download JRuby Complete jar file and put this jar file in lib directory (/var/lib/opsgenie/marid On Linux, MARID_HOME/lib on Windows systems.).
You may need to restart your system after setting JAVA_HOME environment variable for Windows XP/2000/2003 operating systems due to problem reported at http://support.microsoft.com/kb/821761

Configuring Dynatrace AppMon Integration for Marid

  • Configurations regarding Dynatrace AppMon can be done either via integration page or Marid configuration file opsgenie-integration.conf. Configuration in integration page will precede the configuration file.

Marid Configuration

The plugin uses Marid utility (included in the plugin) to update incidents on Dynatrace AppMon when alerts are updated.

  • To start Marid, run the following command:
    /etc/init.d/marid start 
  • To stop Marid, run the following command:
    /etc/init.d/marid stop 

Marid is a java application; therefore requires the Java Runtime version 1.6+ Both the Open JDK and Oracle JVMs can be used.

Ensure that JAVA_HOME environment variable is set. If it is not, you may set it by removing the comment at the begining of the following line in /etc/opsgenie/profile file and set JAVA_HOME to your JRE installation directory.
#JAVA_HOME=<path/to/JDK or JRE/install>

To be able to execute actions on Dynatrace AppMon, Marid gets the configuration parameters from /etc/opsgenie/conf/opsgenie-integration.conf file.

Configuration Parameters
apiKey Copy the API key from the Dynatrace AppMon integration you've created above
dynatraceappmon.userName Your Dynatrace AppMon username
dynatraceappmon.password Your password for your Dynatrace AppMon user
dynatraceappmon.url Dynatrace AppMon url where actions will be sent to (ex:https://localhost:8021)
dynatraceappmon.profileName The name of the corresponding System Profile

According to the action that will be executed in Dynatrace AppMon, the script to be run can be set here. OpsGenie's script is set by default; you can change the following configuration to run your own custom script if you like.

Action Mappings
mappedActions.inProgressIncident.script dynatraceAppMonActionExecutor.groovy
mappedActions.confirmIncident.script dynatraceAppMonActionExecutor.groovy

Dynatrace AppMon Configurations

  1. Go to Dynatrace Server, and select Users from left menu.
  2. From the Users window, select the role for your user.
  3. Check the permissions of this user role and add Analyze Incidents, Manage Incidents and Web Service Interface Access if the user role don't have these.

Sample parameters sent to Marid

{
   "type":"DynatraceAppMon",
   "alertId":"0e321daf-6532-4277-a61c-83d90dea9969",
   "customerId":"d17aae0e-7730-4788-bbd5-a306816287d3",
   "action":"Acknowledge",
   "mappedActionV2":
    {
      "name":"inProgressIncident",
      "extraField":""
    },
    "integrationId":"2bdcf8c9-a423-4efd-957c-07ee7de236ea",
    "integrationName":"Dynatrace AppMon",
    "integrationType":"DynatraceAppMon",
    "sendViaMarid":true,
    "profileName":"",
    "incidentRule":"",
    "userName":"",
    "password":"",
    "url":"",
    "state":"InProgress",
    "alias":"b324f7e2-c747-47bb-83d5-17b6a8eafaf8"
}