Git Product home page Git Product logo

Comments (18)

dhoard avatar dhoard commented on September 27, 2024

Can you share the rules as designed in your YAML file?

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024
  • pattern : kafka.server<type=replica-fetcher-metrics, broker-id=(\w+), fetcher-id=(\w+)>

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

We also have issue with the excludeObjectNameAttributes

below is the config file

lowercaseOutputName: false
excludeObjectNameAttributes:
"kafka.network:type=RequestMetrics, name=ResponseSendTimeMs, request=AddPartitionsToTxn":
- "50thPercentile"
rules:

  • pattern : kafka.network<type=RequestMetrics, name=ResponseSendTimeMs, request=(\w+)><>50thPercentile

The metrics HELP is as below

HELP kafka_network_RequestMetrics_50thPercentile Attribute exposed for management kafka.network:name=ResponseS

endTimeMs,type=RequestMetrics,attribute=50thPercentile

but still the metrics is not filtered.

kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AddPartitionsToTxn",} 0.0

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

hi @dhoard
is there any help we can get on the filtering
Regards
Jana

from jmx_exporter.

dhoard avatar dhoard commented on September 27, 2024

@Janardhan78 You should include name, labels, and type as part of your rule definition.

Regarding excludeObjectNameAttributes, which version of the exporter are you using?

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

we are using 0.18.0

from jmx_exporter.

dhoard avatar dhoard commented on September 27, 2024

This was added in a later version. Please upgrade to the latest version.

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

hi @dhoard The latest available release version is 0.20.0 is the support present in 0.20.0

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

hi @dhoard

We used the latest version of jmx_prometheus_javaagent-0.20.0.jar, and provided the configuration to excludeObjectNameAttributes

-javaagent:/usr/share/java/kafka/jmx_prometheus_javaagent-0.20.0.jar=9404:/etc/confluent/metrics/kafka_metrics_config.yaml

kafka_metrics_config.yaml contents as below

lowercaseOutputName: false
excludeObjectNameAttributes:
"kafka.network:type=RequestMetrics, name=ResponseSendTimeMs, request=AddPartitionsToTxn":
- "50thPercentile"
rules:

  • pattern : kafka.network<type=RequestMetrics, name=ResponseSendTimeMs, request=(\w+)><>50thPercentile

but the metrics "AddPartitionsToTxn" is not being excluded ? is this a bug

bash-4.4$ curl localhost:9404

HELP kafka_network_RequestMetrics_50thPercentile Attribute exposed for management kafka.network:name=ResponseSendTimeMs,type=RequestMetrics,attribute=50thPercentile

TYPE kafka_network_RequestMetrics_50thPercentile untyped

kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AlterUserScramCredentials",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="ApiVersions",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DescribeProducers",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DeleteAcls",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="FetchConsumer",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AlterPartitionReassignments",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AddOffsetsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="OffsetDelete",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="Fetch",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="OffsetForLeaderEpoch",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="CreateDelegationToken",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="CreatePartitions",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DescribeAcls",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DeleteGroups",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DescribeLogDirs",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DescribeGroups",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="UpdateFeatures",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="InitProducerId",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="DeleteTopics",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="ListPartitionReassignments",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AddPartitionsToTxn",} 0.0

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

hi @dhoard

with the below configuration with name and labels provided the metrics is not filtered i suppose excludeObjectNameAttributes is not supported in 0.20.0 or is it a bug ?

kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AddPartitionsToTxn",} 0.0

bash-4.4$ curl localhost:9404 | grep ddPartitionsToTxn
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17338 100 17338 0 0 110k 0 --:--:-- --:--:-- --:--:-- 110k

kafka_network_RequestMetrics_50thPercentile{request="AddPartitionsToTxn",} 0.0
bash-4.4$ cat /etc/confluent/metrics/kafka_metrics_config.yaml
lowercaseOutputName: false
excludeObjectNameAttributes:
"kafka.network:type=RequestMetrics, name=ResponseSendTimeMs, request=AddPartitionsToTxn":
- "50thPercentile"
rules:

  • pattern : kafka.network<type=RequestMetrics, name=ResponseSendTimeMs, request=(\w+)><>50thPercentile
    name: kafka_network_RequestMetrics_50thPercentile
    labels:
    request: $1

from jmx_exporter.

dhoard avatar dhoard commented on September 27, 2024

