Giter Club home page Giter Club logo

Comments (10)

dhoard avatar dhoard commented on July 24, 2024 1

@ecerulm I added the documentation change above and am in the process of publishing the 1.0.1 release.

from jmx_exporter.

dhoard avatar dhoard commented on July 24, 2024 1

@ecerulm release published. please test.

from jmx_exporter.

fstab avatar fstab commented on July 24, 2024

Is this still the case with jmx_exporter version 1.x, or are you using an older version?

from jmx_exporter.

ecerulm avatar ecerulm commented on July 24, 2024

Is this still the case with jmx_exporter version 1.x, or are you using an older version?

@fstab, Using jmxexporter 0.20.0 as 1.x says This release has functional issues and should not be used.

from jmx_exporter.

ecerulm avatar ecerulm commented on July 24, 2024

I have been google around and I guess the _total comes from prometheus client_java's PrometheusNaming RESERVED_METRIC_NAME_SUFFIXES.I'm assuming jmexporter uses client_java to generate the prometheus text format, and somehow jmxexporter overrides the metricname but it does not override the generated TYPE and HELP.

from jmx_exporter.

fstab avatar fstab commented on July 24, 2024

@dhoard time to release 1.0.1, this should fix it :)

from jmx_exporter.

ecerulm avatar ecerulm commented on July 24, 2024

The client_java documetation says

As defined in OpenMetrics, counter metric names must have the _total suffix. If you create a counter without the _total suffix the suffix will be appended automatically.

But in anycase jmxexporter should either produce

# HELP catalina_globalrequestprocessor_requestcount number of requests
# TYPE catalina_globalrequestprocessor_requestcount counter
catalina_globalrequestprocessor_requestcount{Application="Tableau",Service="vizqlservice",ServiceInstance="0",} 2848.0

or

# HELP catalina_globalrequestprocessor_requestcount_total number of requests
# TYPE catalina_globalrequestprocessor_requestcount_total counter
catalina_globalrequestprocessor_requestcount_total{Application="Tableau",Service="vizqlservice",ServiceInstance="0",} 2848.0

but not what's producing now, mixing catalina_globalrequestprocessor_requestcount_total and catalina_globalrequestprocessor_requestcount

from jmx_exporter.

ecerulm avatar ecerulm commented on July 24, 2024

@dhoard time to release 1.0.1, this should fix it :)

yes, it does fix it.. I tried with main 2797571 and when I specify catalina_globalrequestprocessor_requestcount as metric name I get

# HELP catalina_globalrequestprocessor_requestcount_total number of requests
# TYPE catalina_globalrequestprocessor_requestcount_total counter
catalina_globalrequestprocessor_requestcount_total{Application="Tableau",Service="vizqlservice",ServiceInstance="0"} 0.0

the metric name get rewritten to catalina_globalrequestprocessor_requestcount_total everywhere (TYPE, HELP and the actual metric) which I guess it's the correct behaviour (from the openmetrics documentation point of view)

so yes, it does fix it.

@fstab @dhoard , I suggest to mention in the docs for rules > name something like

The metric name to set. Capture groups from the pattern can be used. If not specified, the default format will be used. If it evaluates to empty, processing of this attribute stops with no output. Additional suffix may be added to this name (e.g _total for type COUNTER)

to help people that are not familiar with the _total suffix to discover it. (Specially since catalina_globalrequestprocessor_requestcount without the _total suffix is mentioned a lot on the internet, for example Prometheus metrics collected by the CloudWatch agent)

Then one question remains can I force jmxexporter to output catalina_globalrequestprocessor_requestcount (without total) and still be a counter? or if I really want catalina_globalrequestprocessor_requestcount I should leave it as UNKNOWN/untyped type?

from jmx_exporter.

ecerulm avatar ecerulm commented on July 24, 2024

It works , it adds the _total suffix to the metric name, in all 3 places ( TYPE, HELP and the actual metric value).

from jmx_exporter.

dhoard avatar dhoard commented on July 24, 2024

@ecerulm Thanks for the confirmation!

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.