Benthos metrcis 说明

Benthos 按照input, pipeline ,buffer,conditions,ouput 这个几个大类,为我们提供了
方便的分析metrics,支持json 格式同时可以暴露为 statsd、prometheus 格式的数据metrics
当前的metrics 如下:

Input

  • input.count: The number of times the input has attempted to read messages.
  • input.received: The number of messages received by the input.
  • input.batch.received: The number of message batches received by the input.
  • input.connection.up
  • input.connection.failed
  • input.connection.lost
  • input.latency: Measures the roundtrip latency from the point at which a
    message is read up to the moment the message has either been acknowledged by
    an output or has been stored within an external buffer.

Buffer

  • buffer.backlog: The (sometimes estimated) size of the buffer backlog in
    bytes.
  • buffer.write.count
  • buffer.write.error
  • buffer.read.count
  • buffer.read.error
  • buffer.latency: Measures the roundtrip latency from the point at which a
    message is read from the buffer up to the moment it has been acknowledged by
    the output.

Processors

Processor metrics are prefixed by the area of the Benthos stream they reside in
and their index. For example, processors in the pipeline section will be
prefixed with pipeline.processor.N, where N is the index.

  • pipeline.processor.0.count
  • pipeline.processor.0.sent
  • pipeline.processor.0.batch.sent
  • pipeline.processor.0.error

Conditions

  • condition.count
  • condition.true
  • condition.false

Output

  • output.count: The number of times the output has attempted to send messages.
  • output.sent: The number of messages sent.
  • output.batch.sent: The number of message batches sent.
  • output.connection.up
  • output.connection.failed
  • output.connection.lost

使用说明

实际参考如下配置,修改type 为需要的类型

 
metrics:
  type: http_server
  prefix: benthos
  http_server: {}
  prometheus: {}
  statsd:
    address: localhost:4040
    flush_period: 100ms
    network: udp
 

参考资料

https://github.com/Jeffail/benthos/blob/master/config/metrics.yaml#L35
https://github.com/Jeffail/benthos/blob/master/docs/metrics.md

posted on   荣锋亮  阅读(692)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2017-12-17 arangodb 安装简单试用
2013-12-17 silverlight 中javascript 代码与托管代码的互调用 以及一些思考

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示