1
votes

I am learning all these. Please share your ideas and help.

I am trying to see flink metrics with JMX reporter from JMX console. Steps:

  1. I have Apache-flink installed by homebrew, alias fstart and fstop for starting/stopping Flink. Based on [this JMX reporter link][https://ci.apache.org/projects/flink/flink-docs-release-1.4/monitoring/metrics.html#jmx-orgapacheflinkmetricsjmxjmxreporter], I added below 3 lines at the end of flink-conf.yaml

    metrics.reporters: jmx metrics.reporter.jmx.class: org.apache.flink.metrics.jmx.JMXReporter metrics.reporter.jmx.port: 8789

  2. I downloaded Wildfly (JBoss application server), from its bin folder, run JConsole.sh.

  3. The Jconsole shows local processes. I picked "org.apache.flink.runtime.jobmanager.JobManager" and Connect. JConsole - available processes . It shows the default Beans Default beans. However, no Flink related beans appears here.

Correct me if I am wrong please. I assume if Flink metrics through JMX reporter is sending metrics to my local JMX box, then I should be able to see any of below metrics from the beans. https://ci.apache.org/projects/flink/flink-docs-release-1.4/monitoring/metrics.html#system-metrics

What step have I done wrong or missing please? Any help is appreciated. Thank you.

1
Have you tried connecting to a remote process via localhost:8789?Dawid Wysakowicz
@DawidWysakowicz yes, it worked. Thank you!sue

1 Answers

1
votes

If you explicitly configure a port you have to connect to JMX using this port. If you omit the port the metrics will be available when connecting locally.

The documentation is a bit contradictory in that regard "If this setting is set Flink will start an extra JMX connector for the given port/range. Metrics are always available on the default local JMX interface."