Giter VIP home page Giter VIP logo

appdrestapi-sdk's Introduction

RESTAccess

Current Version is 2.5.4

The RESTAccess is a solution that allows access to AppDynamics' REST api. The intention is to provide a easy and a standard method to to access the AppDynamics Controller REST service. When developers are working with the REST API they tend to write their own REST client using either Jersey libraries or base java IO classes. The SDK solution relies on a core class RESTAccess or RESTAccess 2 to simplify access.

The AppDynamics 4.2 controller has added additional functionality and metrics, the SDK version 2.5.4 is written to take advantage of this functionality. The new features in the SDK are not compatible with 3.8 controllers or 4.1, so if you need the SDK for these version please use version 1.0.13 for 3.8 controllers. For controllers 4.1+ please use versions 2.2.X-2.4.8.

If you wrote a solution with a version prior to 2.5.1 you might need to update the calls, version because the general metric query has been replaced by specific queries such as Agent, Hardware (HW), JVM and Overall Application Performance (OAP). Please read the JavaDoc for the class org.appdynamics.appdrestapi.RESTAccess.

Requirements:

Requires ant to build the package

Building:

  1. Fork the Repo to local machine
  2. Run ant -f AppD_build.xml

Add the execLib folder to your classpath for use with any of your projects

Usage:

String controller="acme.saas.appdynamics.com";
String port="443";
boolean useSSL=true;
String user="appDUser";
String passwd="secret";
String account="acme";

 /*
 This will create the instance of the RESTAccess which is able to execute REST calls.
 If the controller is single tenant the accout is 'customer1'.
 */
RESTAccess access=new RESTAccess(controller,port,useSSL,user,passwd,account);


// To get the list of applications all you need to run the following.

System.out.println(access.getApplications());

int appId = access.getApplications().getApplications().get(0).getId();
String app=new String(appId);

Calendar calendarNow=java.util.Calendar.getInstance();
Calendar calendarStart=java.util.Calendar.getInstance();
calendarStart.add(java.util.Calendar.MINUTE, -10);

/*
   Choose the ID of one of the application listed and you can request the event objects
by calling access.getEvents, additionally the event types and severity needs to be provided.
*/

System.out.println(access.getEvents(app,"APPLICATION_ERROR,DIAGNOSTIC_SESSION", "INFO,WARN,ERROR",calendarStart.getTimeInMillis(), calendarNow.getTimeInMillis()));

For support please email: [email protected]

appdrestapi-sdk's People

Contributors

gilbertsolorzanofs avatar adrrowcliffe avatar euleroperator avatar johnfaronson avatar

Watchers

James Cloos avatar  avatar  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.