首页 文章

如何将Datadog中的指标与Flink中的执行计划运算符相关联?

提问于
浏览
0

在我的情况下,Flink正在将指标发送到Datadog . Datadog主机 Map 如下所示{我不知道为什么在这里显示我的延迟}

enter image description here

Flink指标发送到localhost . 这里的问题是什么时候

flink-conf.yaml 文件配置如下

# adding metrics

metrics.reporters: stsd , dghttp
metrics.reporter.stsd.class: org.apache.flink.metrics.statsd.StatsDReporter
metrics.reporter.stsd.host: localhost
metrics.reporter.stsd.port: 8125

#  for datadog
metrics.reporter.dghttp.class: org.apache.flink.metrics.datadog.DatadogHttpReporter
metrics.reporter.dghttp.apikey: xxx
metrics.reporter.dghttp.tags:  host:localhost, job_id : jobA , tm_id : task1 , operator_name : operator1

metrics.scope.operator: numRecordsIn
metrics.scope.operator : numRecordsInPerSecond
metrics.scope.operator : numRecordsOut
metrics.scope.operator : numRecordsOutPerSecond
metrics.scope.operator : latency

问题是Datadog显示了163个我不理解的指标,我将在一段时间内解释

enter image description here

我不理解datadog中的指标格式,因为它向我展示了类似这样的指标

enter image description here

现在如上图所示

延迟以时间表示每秒事件数是事件/秒计数是某个值

所以我的问题是这个指标是什么?

此外,我的工作执行计划是这样的

如何将Datadog中的指标与Flink中的执行计划运算符相关联?

enter image description here

我已经阅读Flink API 1.3.2我可以使用标签,我已经尝试在flink-conf.yaml文件中使用它们,但我没有完整的想法,他们在这里有什么意义 .

我的最终目标是在这种情况下找到操作员延迟,输出的记录数和每个操作员的秒/秒

1 回答

  • 1

    这里有各种各样的问题 .

    1. You've misconfigured the scope formats. (metrics.scope.operator)

    首先,由于您多次指定“metrics.scope.operator”,因此配置没有意义;只有最后一个配置条目才被尊重 .

    其次,更重要的是,你误解了用于范围的格式 .

    范围格式配置报告的度量标准名称中包含哪些上下文信息(如任务的ID) .

    通过将其设置为常量(“延迟”),您已告诉Flink不包含任何内容 . 结果,每个运算符的numRecordsIn度量标准报告为“latency.numRecordsIn” .

    我建议只删除你的范围配置 .

    2. You've misconfigured the Datadog Tags

    我不明白你试图用你的标签配置做什么 .

    标签配置选项只能用于提供 global 标签,即附加到每个指标的标签,例如"Flink" .

    default ,Datadog报告的每个度量标准都附有标记,用于每个可用的可用范围变量 .

    因此,如果您有一个运营商名称A,那么将报告numRecordsIn指标,标签为“operator_name:A” .

    同样,我建议您删除您的配置 .

相关问题