Have some example rules of generic JVM metrics?
See original GitHub issueHi there,
We’re making use of the JMX exporter in combination with Tomcat and Cassandra. While using it, we’ve noticed that none of the examples contain any generic rules for extracting properties out of the JVM, like memory usage. Right now we’re planning on adding something like this to our configs:
- pattern: 'java.lang<type=Memory><(\w+)MemoryUsage>(\w+):'
name: java_memory_usage_$2_bytes
labels:
area: "$1"
help: Java $2 $1 memory usage
type: GAUGE
Resulting in metrics like these:
java_memory_usage_committed_bytes{area="Heap",} 1.489731584E9
java_memory_usage_committed_bytes{area="NonHeap",} 3.9223296E8
java_memory_usage_max_bytes{area="Heap",} 4.294770688E9
java_memory_usage_max_bytes{area="NonHeap",} 4.17333248E8
java_memory_usage_init_bytes{area="Heap",} 2.73888048E8
java_memory_usage_init_bytes{area="NonHeap",} 3.69557504E8
java_memory_usage_used_bytes{area="Heap",} 9.61119192E8
java_memory_usage_used_bytes{area="NonHeap",} 2.09771528E8
Question: would it make sense to have some kind of examples file containing rules like these?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:39 (18 by maintainers)
Top Results From Across the Web
Java Runtime Metrics - Datadog Docs
The following metrics are collected by default per JVM process after ... metrics in your APM Service Page, Datadog provides a default JVM...
Read more >5 Tuning Java Virtual Machines (JVMs) - Oracle Help Center
5 Tuning Java Virtual Machines (JVMs). The Java virtual machine (JVM) is a virtual "execution engine" instance that executes the bytecodes in Java...
Read more >Java Virtual Machine (JVM) Performance Tuning Tutorial
From basic JVM tuning concepts & parameters to principles & procedures, learn all there is to know about how to plan & prepare...
Read more >Enabling metering on WebSphere Application Server - IBM
In the Generic JVM arguments field, type the following line: ... com.ibm.rules.metering.server.url, Endpoint where the usage metrics are sent.
Read more >Java Rules | PMD Source Code Analyzer
This rule reports type declara… CommentDefaultAccessModifier: To avoid mistakes if we want that an Annotation, Class, Enum, Method, Constructor or Field have a…...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We recommend always using the java agent, if you go against that and use the http server this is one of the issues you’ll run into.
@brian-brazil Hi … reading this issue I don’t see any real reason why the HTTP server mode doesn’t support JVM metrics and what do you mean saying “they’d be confusing”. I’m thinking about using it within a “sidecar” approach on Kubernetes/OpenShift but it seems that you really discourage the HTTP server mode. Can you explain better why ? It’s something related to maintaining the source code because it will be deprecated in a near future or there are some technical reasons ?