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:
Ensure your Dropwizard server is up and running with the metric "uptime" which gives the total server uptime in milliseconds.
Maintain an overall view of your server memory. Use the metric "max_memory" and get the maximum amount of memory available in MB.
Maintain an overall view of your server memory. Use the metric "heap_used" and get the amount of heap memory used in MB.
Use the metric "non-heap_used" and get the amount of non-heap memory used in MB.
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.
Get information on the total amount of cache memory used with the metric "code-cache_used".
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".
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".
Get information on the aggregated count of responses based on their response codes (1xx, 2xx, 3xx, 4xx, 5xx) using the metric "xxx-responses".
Get information on the total number of requests that the server recieved using the metric "total_requests".
Use the metric "get_requests" and record the total number of GET requests that the server recieved.
Use the metric "post_requests" and record the total number of POST requests that the server recieved.
Use the metric "delete_requests" and record the total number of DELETE requests that the server recieved.
Use the metric "connect_requests" and record the total number of CONNECT requests that the server recieved.
Use the metric "options_requests" and record the total number of OPTIONS requests that the server recieved.
Use the metric "other_requests" and record the total number of all other types of requests that the server recieved.
Use the metric "*_connections_count" and get the total number of connections made in the respective ports. E.g: 8080, 8443, etc.
- 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_metricssudo mkdir dropwizard_event_metricssudo 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_metricssudo 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_metricssudo 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_metricssudo 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
- 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"
Dropwizard plugin file location - /opt/site24x7agent/monagent/plugins/dropwizard_jvm_metrics/dropwizard_jvm_metrics.py
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")
- 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
World's leading companies