[
https://issues.apache.org/jira/browse/KAFKA-17516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881472#comment-17881472
]
Andrew Schofield edited comment on KAFKA-17516 at 9/24/24 2:07 PM:
-------------------------------------------------------------------
Looking at
[https://cwiki.apache.org/confluence/display/KAFKA/KIP-226+-+Dynamic+Broker+Configuration,]
it seems that the following output would be sensible.
$ bin/kafka-config.sh --bootstrap-server localhost:9092 --alter --entity-type
client-metrics --entity-name CM1 --add-config
metrics=org.apache.kafka,interval.ms=1000
This sets the configs metrics and interval.ms, but leaves match unset.
$ bin/kafka-config.sh --bootstrap-server localhost:9092 --describe
--entity-type client-metrics --entity-name CM1
Dynamic configs for client-metric CM1 are:
interval.ms=1000 sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=1000}
metrics=org.apache.kafka sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=org.apache.kafka}
This doesn't show the value of the config match because it's not set and will
take the default value. However, you can see the default with this command.
$ bin/kafka-config.sh --bootstrap-server localhost:9092 --describe
--entity-type client-metrics --entity-name CM1
Dynamic configs for client-metric CM1 are:
interval.ms=1000 sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=1000}
metrics=org.apache.kafka sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=org.apache.kafka}
match= sensitive=false synonyms={}
Using the kafka-client-metrics.sh tool instead, the output always shows the
defaults giving a quick way to see the effective settings.
$ bin/kafka-client-metrics.sh --bootstrap-server localhost:9092 --describe
--name CM1
Client metrics configs for CM1 are:
metrics=org.apache.kafka
interval.ms=300000
match=
Now it's possible to work out what the interval duration is without having to
remember the default value.
was (Author: schofielaj):
Looking at
[https://cwiki.apache.org/confluence/display/KAFKA/KIP-226+-+Dynamic+Broker+Configuration,]
it seems that the following output would be sensible.
$ bin/kafka-config.sh --bootstrap-server localhost:9092 --alter --entity-type
client-metrics --entity-name CM1 --add-config
metrics=org.apache.kafka,interval.ms=1000
This sets the configs metrics and interval.ms, but leaves match unset.
$ bin/kafka-config.sh --bootstrap-server localhost:9092 --describe
--entity-type client-metrics --entity-name CM1
Dynamic configs for client-metric CM1 are:
interval.ms=1000 sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=1000, DEFAULT_CONFIG=300000}
metrics=org.apache.kafka sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=org.apache.kafka, DEFAULT_CONFIG=}
This doesn't show the value of the config match because it's not set and will
take the default value. However, you can see the default with this command.
$ bin/kafka-config.sh --bootstrap-server localhost:9092 --describe
--entity-type client-metrics --entity-name CM1
Dynamic configs for client-metric CM1 are:
interval.ms=1000 sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=1000, DEFAULT_CONFIG=300000}
metrics=org.apache.kafka sensitive=false
synonyms=\{DYNAMIC_CLIENT_METRICS_CONFIG=org.apache.kafka, DEFAULT_CONFIG=}
match= sensitive=false synonyms=\{DEFAULT_CONFIG=}
Using the kafka-client-metrics.sh tool instead, the output always shows the
defaults giving a quick way to see the effective settings.
$ bin/kafka-client-metrics.sh --bootstrap-server localhost:9092 --describe
--name CM1
Client metrics configs for CM1 are:
metrics=org.apache.kafka
interval.ms=300000
match=
Now it's possible to work out what the interval duration is without having to
remember the default value.
> Client metrics configuration resources default configs not shown by
> kafka-configs.sh
> ------------------------------------------------------------------------------------
>
> Key: KAFKA-17516
> URL: https://issues.apache.org/jira/browse/KAFKA-17516
> Project: Kafka
> Issue Type: Bug
> Components: admin
> Affects Versions: 3.7.0
> Reporter: Andrew Schofield
> Assignee: Andrew Schofield
> Priority: Major
> Fix For: 4.0.0
>
>
> KIP-714 introduces client metrics configuration resources for configuring the
> set of metrics pushed by clients. The kafka-configs.sh and
> kafka-client-metrics.sh tools are used to manipulate them.
> When kafka-configs.sh is used to manipulate configurations for other resource
> types, such as topics and groups, configuration for which there is no
> explicit dynamic value specified have a default which is either part of the
> definition of the definition of each config, or inherited from another config
> (usually from the broker).
> This is not the case currently for client metrics resources, and this is not
> intentional. There are defaults for the configurations and they are applied.
> It's just that they're not visible using kafka-configs.sh --describe --all
> and not returned by the admin API. They should be.
> This issue adjusts the handling of the default values so that they are
> displayed by this tool.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)