Kafka consumer - producer performance measurements
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
How can I measure the rate of Kafka producers and consumers in a Java application? Does Kafka broker provides any performance metrics?
apache-kafka
add a comment |
How can I measure the rate of Kafka producers and consumers in a Java application? Does Kafka broker provides any performance metrics?
apache-kafka
add a comment |
How can I measure the rate of Kafka producers and consumers in a Java application? Does Kafka broker provides any performance metrics?
apache-kafka
How can I measure the rate of Kafka producers and consumers in a Java application? Does Kafka broker provides any performance metrics?
apache-kafka
apache-kafka
asked Nov 26 '18 at 21:34
Adib RastegarniaAdib Rastegarnia
4716
4716
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Kafka itself exposes lots of performance metrics. At my employer, we use Prometheus to ingest + store those metrics, and a Grafana frontend for graphs + dashboards. We also instrument our apps, including our Java apps with the Prometheus library, and expose+scrape custom metrics to help us understand all aspects of our data pipelines and performance.
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
When you run your Kafka brokers, set the environment variableKAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files fromhttps://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
andhttps://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
after that you should be able to see the metrics via doing an http test withcurl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.
– clay
Nov 27 '18 at 2:54
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
|
show 4 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53489410%2fkafka-consumer-producer-performance-measurements%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Kafka itself exposes lots of performance metrics. At my employer, we use Prometheus to ingest + store those metrics, and a Grafana frontend for graphs + dashboards. We also instrument our apps, including our Java apps with the Prometheus library, and expose+scrape custom metrics to help us understand all aspects of our data pipelines and performance.
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
When you run your Kafka brokers, set the environment variableKAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files fromhttps://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
andhttps://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
after that you should be able to see the metrics via doing an http test withcurl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.
– clay
Nov 27 '18 at 2:54
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
|
show 4 more comments
Kafka itself exposes lots of performance metrics. At my employer, we use Prometheus to ingest + store those metrics, and a Grafana frontend for graphs + dashboards. We also instrument our apps, including our Java apps with the Prometheus library, and expose+scrape custom metrics to help us understand all aspects of our data pipelines and performance.
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
When you run your Kafka brokers, set the environment variableKAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files fromhttps://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
andhttps://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
after that you should be able to see the metrics via doing an http test withcurl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.
– clay
Nov 27 '18 at 2:54
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
|
show 4 more comments
Kafka itself exposes lots of performance metrics. At my employer, we use Prometheus to ingest + store those metrics, and a Grafana frontend for graphs + dashboards. We also instrument our apps, including our Java apps with the Prometheus library, and expose+scrape custom metrics to help us understand all aspects of our data pipelines and performance.
Kafka itself exposes lots of performance metrics. At my employer, we use Prometheus to ingest + store those metrics, and a Grafana frontend for graphs + dashboards. We also instrument our apps, including our Java apps with the Prometheus library, and expose+scrape custom metrics to help us understand all aspects of our data pipelines and performance.
answered Nov 26 '18 at 21:48
clayclay
5,07354292
5,07354292
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
When you run your Kafka brokers, set the environment variableKAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files fromhttps://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
andhttps://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
after that you should be able to see the metrics via doing an http test withcurl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.
– clay
Nov 27 '18 at 2:54
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
|
show 4 more comments
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
When you run your Kafka brokers, set the environment variableKAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files fromhttps://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
andhttps://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
after that you should be able to see the metrics via doing an http test withcurl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.
– clay
Nov 27 '18 at 2:54
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
Would you please tell me how can I use Kafka performance metrics? How should I check them?
– Adib Rastegarnia
Nov 26 '18 at 23:36
When you run your Kafka brokers, set the environment variable
KAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files from https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
and https://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
When you run your Kafka brokers, set the environment variable
KAFKA_OPTS=-javaagent:/usr/share/jmx_prometheus_javaagent-0.3.1.jar=7071:/usr/share/kafka-0-8-2.yml
with local paths pointing to the files from https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.3.1/jmx_prometheus_javaagent-0.3.1.jar
and https://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-0-8-2.yml
– clay
Nov 27 '18 at 2:52
after that you should be able to see the metrics via doing an http test with
curl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.– clay
Nov 27 '18 at 2:54
after that you should be able to see the metrics via doing an http test with
curl my-kafka-broker:7071/localhost
. When you've confirmed that's working, setup a Prometheus server and configure your Kafka brokers as scrape targets. Then you should see your Kafka metrics.– clay
Nov 27 '18 at 2:54
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Thanks I will try and then let you know.
– Adib Rastegarnia
Nov 27 '18 at 3:24
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
Is the order of those commands important? I cannot connect to the server on port 7071.
– Adib Rastegarnia
Nov 27 '18 at 3:53
|
show 4 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53489410%2fkafka-consumer-producer-performance-measurements%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown