我需要将自定义指标从Flink 1.10导出到Prometheus。我已经创建了自定义指标并可以正常工作,但是问题是,当我打印出来(例如在终端中)以查看指标时,Flink会输出很多指标,而我则不需要它们,例如:flink_taskmanager_job_task_Shuffle_Netty_Input_Buffers_inputQueueLength , 还有很多。 我只是想将Flink的自定义指标传播到Prometheus,然后删除其余的指标。 所以,问题:
我已经可以使用以下方法删除一些标签: “ 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”
但还不够,我不需要800多个指标,例如JVM,我正在使用另一个node_exporter来废弃该指标,也需要删除此指标。
任何帮助将不胜感激。非常感谢。
答案 0 :(得分:0)
免责声明:我还没有尝试过。
我将尝试在自定义flink指标上设置user scope,然后设置configure prometheus to only scrape those metrics。