default: true
input:
  module: jolokia
  metricset: jmx
  defaults:
    namespace: "consumer"
    hosts: ["localhost:8774"]
    path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
    jmx.mappings:
      - mbean: 'kafka.consumer:client-id=*,type=consumer-fetch-manager-metrics'
        attributes:
          - attr: fetch-rate
            field: fetch_rate
          - attr: bytes-consumed-total
            field: bytes_consumed
          - attr: records-consumed-total
            field: records_consumed
      - mbean: 'kafka.consumer:client-id=*,type=consumer-metrics'
        attributes:
          - attr: incoming-byte-total
            field: in.bytes_per_sec
      - mbean: 'kafka.consumer:client-id=*,type=consumer-fetch-manager-metrics'
        attributes:
          - attr: records-lag-max
            field: max_lag
      - mbean: 'kafka\.consumer:type=ZookeeperConsumerConnector,name=ZooKeeperCommitsPerSec,clientId=.*'
        attributes:
          - attr: Count
            field: zookeeper_commits
      - mbean: 'kafka\.consumer:type=ZookeeperConsumerConnector,name=KafkaCommitsPerSec,clientId=.*'
        attributes:
          - attr: Count
            field: kafka_commits
      - mbean: 'kafka\.consumer:type=ConsumerTopicMetrics,name=MessagesPerSec,clientId=.*'
        attributes:
          - attr: Count
            field: messages_in
