Plugin for Dropwizard Monitoring

Monitor Dropwizard servers using Site24x7 and stay on top of issues.

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services. Configure Site24x7 plugin to monitor your Dropwizard servers and troubleshoot performance issues as and when they occur.

This document details how to configure the Dropwizard plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Dropwizard servers.

Dropwizard performance monitoring metrics:

Take informed troubleshooting decisions by keeping track of critical Dropwizard metrics including:

Uptime

Ensure your Dropwizard server is up and running with the metric "uptime" which gives the total server uptime in milliseconds.

Maximum memory

Maintain an overall view of your server memory. Use the metric "max_memory" and get the maximum amount of memory available in MB.

Heap used

Maintain an overall view of your server memory. Use the metric "heap_used" and get the amount of heap memory used in MB.

Non-heap used

Use the metric "non-heap_used" and get the amount of non-heap memory used in MB.

Metaspace used

Use the metric "metaspace_used" and get the amount of metaspace memory used in MB.

Compressed class space used

Use the metric "compressed-class-space_used" and get the amount of memory used by compressed classes in MB.

Cache used

Get information on the total amount of cache memory used with the metric "code-cache_used".

Threads count

Get information on the total number of threads present in JVM using the metric "threads_count".

Runnable threads count

Get information on the total number of runnable threads in JVM using the metric "threads_runnable_count".

Log count

Get information on the total number of logged events that ocurred in your Dropwizard server using the metric "log_count".

Severity log count

Get information on the total number of logged events based on severity (debug, error, info, trace, warn) using the metric "log_*_count".

Response count

Get information on the aggregated count of responses based on their response codes (1xx, 2xx, 3xx, 4xx, 5xx) using the metric "xxx-responses".

Total requests

Get information on the total number of requests that the server recieved using the metric "total_requests".

Get requests

Use the metric "get_requests" and record the total number of GET requests that the server recieved.

Post requests

Use the metric "post_requests" and record the total number of POST requests that the server recieved.

delete_requests

Use the metric "delete_requests" and record the total number of DELETE requests that the server recieved.

Connect requests

Use the metric "connect_requests" and record the total number of CONNECT requests that the server recieved.

Options requests

Use the metric "options_requests" and record the total number of OPTIONS requests that the server recieved.

Other requests

Use the metric "other_requests" and record the total number of all other types of requests that the server recieved.

Port connections

Use the metric "*_connections_count" and get the total number of connections made in the respective ports. E.g: 8080, 8443, etc.

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one
  • Download and install the latest version of Site24x7 Linux agent
  • Install the Dropwizard plugin
  • The agent will execute the Dropwizard plugin and push the data to the Site24x7 server

Prerequisites:

  • Ensure Dropwizard is installed in the server and it is up and running.

Dropwizard plugin installation:

  • Create separate directories for all three plugins with the name "dropwizard_jvm_metrics", "dropwizard_event_metrics", "dropwizard_connection_metrics" under the Site24x7 Linux Agent's plugin directory - /opt/site24x7/monagent/plugins/
    cd /opt/site24x7/monagent/plugins/
    sudo mkdir dropwizard_jvm_metrics
    sudo mkdir dropwizard_event_metrics
    sudo mkdir dropwizard_connection_metrics
  • Download the file ""dropwizard_jvm_metrics.py" from our GitHub repository and place it under the "dropwizard_jvm_metrics" directory
    cd dropwizard_jvm_metrics
    sudo wget https://raw.githubusercontent.com/site24x7/plugins/master/dropwizard_jvm_metrics/dropwizard_jvm_metrics.py
  • Download the file "dropwizard_event_metrics.py" from our GitHub repository and place it under the "dropwizard_event_metrics" directory
    cd dropwizard_event_metrics
    sudo wget https://raw.githubusercontent.com/site24x7/plugins/master/dropwizard_event_metrics/dropwizard_event_metrics.py
  • Download the file "dropwizard_connection_metrics.py" from our GitHub repository and place it under the "dropwizard_connection_metrics" directory
    cd dropwizard_connection_metrics
    sudo wget https://raw.githubusercontent.com/site24x7/plugins/master/dropwizard_connection_metrics/dropwizard_connection_metrics.py

Dropwizard plugin configuration:

  • In order to change the monitoring configuration, go to plugins directory and edit the required plugin file
  • Dropwizard plugin file location - /opt/site24x7agent/monagent/plugins/dropwizard_jvm_metrics/dropwizard_jvm_metrics.py

  • The default python path given in the plugin script is #!/usr/bin/python. If you wish to provide an alternate python path, replace the existing one preceded by the shebang character "#!".
  • Make your changes in the config section (example given below)
    Eg :
    HOST = "localhost"
    ADMINPORT = "4848"

Monitoring additional metrics:

  • To monitor additional metrics, edit any one of the plugin files and add the new metrics that need monitoring
  • Increment the plugin version value in the plugin file to view the newly added metrics ( For e.g. Change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • RabbitMQ plugin - Monitor performance metrics of your RabbitMQ databases
  • MongoDB plugin - Monitor performance metrics of your MongoDB databases
  • Kafka plugin - Analyze performance of your Kafka server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes