Giter Club home page Giter Club logo

Comments (4)

dhoard avatar dhoard commented on July 24, 2024

The current code either..

  1. uses the attribute name as defined by an MBean
  2. converts the attribute name to snake case

I looked at the code...

if (rule.attrNameSnakeCase) {
attributeName = toSnakeAndLowerCase(attrName);
} else {
attributeName = attrName;
}

... and adding a rule configuration value of attrNameLowercase would result in confusing configuration.

Example:

rules:
  - pattern: 'org.apache.cassandra.metrics<type=(\w+), name=(\w+)><>Value: (\d+)'
    name: cassandra_$1_$2
    value: $3
    valueFactor: 0.001
    labels: {}
    help: "Cassandra metric $1 $2"
    cache: false
    type: GAUGE
    attrNameSnakeCase: true
    attrNameLowercase: true

Is the attribute name snake case? lower case?
Is the user expecting a specific order of operations? (snake case then lowercase?

This feels like a workaround for inconsistent configuration of exporter rules and dashboards.

from jmx_exporter.

Nirzak avatar Nirzak commented on July 24, 2024

The current code either..

  1. uses the attribute name as defined by an MBean
  2. converts the attribute name to snake case

I looked at the code...

if (rule.attrNameSnakeCase) {
attributeName = toSnakeAndLowerCase(attrName);
} else {
attributeName = attrName;
}

... and adding a rule configuration value of attrNameLowercase would result in confusing configuration.

Example:

rules:
  - pattern: 'org.apache.cassandra.metrics<type=(\w+), name=(\w+)><>Value: (\d+)'
    name: cassandra_$1_$2
    value: $3
    valueFactor: 0.001
    labels: {}
    help: "Cassandra metric $1 $2"
    cache: false
    type: GAUGE
    attrNameSnakeCase: true
    attrNameLowercase: true

Is the attribute name snake case? lower case? Is the user expecting a specific order of operations? (snake case then lowercase?

This feels like a workaround for inconsistent configuration of exporter rules and dashboards.

Yeah the attrNameSnakeCase already makes an attribute name in lower case order. but my request was for lowercaseOutputName configuration per rule not the attribute name lower case. Currently metrics name can only be lowercase or uppercase globally. it reflects on all the rules which sometimes breaks some dashboards where one dashboard is using uppercase form of metrics where other is using the lower case form.

from jmx_exporter.

dhoard avatar dhoard commented on July 24, 2024

where one dashboard is using uppercase form of metrics where other is using the lower case form.

At this time, I feel the best approach is to make your dashboards consistent. It will resolve operational issues in the future and prevent a mismatch of inconsistent usage.

from jmx_exporter.

Nirzak avatar Nirzak commented on July 24, 2024

where one dashboard is using uppercase form of metrics where other is using the lower case form.

At this time, I feel the best approach is to make your dashboards consistent. It will resolve operational issues in the future and prevent a mismatch of inconsistent usage.

Oh ok got it. Yeah are currently doing this as this is the only way..

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.