Giter Site home page Giter Site logo

dynatrace-appmon-maven-plugin's Introduction

Dynatrace Maven Plugin Build Status

The automation plugin enables FULL Automation of Dynatrace by leveraging the REST interfaces of the Dynatrace AppMon Server. The automation plugin includes Maven goals to execute the following actions on the Dynatrace AppMon Server:

  • Activate Configuration: Activates a configuration within a system profile
  • Enable/Disable Profile
  • Stop/Restart Server
  • Start/Stop Session Recording: Returns the actual recorded session URI
  • Start/Stop Test: Start returns testrun id, allowing to inject it into Dynatrace agent parameters and use to finish test

Table of Contents

Installation

Prerequisites

  • Dynatrace Application Monitoring version: 7+ (builds that support older AppMon releases can be found on the Releases page)
  • Maven 3+

Manual Installation

Plugin library is available in maven central repository (starting with version 7.0.0).

  • Define properties for the Dynatrace goals as shown in pom.xml from the sample package
  • Invoke your maven goals, e.g.: mvn com.dynatrace.diagnostics.automation:dynatrace-maven-plugin:startRecording

The Dynatrace maven plugin has the following identification: (pluginGroupId:pluginArtifactId:pluginVersion): mvn com.dynatrace.diagnostics.automation:dynatrace-maven-plugin:7.0.0

Building

In order to build the plugin, Maven environment is needed to be configured in your system. Then you should be able to build and install package by executing mvn install. Jar file should be available in target folder

Configuration

A full example can be seen in the pom.xml as part of the project available in examples folder.

Using plugin properties:

<properties>
  <!-- Setting default values for Dynatrace Maven goals that operate on a system profile -->
  <dynaTrace.username>admin</dynaTrace.username>
  <dynaTrace.password>admin</dynaTrace.password>
  <dynaTrace.serverUrl>http://localhost:8020</dynaTrace.serverUrl>
  <dynaTrace.systemProfile>GoSpace</dynaTrace.systemProfile>

  <!-- This property will be used to store the session uri for e.g.: Start/Stop Recording -->
  <dynaTrace.sessionUriProperty>dynaTrace.sessionUri</dynaTrace.sessionUriProperty>

  <!-- Following is a list of properties for goal: startRecording -->
  <dynaTrace.sessionName>My Stored Session</dynaTrace.sessionName>
  <dynaTrace.sessionDescription>My stored Session Description</dynaTrace.sessionDescription>
  <dynaTrace.recordingOption>all</dynaTrace.recordingOption> <!-- other options: violations|timeseries -->
  <dynaTrace.sessionLocked>false</dynaTrace.sessionLocked>
  <dynaTrace.appendTimestamp>false</dynaTrace.appendTimestamp>
</properties>

Now we can call the startRecording goal in the following way: mvn com.dynatrace.diagnostics.automation:dynatrace-maven-plugin:startRecording

You can inject the Dynatrace agent as part of surefire unit testing in Maven pom.xml with settings similar to this:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<argLine>-agentpath:"C:\Program Files\dynaTrace\dynaTrace 6.5.0\agent\lib\dtagent.dll"=name=Maven,server=localhost:9998</argLine>
</configuration>
</plugin>

Available Maven goals

Description of Available Maven Tasks

Server Management

  • enableProfile - Enables or disables a System Profile
  • activateConfiguration - Activates a Configuration of a System Profile
  • restartServer - Restarts a dynaTrace Server

Session Management

  • startRecording - Starts session recording for a specified system profile
  • stopRecording - Stops session recording for a specified system profile

Test Management

  • startTest - Sets meta data information for the Test Automation Feature and provides the DtStartTest.testRunId necessary to support parallel builds. The DtStartTest.testRunId value needs to be passed to the agent instrumenting the JVM that's executing the tests.
  • finishTest - Sets test status of test run to finished. Explicit test run can be marked as finished using dynaTrace.testRunId, if this property is not set then testRunId generated by preceding startTest goal will be used.

Additional Resources

Previous versions:

dynatrace-appmon-maven-plugin's People

Contributors

chojna avatar dglugla avatar ham3r avatar micchal avatar wbachnik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.