Comments (18)
Can you share the rules as designed in your YAML file?
from jmx_exporter.
- pattern : kafka.server<type=replica-fetcher-metrics, broker-id=(\w+), fetcher-id=(\w+)>
from jmx_exporter.
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.
hi @dhoard
is there any help we can get on the filtering
Regards
Jana
from jmx_exporter.
@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.
we are using 0.18.0
from jmx_exporter.
This was added in a later version. Please upgrade to the latest version.
from jmx_exporter.
hi @dhoard The latest available release version is 0.20.0 is the support present in 0.20.0
from jmx_exporter.
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.
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.
@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.
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.
@Janardhan78 to clarify, you have an MBean that has an attribute that returns an array of values?
from jmx_exporter.
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.
HI @dhoard
Can you please help me with the query #903 (comment)
Regards
Jana
from jmx_exporter.
@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.
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.
@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)
- Issue in Integrating jmx_prometheus_javaagent with Jboss HOT 1
- After applying JMX filtering pattern, it takes 23 secs to scrape the metrics, is it expected behaviour? HOT 6
- Collection fails for Kafka using release 1.0.0 HOT 14
- feature request: allow to exclude specific attribute patterns inside a composite attribute HOT 3
- Clarify in documentation "jvm_*" metrics HOT 4
- jmxexporter adding incorrect _total suffix to #HELP and #TYPE when using COUNTER HOT 10
- Kafka Metrics showing type as "Untyped" HOT 3
- Advice for validating JMX exporter rules HOT 1
- Support multi-target in http server mode HOT 6
- JMX agent interfering with logging format of application HOT 3
- Extracting PM metrics on Kafka Cluster results in duplicate files due to different cases in the same metric names. HOT 5
- Metric name "_info" suffix gets trimmed HOT 1
- kafka command raise 'Address Already in used' after configuration HOT 11
- kafka_2.13-3.7.1 without metrics HOT 10
- Inconsistent metric availability in distributed kafka connect HOT 6
- Not getting metrics for FirstMessageAge using JMX Exporter in Activemq Artemis HOT 8
- Is this compatible/working on Java 21? HOT 2
- Duplicate metric error when mapping two MBeans to the same metric with different label HOT 10
- Inconsistency in WebLogic MBean Retrieval Between JMX Exporter Versions 0.17.2 and 1.0.1 HOT 1
- Getting IO exception: Broken pipe, when binding the jmx_javaagent on activemq HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmx_exporter.