Dropwizard Monitoring Extension

An AppDynamics extension to be used with a stand alone Java machine agent to provide metrics for Dropwizard

Dropwizard

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services. Dropwizard pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done. Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality web service in the shortest time possible.

Prerequisites

We will be reporting various measuring instruments that DropWizard Metrics provides. For more detailed metrics, refer:/

http://metrics.dropwizard.io/3.1.0/manual/core

Metrics Provided

In addition to the metrics exposed by Confluence, we also add a metric called "Metrics Collection Successful" with a value 0 when an error occurs and 1 when the metrics collection is successful.

Note : By default, a Machine agent or a AppServer agent can send a fixed number of metrics to the controller. To change this limit, please follow the instructions mentioned here. For eg.

    java -Dappdynamics.agent.maxMetrics=2500 -jar machineagent.jar

Installation

  1. Download the DropWizardMonitor.zip
  2. Unzip as "DropWizardMonitor" and copy the "DropWizardMonitor" directory to <MACHINE_AGENT_HOME>/monitors
  3. Edit the file config.yml located at <MachineAgent_Dir>/monitors/DropWizardMonitor and update the following details. Comment out properties which are not used
    metricPrefix: To report the metrics only to a given Tier, use the second one instead. The TIER_ID can be found from the REST API
    metricPrefix: Custom Metrics|DropWizard
    #metricPrefix: Server|Component:<TIER_ID>|Custom Metrics|DropWizard
    ServerDetails
    #Dropwizard Health Metric URL path
    servers:
      - uri: http://<<dropwizard_host>>:<<health_metrics_port>>/metrics
        displayName: metrics
    Metrics: These are the metrics collected from DropWizard and reported to controller.
    ##Dropwizard Metrics
    metrics:
       - meters:
           - displayName : "Logback|M1Rate|All"
             path : "ch.qos.logback.core.Appender.all"
             type: "OBS.CUR.COL"
             . . . .
             

Workbench

Workbench is a feature that lets you preview the metrics before registering it with the controller. This is useful if you want to fine tune the configurations. Workbench is embedded into the extension jar.

To use the workbench
  1. Follow all the installation steps
  2. Start the workbench with the command
    java -jar /path/to/MachineAgent/monitors/DropWizard/DropWizardMonitor.zip
    This starts an http server at http://host:9090/. This can be accessed from the browser.
  3. If the server is not accessible from outside/browser, you can use the following end points to see the list of registered metrics and errors.
    #Get the stats
    curl http://localhost:9090/api/stats
    #Get the registered metrics
    curl http://localhost:9090/api/metric-paths
    
  4. You can make the changes to config.yml and validate it from the browser or the API
  5. Once the configuration is complete, you can kill the workbench and start the Machine Agent

 

Metrics

The metrics will be reported under the tree Application Infrastructure Performance|$TIER|Custom Metrics|Dropwizard

Please refer to this screenshot to view the complete list of metrics reported by the Dropwizard Extension.

 

Contributing

Always feel free to fork and contribute any changes directly via GitHub.

Support

Please contact help@appdynamics.com with the following details

  1. config.yml
  2. debug logs

Compatibility

Version1.0.0
Machine Agent Compatibility4.0+
Last Update15 Aug 2017

 

Releases Notes

  • 1.0.0: Initial release