Git Product home page Git Product logo

Comments (12)

brian-brazil avatar brian-brazil commented on June 6, 2024

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.

bobrik avatar bobrik commented on June 6, 2024

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.

brian-brazil avatar brian-brazil commented on June 6, 2024

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.

bobrik avatar bobrik commented on June 6, 2024

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.

brian-brazil avatar brian-brazil commented on June 6, 2024

You'd be looking at Hadoop<service=HBase, name=Master, sub=Server><>tag.isActiveMaster: false

from jmx_exporter.

bobrik avatar bobrik commented on June 6, 2024

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.

brian-brazil avatar brian-brazil commented on June 6, 2024

This is how I propose to handle this, it isn't implemented yet.

from jmx_exporter.

bobrik avatar bobrik commented on June 6, 2024

Ah, sorry, I misunderstood you. Looking forward to seeing this implemented!

from jmx_exporter.

cfrantsen avatar cfrantsen commented on June 6, 2024

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.

brian-brazil avatar brian-brazil commented on June 6, 2024

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.

cfrantsen avatar cfrantsen commented on June 6, 2024

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.

brian-brazil avatar brian-brazil commented on June 6, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.