I have configured metrics in flink and exposed in prometheus, its working fine, But I just need to verify some metrics in my integration test, so I was trying to expose to prometheus via java code
Followed the approach mentioned in below link (heading- Configuring Prometheus with Flink )
https://flink.apache.org/features/2019/03/11/prometheus-monitoring.html
and converted to java inline config.
conf.setString("metrics.reporters", "prom");
conf.setString("metrics.reporter.prom.class", "org.apache.flink.metrics.prometheus.PrometheusReporter");
conf.setInteger("metrics.reporter.prom.port", 9999);
But how to config prometheus yml contents? can I set to same flink conf object as below?
conf.setString("global.scrape_interval","15s");
conf.setString("scrape_configs","[{job_name=name, static_configs=[{targets=[localhost:9999]}]}]}");