Giter VIP home page Giter VIP logo

Comments (4)

olivielpeau avatar olivielpeau commented on August 21, 2024

Hi @takus, thanks for opening this issue!

These metrics on the java.lang domain are basic JVM metrics that JMXFetch collects by default, regardless of what you define in your own jmx.yaml file. There is currently no option in JMXFetch to disable the collection of these default metrics.

Could you give us a sense of why you want to avoid collecting these metrics? Any details on your use case could help here.

Thanks again!

from jmxfetch.

takus avatar takus commented on August 21, 2024

Hi @olivielpeau, thanks for the reply.

I'd like to add different tags into different metrics. Ideal configuration is like this:

---
instances:
- name: webapp
  host: 127.0.0.1
  port: 8086
  conf:
  - include:
      domain: com.zaxxer.hikari
      bean_regex:
        - .*master.*
    exclude:
      bean_regex:
        - .*PoolConfig.*
    tags:
        pool: master
  - include:
      domain: com.zaxxer.hikari
      bean_regex:
        - .*slave.*
    exclude:
      bean_regex:
        - .*PoolConfig.*
    tags:
        pool: slave

In this case, both conf record different JDBC pool's metrics with the same name. Thus, I'd like to identify each metrics with tags.

  • jmx.com.zaxxer.hikari.total_connections (tag = pool:master)
  • jmx.com.zaxxer.hikari.total_connections (tag = pool:slave)

But, it seems that tag should be set for each instance, not each conf. For adding different tags into different metrics, I defined multiple instances of the same JVM.

Do you have any ideas to do that?

from jmxfetch.

olivielpeau avatar olivielpeau commented on August 21, 2024

@takus There is currently no way to add tags on each element of the conf section. Currently custom tags can be set:

  • on a per-instance basis as you noticed
  • on a per-attribute basis (see #35 for an example)

That said, looking at the beans you're collecting, the metrics would be tagged automatically with type: tags, i.e type:pool_slave and type:pool_master. I do realize it may not be as useful as actual pool: tags though.

Hope this helps! Adding tags on each element of the conf section could be useful, but it would take some time to implement it. Feel free to open a PR adding this if you can :)

Thanks!

from jmxfetch.

takus avatar takus commented on August 21, 2024

@olivielpeau

on a per-attribute basis (see #35 for an example)

Oh, I didn't know about this setting. I'm trying to define all attributes I need with tags for now. Thanks to helpful information!!

from jmxfetch.

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.