Moogsoft Docs

Configure AppDynamics for Moogsoft AIOps

Introduction

The AppDynamics LAM enables Moogsoft AIOps to ingest incident data from AppDynamics. The following information explains the configuration required to send AppDynamics data to Moogsoft AIOps . For more information about AppDynamics, see appdynamics.com .

Requirements

  • An AppDynamics LAM configured to allow inbound communication from AppDynamics
  • An active AppDynamics controller ( v4.1 or later)
  • Access to the AppDynamics UI with administrator account permissions

Capabilities

Moogsoft AIOps performance depends on the number of Events received per second and the specifications of the Moogsoft AIOps system on which the AppDynamics LAM is running.

AppDynamics and Moogsoft AIOps integration creates one Event in Moogsoft AIOps for every event or violation received from AppDynamics. If, for example, an event is received containing multiple affected entities, then one entity (from those affected) is selected, and forms the basis of the Event created in Moogsoft AIOps .

Moogsoft AIOps Configuration

Files installed by default Description
$MOOGSOFT_HOME/config/appdynamics_lam.conf AppDynamics LAM configuration file
$MOOGSOFT_HOME/bots/lambots/AppDynamicsLam.js LAMbot file; performs the main processing on the Events received
$MOOGSOFT_HOME/bots/moobots/AlertBuilder.js Standard AlertBuilder Moobot file
$MOOGSOFT_HOME/etc/integrations/appdynamics/appdynamics-payload-script.json JSON script required to configure AppDynamics . This file is also available on this page - see below

AppDynamics LAM and LAMbot configuration

  1. Check appdynamics_lam.conf fields are set correctly:

    Field Description Example
    port The port number where the LAM receives data from AppDynamics 8890
    address This should be the hostname/IP Address of the system running AIOps If AIOps is running on premise the default address is : 0.0.0.0
    If AIOps is running on e.g. Amazon web services, it may be similar to ew2.234.234.compute.amazonaws.com
  2. Check AppDynamicsLam.js configuration settings related to Account, Policy and Action information:

    var includeAccountInfo=true;
    var includePolicyInfo=true;
    var includeActionInfo=true;

    By default these are all set to true ; so every Event created in AIOps includes the Account, Policy and Action information received from AppDynamics.
    Setting each of these to false results in the corresponding Account, Policy or Action information not being included in Events.

  3. Enable the AppDynamics LAM in the moog_farmd configuration file ( $MOOGSOFT/config/moog_farmd.conf ) in the moolets section, by setting the run_on_startup value to true for AppDynamics, as shown below:

    name                : "AlertBuilderAppDynamics",
    classname           : "CAlertBuilder",
    run_on_startup      : true,
    moobot              : "AlertBuilder.js",
    metric_path_moolet  : true,
    
    event_streams       : [ "AppDynamics" ],
    threads             : 4,

    Final steps

    Start the AppDynamics Moolet and the AppDynamics LAM to begin listening and receiving data from AppDynamics on the defined socket.

    To do this:

    $MOOGSOFT_HOME/bin/farmd_cntl --start --moolet "AlertBuilderAppDynamics"
    service appdynamicslamd start

    Note

    To check the AppDynamics LAM status:

    service appdynamicslamd status

    To stop the AppDynamics LAM:

    service appdynamicslamd stop

Note

Knowledge of the AppDynamics system is required

Configuring the AppDynamics system to function with the Moogsoft AIOps AppDynamics LAM has four steps:

  1. HTTP Request Template Setup
  2. Test the connection
  3. Action Setup
  4. Policy Setup

Step 1: HTTP request template setup

Create an HTTP Request Template for AppDynamics Applications as follows:

  1. Login to the AppDynamics User Interface using an account with administrative permissions.
  2. Click one of the available Applications . A screen similar to the one below should appear:



  3. Click either Alert & Respond option in the the left menu or at the top right :




  4. Click either HTTP Request Templates option in the left menu or lower down in the main area:




  5. Click + New to add a new HTTP Request Template as shown:



  6. Enter a Name for the HTTP Request Template in the box, for example AIOps POST



  7. Add in the Request URL section:

    Field Description
    Method list POST
    Raw URL Enter the URL where AppDynamics sends event data to. The URL comprises the address and hostname where Moogsoft AIOps is running and the port number on which the AppDynamics REST LAM has been configured to listen on. The address and port number must match those set in the AppDynamics LAM configuration file appdynamics_lam.conf see above . For example http://your-instance-hostname:8890
    URL Encoding UTF-8


    The Request URL section should be similar to:


  8. Select NONE from the Type list in the Authentication section.
  9. Click Add Header to add a Custom Request Headers :

    Enter a value in the Header and Value Fields:

    Field Value
    Header Content-Type
    Value application/json

    Your screen should look like this:

  10. Add in the Payload section:

    Field Value
    MIME Type application/json
    Payload Encoding UTF-8
    Payload text Enter the entire code found in the file appdynamics-payload-script.json . This file is installed with Moogsoft AIOps and is located here:
    $MOOGSOFT_HOME/etc/integrations/appdynamics/appdynamics-payload-script.json
    Alternatively, you can download the file here


    The Payload section should be similar to:


  11. Add Failure Criteria in the Response Handling Criteria section:
    1. Click Add Failure Criteria and enter the Status Code value 400
    2. Repeat for values 401 , 405 and 406
  12. Click Add Success Criteria, in Success Criteria, and enter the Status Code value 200
    The Response Handling Criteria section should be similar to:


  13. Select the One Request Per Event check box in the Settings section:

    Field Value
    Connect Timeout 5000
    Socket Timeout 15000
  14. Click Save .

Step 2: Test the connection (optional)

If the AppDynamics LAM is currently running in AIOps and ready to receive events, test the connection by sending a sample event to AIOps , as follows:

  1. Click Test (located next to Save ).
    A screen appears similar to the one below:


  2. Select DEBUG f rom the Log Level list.
    In the Event Type Trigger section, click + Add Event Type .
  3. Select an Event, from the list, for example Health Rule Violation Started - Warning
  4. Click Run Test . A SUCCESS status message similar to the one below should appear:



A sample Alert is created in Moogsoft AIOps, similar to the one shown below:



The Alert
Details and Custom Info section of the Alert should look similar to the ones shown below :






Step 3: Action setup

Note

An Action must be set up for each AppDynamics Application for which you want events to be sent to Moogsoft AIOps


  1. Click Actions , in the left menu:



  2. Click + Create Action :




  3. Select the Make an HTTP Request option, in Create Action :

  4. Click OK .
  5. Complete in Create HTTP Request Action :

    Field Value
    Name AIOps
    HTTP Request Template AIOps POST

    Create HTTP Request Action should be similar to:



  6. Click Save .
    The Action appears in the
    Actions list:


Step 4: Policy setup

Note

A Policy must be set up for each AppDynamics Application for which you want events to be sent to AIOps


  1. Click Policies :



  2. Click + Create Policy :



  3. Complete the fields in the Trigger tab:

    Field Example
    Name Send Events to AIOps
    Enabled check box Yes
    Health Rule Violation Events Select all required


    Create Policy should be similar to:



  4. Click the Actions left tab:



  5. Complete in the Actions tab:
    Click ' + ' to add an Action to be executed:



  6. Select the Action you created in the previous section, for example Send to AIOps,
  7. Click Select. You see the Action appears in the Actions to Execute list.



  8. Click Save (bottom right, as shown) to add the Action to the Policy:



The Policy appears in the Policies list :