Hi Regards

1. You can confirm whether other metrics can be seen in prometheus and whether 
the metrics reporter is worked;
2. Confirm whether the metrics filter logic is configured[1]. If there is 
filter logic, the reported metrics will also be affected;
3. You can check the TaskManager log to see if there is any error information 
about the metrics;



[1] 
https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/#metrics-reporter-%3Cname%3E-filter-excludes


--

Best,
Matt Wang


---- Replied Message ----
| From | patricia lee<plee3...@gmail.com> |
| Date | 09/18/2023 16:58 |
| To | <user@flink.apache.org> |
| Subject | Custom Metrics not showing in prometheus |
Hi,



I have created a counter of records in my RichSinkFunction


myCounter.inc()


I can see the value exists in the job manager web ui > running jobs > sink 
function > task > metrics. However, I am not available to see it in my 
prometheus web ui.


I am running docker flink in my local as well as prometheus. The flink 
jobmanager and task manager are in UP status in prometheus targets, but 
checking the list of metrics from the explorer "myCounter" custom metrics 
cannot be found.


metrics.reporter.prom.factory.class: 
org.apache.flink.metrics.prometheus.PrometheusReporterFactory
metrics.reporter.prom.port:9250-9260
job_name: "jobmanager"
static_configs:
    - targets: ["jobmanager:9250"]
job_name: "taskmanager"
static_configs:
    - targets: ["taskmanager:9250"
Is there any configuration/steps I missed? Thanks


Regards,
Pat

Reply via email to