Comments (24)
@sreelu27 you should be able to use the configuration excludeObjectNames
to exclude the MBean that is providing the metrics.
from jmx_exporter.
@sreelu27 Currently I'm are working on migration to the new Prometheus Java client_library
.
I feel filtering JVM metrics is low priority since most uses/use cases I have seen want to monitor these metrics.
from jmx_exporter.
Hi @dhoard
Can we get any help on the filtering issue, please?
from jmx_exporter.
@sreelu27 are you wanting any of the metrics from the RequestMetrics
MBean?
from jmx_exporter.
Hi @dhoard ,
Do you want any of the metrics from the RequestMetrics MBean ? – No
The issue here is when I apply this filter, all network related metrics are coming but along with that JMX and JVM metrics also coming that's the problem.
**jvm_threads_deadlocked_monitor 0.0
HELP jvm_threads_state Current count of threads by state
TYPE jvm_threads_state gauge
jvm_threads_state{state="NEW",} 0.0
jvm_threads_state{state="TERMINATED",} 0.0
jvm_threads_state{state="RUNNABLE",} 25.0
jvm_threads_state{state="BLOCKED",} 0.0
jvm_threads_state{state="WAITING",} 15.0
jvm_threads_state{state="TIMED_WAITING",} 36.0
jvm_threads_state{state="UNKNOWN",} 0.0**
HELP kafka_network_RequestMetrics_Count Attribute exposed for management kafka.network:name=LocalTimeMs,type=RequestMetrics,attribute=Count
TYPE kafka_network_RequestMetrics_Count untyped
kafka_network_RequestMetrics_Count{name="LocalTimeMs",request="Fetch",} 0.0
**# HELP jmx_scrape_duration_seconds Time this JMX scrape took, in seconds.
TYPE jmx_scrape_duration_seconds gauge
jmx_scrape_duration_seconds 0.15442887**
from jmx_exporter.
Hi @dhoard,
Can we get any help on the issue, please?
from jmx_exporter.
Hi @dhoard,
Can we get any help on the previous comment, please ?
#908 (comment)
from jmx_exporter.
Hi @dhoard,
I tried to add blacklistObjectNames as below, but still I am getting the jvm metrics,
jvm_threads_state{state="NEW",} 0.0
jvm_threads_state{state="TERMINATED",} 0.0
jvm_threads_state{state="RUNNABLE",} 21.0
jvm_threads_state{state="BLOCKED",} 0.0
jvm_threads_state{state="WAITING",} 17.0
jvm_threads_state{state="TIMED_WAITING",} 39.0
jvm_threads_state{state="UNKNOWN",} 0.0
lowercaseOutputName: false
blacklistObjectNames: ["jvm.threads*"]
rules:
- pattern : kafka.network<type=RequestMetrics, name=LocalTimeMs, request=Fetch><>Count
from jmx_exporter.
@sreelu27 if you don't want any request metrics, then you should use...
excludeObjectNames: ["kafka.network:type=RequestMetrics,*"]
... which will filter all all MBean's with ObjectNames that match.
from jmx_exporter.
Hi @dhoard ,
No I want to exclude the jvm metrics
jvm_memory_pool_bytes_used{pool="CodeHeap 'non-nmethods'",} 1580928.0
jvm_memory_pool_bytes_used{pool="Metaspace",} 6.7503056E7
jvm_memory_pool_bytes_used{pool="CodeHeap 'profiled nmethods'",} 1.213376E7
jvm_memory_pool_bytes_used{pool="Compressed Class Space",} 8137312.0
jvm_memory_pool_bytes_used{pool="G1 Eden Space",} 3.3554432E7
jvm_memory_pool_bytes_used{pool="G1 Old Gen",} 1.7213184E8
jvm_memory_pool_bytes_used{pool="G1 Survivor Space",} 2097152.0
jvm_memory_pool_bytes_used{pool="CodeHeap 'non-profiled nmethods'",} 2563200.0
Is there any way I can do that?
We are using jmx version 0.18.0
from jmx_exporter.
@sreelu27 some questions... since this is different than what you originally requested...
I am trying to create a pattern for the below Kafka metrics to be filtered:
kafka_network_RequestMetrics_Count
Are you wanting to exclude all JVM metrics?
Are you running the exporter as a Java agent?
from jmx_exporter.
Hi @dhoard ,
apologies for the confusion.
Are you wanting to exclude all JVM metrics? yes
Are you running the exporter as a Java agent? yes
from jmx_exporter.
Hi @dhoard,
I was trying to apply the configuration excludeObjectNames using the below configmap
kafka_metrics_config.yaml: |
lowercaseOutputName: true
excludeObjectNames: ["java.lang:name=G1 Young Generation,type=GarbageCollector","java.lang:name=CodeHeap 'non-profiled nmethods',type=MemoryPool","java.lang:name=CodeHeap 'profiled nmethods',type=MemoryPool"]
rules:
- pattern : kafka.network<type=RequestMetrics, name=LocalTimeMs, request=Fetch><>Count
curl localhost:9404 | grep CodeHeap
jvm_memory_pool_bytes_used{pool="CodeHeap 'non-nmethods'",} 1538688.0
261jvm_memory_pool_bytes_used{pool="CodeHeap 'profiled nmethods'",} 8927744.0
5jvm_memory_pool_bytes_used{pool="CodeHeap 'non-profiled nmethods'",} 2490880.0
jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-nmethods'",} 2555904.0
jvm_memory_pool_bytes_committed{pool="CodeHeap 'profiled nmethods'",} 1.1730944E7
0 0 169k 0 --:--:-- --:--:-jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-profiled nmethods'",} 2752512.0
- jvm_memory_pool_bytes_max{pool="CodeHeap 'non-nmethods'",} 5828608.0
-jvm_memory_pool_bytes_max{pool="CodeHeap 'profiled nmethods'",} 1.22912768E8
jvm_memory_pool_bytes_max{pool="CodeHeap 'non-profiled nmethods'",} 1.22916864E8
-jvm_memory_pool_bytes_init{pool="CodeHeap 'non-nmethods'",} 2555904.0
jvm_memory_pool_bytes_init{pool="CodeHeap 'profiled nmethods'",} 2555904.0
:jvm_memory_pool_bytes_init{pool="CodeHeap 'non-profiled nmethods'",} 2555904.0
--jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'profiled nmethods'",} 1.0053888E7
:--jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-profiled nmethods'",} 2187776.0
jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-nmethods'",} 1537152.0
jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'profiled nmethods'",} 1.707223262247E9
jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-profiled nmethods'",} 1.70722326225E9
171k
jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-nmethods'",} 1.70722326225E9
I have tried, but didnt work,
kafka_metrics_config.yaml: |
lowercaseOutputName: false
excludeObjectNames: ["java.lang:type=ObjectName"]
excludeObjectNameAttributes:
"java.lang:name=Survivor Space,type=MemoryPool":
- "ObjectName"
"java.lang:type=OperatingSystem":
- "ObjectName"
"java.lang:type=Threading":
- "ObjectName"
"java.nio:name=direct,type=BufferPool":
- "ObjectName"
"java.lang:type=Compilation":
- "ObjectName"
"java.lang:name=Tenured Gen,type=MemoryPool":
- "ObjectName"
"java.lang:name=CodeCacheManager,type=MemoryManager":
- "ObjectName"
"java.util.logging:type=Logging":
- "ObjectName"
"java.lang:type=ClassLoading":
- "ObjectName"
"java.lang:name=Metaspace Manager,type=MemoryManager":
- "ObjectName"
"java.lang:name=Metaspace,type=MemoryPool":
- "ObjectName"
"java.lang:name=Eden Space,type=MemoryPool":
- "ObjectName"
"java.lang:name=CodeHeap 'profiled nmethods',type=MemoryPool":
- "ObjectName"
"java.lang:name=Copy,type=GarbageCollector":
- "ObjectName"
"java.lang:name=MarkSweepCompact,type=GarbageCollector":
- "ObjectName"
"java.nio:name=mapped - 'non-volatile memory',type=BufferPool":
- "ObjectName"
"java.lang:name=CodeHeap 'non-nmethods',type=MemoryPool":
- "ObjectName"
"java.lang:name=Compressed Class Space,type=MemoryPool":
- "ObjectName"
"java.nio:name=mapped,type=BufferPool":
- "ObjectName"
"java.lang:type=Memory":
- "ObjectName"
"java.lang:name=CodeHeap 'non-profiled nmethods',type=MemoryPool":
- "ObjectName"
"com.sun.management:type=HotSpotDiagnostic":
- "ObjectName"
"java.lang:type=Runtime":
- "ObjectName"
- "ClassPath"
- "SystemProperties"
rules:
- pattern : kafka.network<type=RequestMetrics, name=LocalTimeMs, request=Fetch><>Count
Also tried wild card pattern :
excludeObjectNames: ["java.lang:*"]
rules:
- pattern: ".*"
All of the above didn't work.
Is the MBean, that I am using is incorrect ? or is it that we cant exclude these default metrics (jvm & jmx) ?
Could you please help me here @dhoard ? Thanks :)
from jmx_exporter.
HI @dhoard
Can you please help me with the query #908 (comment)
Thanks,
Sree
from jmx_exporter.
@sreelu27 please upgrade to the latest version.
from jmx_exporter.
Hi @dhoard ,
I am using 0.20.0 version. Uplifted from 0.18.0 to 0.20.0 for configuration excludeObjectNames
Thanks,
Sree
from jmx_exporter.
Hi @dhoard,
Could you please help me with the query #908 (comment)
I am using 0.20.0 jmx exporter version
Thanks,
Sree
from jmx_exporter.
@sreelu27 excludeObjectNames
is a global setting for an MBean. If you exclude the MBean there is no need to exclude specific attributes.
excludeObjectNames: ["java.lang:*"]
Should exclude the MBean.
from jmx_exporter.
Hi @dhoard,
I have tried the above, but it didn't work as mentioned in my previous comment?
from jmx_exporter.
Hi @dhoard,
Could you please help me with the above query #908 (comment)
Is the MBean, that I am using is incorrect ? or is it that we cant exclude these default metrics (jvm & jmx) ?
from jmx_exporter.
Hi @dhoard,
Could you please help me with the above query #908 (comment)
Is the MBean, that I am using is incorrect ? or is it that we cant exclude these default metrics (jvm & jmx) ?
from jmx_exporter.
@sreelu27 apologies, I've been extremely busy with work.
After doing some testing and research, it appears what you are trying to filter is not supported. I should have caught it earlier.
from jmx_exporter.
Hi @dhoard,
Thank you for the confirmation.Will this be supported in the future version, the enhancement that you have linked in the previous comment : #696
Thanks,
Sree
from jmx_exporter.
Working as designed. Filtering of JVM metrics is an enhancement tracked via #696
from jmx_exporter.
Related Issues (20)
- Is it possible to add custom k8s attributes as labels for Kafka connect JMX metrics HOT 2
- Allow config file to contain the keystore / truststore credentials when connecting via ssl to JMX HOT 3
- How to create hpa kubernetes based on heap consommation HOT 1
- jmx exporter on an old AIX, v6.1. HOT 5
- Does the expiry/renewal of certificates in jmx_exporter, require restart of service or is it automatically reloaded. HOT 2
- High memory usage by jmx_exporter when connecting to Kafka HOT 1
- Positive match to a rule should not consume the metric HOT 1
- Example config for Tomcat HOT 4
- patterns support for config file for kafka metrics HOT 18
- Question about excludeObjectNames HOT 3
- Add support for default values of regex match groups in rules HOT 2
- The metric jvm_memory_used_bytes transitioned to jvm_memory_bytes_used starting from a certain version of jmx_exporter? HOT 6
- How can I send metrics simultaneously for kafka metrics and for kafka connect HOT 1
- File descriptors opened by jmx exporter getting stuck in CLOSE_WAIT state HOT 33
- Logging of jmx and alerts what all it can monitor HOT 1
- difference between metrics in jmx exporter HOT 1
- Duplicate metrics with NaN HOT 1
- Drop support for Java 8 HOT 8
- Blacklisting Percentile Metrics HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmx_exporter.