Monitor Java Application on Instance
Overview
JVM on instances is monitored using sfAgent configured with jvm plugin. The plugin monitors JVM metrics, jvm arguments used to start Java process and deadlock metrics. JVM plugin internally uses the following utilities to collect metrics:
- Jstats for JVM metrics
- Jolokia will be started by plugin to collect deadlock metrics if monitor Deadlocks parameter is set in configuration file
Pre-requisites
Jcmd has to be installed in the instance
Configuration
sfAgent section provides steps to install and automatically generate plugin configurations. User can also manually add the configuration shown below to config.yaml
under /opt/sfagent/
directory
key: <profile_key>
generate_name: true
tags:
Name: <instance name>
appName: <application name>
projectName: <project name>
metrics:
plugins:
- name: jvm
enabled: true
interval: 60
config:
process: *
heapinterval: 3600
monitorDeadlocks: false
deadlockMonitoringInterval: 300
Viewing data and dashboards
Data generated by this plugin can be viewed in
browse data
page inside the respective application underplugin=jvm
anddocumentType=jvm
Dashboard for this data can be instantiated by importing dashboard template
JVM
to the application dashboard.