hsperf a Munin Plugin
hsperf is a plugin for Munin which reads the files from the /tmp/hsperfdata_* folders.
Copyright (C) 2016 Stefan "Bebbo" Franke - stefan@franke.ms
USAGE
- unzip the archive content to /opt/hsperf
- adjust the folders, graphs and properties in the file plugins/hsperf
- copy the files from plugin-conf.d and plugins to the corresponding folders in /etc/munin
- restart munin-node (systemctl restart munin-node)
EXAMPLE CONFIG
The provided example observes 4 folders and creates 2 graphs.
JVM Memory graph
This grpahs displays for each java process' memory:
- used size of the old generation
- used size of ede
- used size of survivors 0
- used size of survivors 1
JVM Thread graph
This graph display information of the java threads:
- count of live threads
- max of live threads
- count of started thread in the last interval
PREPARATION
The plugins requires a java installation. But since you plan to observer your running JVMs java is installed ^^.
- Ensure that each JVM is running with an own user. This avoids appearing process id's in the graph legends.
- Identify all /tmp/hsperfdata_<username> folders to appear in the graph and add these paths to the observed folders. Edit plugins/hsperf, e.g.:
FOLDERS=" /tmp/hsperfdata_domain01"
FOLDERS+=" /tmp/hsperfdata_domain02"
FOLDERS+=" /tmp/hsperfdata_bejy"
FOLDERS+=" /tmp/hsperfdata_bebbo"
- Define the graphs and properties to display. Edit plugins/hsperf, e.g.:
GRAPHS="threads|JVM Threads|number of threads|threadCount,threadMax,threadsStarted"
GRAPHS+='" "'
GRAPHS+="memory|JVM Memory|bytes|old,eden,s0,s1"
PROPS=" threadCount=java.threads.live"
PROPS+=" threadMax=java.threads.livePeak"
PROPS+=" threadsStarted+=java.threads.started"
PROPS+=" old=sun.gc.generation.1.space.0.used"
PROPS+=" eden=sun.gc.generation.0.space.0.used"
PROPS+=" s0=sun.gc.generation.0.space.1.used"
PROPS+=" s1=sun.gc.generation.0.space.2.used"
To get an idea which properties are available, run the plugin with "--showprops" after the folders are setup correctly
/opt/hsperf/plugins/hsperf --showprops
VERSION
2016-01-05: download hsperf-v2
- V2 changed type from COUNTER to DERIVED V2 added
- ".min 0" to each counter to avoid spikes
2016-01-04: download hsperf-v1
LICENSE
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
rev: 1.11