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)
- Add support for default values of regex match groups in rules HOT 2
- Support for JMX filter pattern for kafka metrics HOT 24
- 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
- Metrics for a specific process HOT 6
- the problem of getting data from multiple replicas under Kubernetes deployment controller and how to distinguish replica labels based on podname HOT 2
- JMX exporter high memory usage. HOT 3
- have any metric about jvm GC Pause? HOT 3
- Proposal: attributes as metrics & extra metrics HOT 7
- 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
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.