[英]Customize Flink - Prometheus metrics
I need to export custom metrics from Flink 1.10 to Prometheus.我需要将自定义指标从 Flink 1.10 导出到 Prometheus。 I have my custom metrics already created and working, but the issue is that when I print out (in terminal for example) to see the metrics, a lot of metrics comes out from Flink and I don't need them, such as: flink_taskmanager_job_task_Shuffle_Netty_Input_Buffers_inputQueueLength, and many more.
我的自定义指标已经创建并正在工作,但问题是当我打印出来(例如在终端中)查看指标时,很多指标来自 Flink,我不需要它们,例如:flink_taskmanager_job_task_Shuffle_Netty_Input_Buffers_inputQueueLength , 还有很多。 I'm just interest into spread from Flink my custom metrics to Prometheus, and remove the rest of them.
我只是对从 Flink 将我的自定义指标传播到 Prometheus 感兴趣,并删除其中的 rest。 So, questions:
所以,问题:
I've been able to remove a few tags using: "metrics.reporter.cep_reporter.scope.variables.excludes":"job_id;job_name;task_attempt_id;task_attempt_num;task_name;operator_id;operator_name;subtask_index;tm_id;host;Netty"我已经能够使用以下方法删除一些标签:“metrics.reporter.cep_reporter.scope.variables.excludes”:“job_id;job_name;task_attempt_id;task_attempt_num;task_name;operator_id;operator_name;subtask_index;tm_id;host;Netty”
but is not enough, there are more than 800 metrics that I don't need, JVM for example, I'm using another node_exporter to scrape those metrics, need to remove this metrics too.但还不够,我不需要 800 多个指标,例如 JVM,我正在使用另一个 node_exporter 来抓取这些指标,也需要删除这些指标。
Any help will be appreciated.任何帮助将不胜感激。 Thanks a lot.
非常感谢。
Disclaimer: I haven't tried this.免责声明:我没有尝试过这个。
What I would try would be to set a user scope on your custom flink metrics, and then configure prometheus to only scrape those metrics .我会尝试在您的自定义 flink 指标上设置用户 scope ,然后将 prometheus 配置为仅抓取这些指标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.