@Janardhan78 The functionality is in 0.20.0 and works as expected.

The configuration...

excludeObjectNameAttributes:
 "kafka.network:type=RequestMetrics, name=ResponseSendTimeMs, request=AddPartitionsToTxn":
 - "50thPercentile"

... is incorrect because the ObjectName is only kafka.network:type=RequestMetrics. name and request are MBean attributes.

Here is an example from the integration tests:

  "java.lang:type=Runtime":
    - "ObjectName"
    - "ClassPath"
    - "SystemProperties"

In this scenario, for the Runtime MBean, we will not include the ObjectName, ClassPath, or SystemProperties attributes.

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

Hi @dhoard

We have a scenario where the attribute "request" has 10 values out of which we want to select only 7 values, so instead of providing all 7 values and select, is there a way to provide only 3 values which is not needed to be excluded in the output.

from jmx_exporter.

dhoard avatar dhoard commented on September 27, 2024

@Janardhan78 to clarify, you have an MBean that has an attribute that returns an array of values?

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

Hi @dhoard
for example the attribute request can have multiple values like "ApiVersions", "AddPartitionsToTxn" etc
so if i want to filter based upon the values in request attribute, i needed to provide the rules as below.
Is there any other way to filter the attribute value ? other than providing the below rule. so that we can exclude metrics based upon the attribute value

rules:

  • pattern : kafka.network<type=RequestMetrics, name=(\w+), request=([A][d][d][P][a][r][t][i][t][i][o][n][s][T][o][T][x][n]|[A][p][i][V][e][r][s][i][o][n][s])><>50thPercentile
    name: kafka_network_RequestMetrics_50thPercentile
    labels:
    name: $1
    request: $2

kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="ApiVersions",} 4.0
kafka_network_RequestMetrics_50thPercentile{name="RemoteTimeMs",request="ApiVersions",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="TotalTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseSendTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ThrottleTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseQueueTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="TotalTimeMs",request="ApiVersions",} 69.0
kafka_network_RequestMetrics_50thPercentile{name="RemoteTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="RequestQueueTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseQueueTimeMs",request="ApiVersions",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="LocalTimeMs",request="ApiVersions",} 33.0
kafka_network_RequestMetrics_50thPercentile{name="LocalTimeMs",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="RequestQueueTimeMs",request="ApiVersions",} 31.0
kafka_network_RequestMetrics_50thPercentile{name="RequestBytes",request="ApiVersions",} 25.0
kafka_network_RequestMetrics_50thPercentile{name="RequestBytes",request="AddPartitionsToTxn",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ThrottleTimeMs",request="ApiVersions",} 0.0

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

HI @dhoard
Can you please help me with the query #903 (comment)

Regards
Jana

from jmx_exporter.

dhoard avatar dhoard commented on September 27, 2024

@Janardhan78 apologizes for late response. (I'm on business travel/vacation for a few weeks.)

I would suggest using an online Java regular expression based tool using the raw metric line to get the correct matching inclusion/exclusion you require.

from jmx_exporter.

Janardhan78 avatar Janardhan78 commented on September 27, 2024

hi @dhoard
can you share any comments for the below scenario

Scenario:
I want all the metrics for the kafka_network_RequestMetrics_50thPercentile

except the below 3,
kafka_network_RequestMetrics_50thPercentile{name="ResponseQueueTimeMs",request="FindCoordinator",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseQueueTimeMs",request="WriteTxnMarkers",} 0.0
kafka_network_RequestMetrics_50thPercentile{name="ResponseQueueTimeMs",request="AddPartitionsToTxn",} 0.0

for the above scenario to exclude row wise 3 rows of data Is it possible to exclude?

from jmx_exporter.

dhoard avatar dhoard commented on September 27, 2024

@Janardhan78 for...

kafka_network_RequestMetrics_50thPercentile{name="ResponseQueueTimeMs",request="FindCoordinator",} 0.0

The actual MBean ObjectName is...

kafka.network:type=RequestMetrics,name=ResponseQueueTimeMs,request=FindCoordinator

If you don't want any metrics from the MBean, then exclude the MBean using...

excludeObjectNames: ["kafka.network:type=RequestMetrics,name=ResponseQueueTimeMs,request=FindCoordinator"]

The same configuration should be applied for other MBeans you want to exclude.

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.