I am a learner and need help please.
I have a Java maven project which implements Flink MetricsReporter interface , as my custom reporter to send metrics.
In my local Flink, I was able to:
- Add Flink JMX reporter config in local flink-conf.yaml file.
- Start flink on port 8789
- Use JConsole (JMX console) to connect to remote localhost:8789
- Restart flink, see flink metrics under JConsole Beans.
After this Proof of concept that the workflow works, what I want to do is:
- I wrote a custom reporter implementing metrics interface, and I built the reporter into a jar, with all necessary dependencies.
- I moved the jar under flink
lib/
folder, as suggested from The important paragraph of the Reporter documentation
My jar is named x-y-reporter-1.0-SNAPSHOT.jar
The pom
<groupId>a.b.c</groupId>
<artifactId>x-y-reporter</artifactId>
<version>1.0-SNAPSHOT</version>
I updated below config to flink-conf.yaml
metrics.reporters: x-y-reporter
metrics.reporter.x-y-reporter.class: com.b.c.xyreporter.XYReporter
metrics.reporter.x-y-reporter.class.host: localhost
metrics.reporter.x-y-reporter.port: 8789
Question:
- I want to replace JMX configs to my own reporter configs in flink-conf.yaml. The above config did not work. How would I do that please? What each parameters mean please?
- I want to see the metrics from JMX console like the JMX-reporter. Is it also through configuring through the port number?
Thank you very much.
metrics.reporters: jmx metrics.reporter.jmx.class: com.b.c.xyreporter.XYReporter metrics.reporter.jmx.port: 8789
– Georgi Stoyanov