Comments (12)
For ProcessName, I suspect you should be doing that as a target label from your service discovery rather than from the target itself.
For the others, what I was thinking is that you could define the value of a metric to also come from the regex. This would let you put a 1 in for it, and also pull a label out.
from jmx_exporter.
For ProcessName, I suspect you should be doing that as a target label from your service discovery rather than from the target itself.
I don't understand what you mean by that. Can you explain in a bit more detail?
Did you mean that I should make metric hadoop.hbase.jvm.regionserver
instead of hadoop.hbase.jvm{process="regionserver"}
?
For the others, what I was thinking is that you could define the value of a metric to also come from the regex. This would let you put a 1 in for it, and also pull a label out.
{
"name" : "Hadoop:service=HBase,name=Master,sub=Server",
"tag.isActiveMaster" : "false",
"numRegionServers" : 0,
"numDeadRegionServers" : 0,
"clusterRequests" : 0
}
I have Hadoop<service=HBase, name=Master, sub=Server><>numRegionServers
to apply regex on. I don't see how to extract tag.isActiveMaster
from that.
from jmx_exporter.
I don't understand what you mean by that. Can you explain in a bit more detail?
You shouldn't be pulling this from the jvm itself, rather your monitoring should already know that this is a regionServer.
I don't see how to extract tag.isActiveMaster from that.
The value comes after that, so you can limit a rule to only match certain values of that attribute. What's missing at the moment is a way to put in a value in that case.
from jmx_exporter.
You shouldn't be pulling this from the jvm itself, rather your monitoring should already know that this is a regionServer.
Okay, it is doable, although I'd prefer simpler approach of adding an extra label from bean.
The value comes after that, so you can limit a rule to only match certain values of that attribute. What's missing at the moment is a way to put in a value in that case.
Okay, Hadoop<service=HBase, name=Master, sub=Server><>numRegionServers 0.0
.
How do I infer from that info if it's a current master or a standby?
from jmx_exporter.
You'd be looking at Hadoop<service=HBase, name=Master, sub=Server><>tag.isActiveMaster: false
from jmx_exporter.
It doesn't work for me. I changed code in JMXCollector:
String matchName = beanName + (rule.attrNameSnakeCase ? attrNameSnakeCase : attrName);
System.out.println("!!!!! " + matchName + ": " + value);
Output I get (I assume that these are strings that are matched):
!!!!! Hadoop<service=HBase, name=Master, sub=Server><>masterActiveTime: 0
!!!!! Hadoop<service=HBase, name=Master, sub=Server><>masterStartTime: 1450355109902
!!!!! Hadoop<service=HBase, name=Master, sub=Server><>averageLoad: 0.0
!!!!! Hadoop<service=HBase, name=Master, sub=Server><>numRegionServers: 0
!!!!! Hadoop<service=HBase, name=Master, sub=Server><>numDeadRegionServers: 0
!!!!! Hadoop<service=HBase, name=Master, sub=Server><>clusterRequests: 0
I don't see tags here to match. What did I miss?
from jmx_exporter.
This is how I propose to handle this, it isn't implemented yet.
from jmx_exporter.
Ah, sorry, I misunderstood you. Looking forward to seeing this implemented!
from jmx_exporter.
I have started working on this features (overriding bean value with either static value or regexp capture group) as I found a need for it myself. If time permits I should be able to produce a PR in a few days.
I was thinking of just adding a new optional config option under rules called "value: " with the same replace behavior as labels. If this option is omitted then everything works as it does today.
I haven't done any testing yet but there may be a global performance impact as a result of this since for it to work the rules must now process string values as well in addition to the current types.
Any thoughts on how to implement this best?
from jmx_exporter.
The actual JMX bits are slowest, so I wouldn't worry too much about performance. Throw it at a Cassandra to see if there's any real effect, it's one of the slowest.
One other thing I've always wanted to do with values is to be able to multiply/divide them, so that milliseconds can be converted to second etc.
from jmx_exporter.
Maybe run the config options value through something like http://www.objecthunter.net/exp4j? That would give all kinds of options for value transformation.
from jmx_exporter.
That's probably going too far, just being able to apply a factor would be enough. Any real heavy lifting is best done in Prometheus.
from jmx_exporter.
Related Issues (20)
- Can't add metrics to blacklistObjectNames HOT 6
- Plan for release with Prometheus Client 1.x? HOT 2
- no main manifest attribute, in jmx_prometheus_javaagent-0.19.0.jar HOT 1
- Hazelcast Metrics are not showing HOT 2
- Remote jmx has enabled SSL. How to configure jmx-exporter for verification? HOT 13
- Ability to use lowercaseOutputName in particular rules HOT 4
- jmx exporter inside Confluent Kafka broker container HOT 2
- After applying JMX filtering pattern, it takes 23 secs to scrape the metrics, is it expected behaviour? HOT 6
- Collection fails for Kafka using release 1.0.0 HOT 14
- feature request: allow to exclude specific attribute patterns inside a composite attribute HOT 3
- Clarify in documentation "jvm_*" metrics HOT 4
- jmxexporter adding incorrect _total suffix to #HELP and #TYPE when using COUNTER HOT 10
- Kafka Metrics showing type as "Untyped" HOT 3
- Advice for validating JMX exporter rules HOT 1
- Support multi-target in http server mode HOT 6
- JMX agent interfering with logging format of application HOT 3
- Extracting PM metrics on Kafka Cluster results in duplicate files due to different cases in the same metric names. HOT 5
- Metric name "_info" suffix gets trimmed HOT 1
- kafka command raise 'Address Already in used' after configuration HOT 11
- kafka_2.13-3.7.1 without 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.