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 2018-12-17 14:21  荣锋亮  阅读(677)  评论(0编辑  收藏  举报

导航