anchor.diff:          domain: 'kafka.server'
           bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec'
           attribute:
  -          MeanRate:
  -            metric_type: gauge
  -            alias: kafka.net.bytes_out
  +          Count:
  +            metric_type: rate
  +            alias: kafka.net.bytes_out.rate
       - include:
           domain: 'kafka.server'
           bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec'
           attribute:
  -          MeanRate:
  -            metric_type: gauge
  -            alias: kafka.net.bytes_in
  +          Count:
  +            metric_type: rate
  +            alias: kafka.net.bytes_in.rate
       - include:
           domain: 'kafka.server'
           bean: 'kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec'
           attribute:
  -          MeanRate:
  -            metric_type: gauge
  -            alias: kafka.messages_in
  +          Count:
  +            metric_type: rate
  +            alias: kafka.messages_in.rate
       - include:
           domain: 'kafka.server'
           bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesRejectedPerSec'
           attribute:
  -          MeanRate:
  -            metric_type: gauge
  -            alias: kafka.net.bytes_rejected
  +          Count:
  +            metric_type: rate
  +            alias: kafka.net.bytes_rejected.rate
     <% node['masala_kafka']['topics_monitored'].each do |t| -%>
       - include:
           domain: 'kafka.server'
           bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec,topic=<%= t %>'
           attribute:
  -          MeanRate:
  -            metric_type: gauge
  -            alias: kafka.net.bytes_in
  +          Count:
  +            metric_type: rate
  +            alias: kafka.net.bytes_in.rate
      <% end -%>
   
       #
  
positive.code:         domain: 'kafka.server'
          bean: 'kafka.server:type=BrokerTopicMetrics,name=FailedFetchRequestsPerSec'
          attribute:
            MeanRate:
              metric_type: gauge
              alias: kafka.request.fetch.failed
      - include:
          domain: 'kafka.server'
          bean: 'kafka.server:type=BrokerTopicMetrics,name=FailedProduceRequestsPerSec'
          attribute:
            MeanRate:
              metric_type: gauge
              alias: kafka.request.produce.failed
      - include:
          domain: 'kafka.network'
          bean: 'kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce'
  
negative.code: 
    # Metrics collected by this check. You should not have to modify this.
    conf:
      # v0.8.2.x Producers
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=ProducerRequestMetrics,name=ProducerRequestRateAndTimeMs,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.producer.request_rate
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=ProducerRequestMetrics,name=ProducerRequestRateAndTimeMs,clientId=.*'
          attribute:
            Mean:
              metric_type: gauge
              alias: kafka.producer.request_latency_avg
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=ProducerTopicMetrics,name=BytesPerSec,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.producer.bytes_out
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=ProducerTopicMetrics,name=MessagesPerSec,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.producer.message_rate
  
  
      # v0.9.0.x Producers
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=producer-metrics,client-id=.*'
          attribute:
            response-rate:
              metric_type: gauge
              alias: kafka.producer.response_rate
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=producer-metrics,client-id=.*'
          attribute:
            request-rate:
              metric_type: gauge
              alias: kafka.producer.request_rate
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=producer-metrics,client-id=.*'
          attribute:
            request-latency-avg:
              metric_type: gauge
              alias: kafka.producer.request_latency_avg
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=producer-metrics,client-id=.*'
          attribute:
            outgoing-byte-rate:
              metric_type: gauge
              alias: kafka.producer.bytes_out
      - include:
          domain: 'kafka.producer'
          bean_regex: 'kafka\.producer:type=producer-metrics,client-id=.*'
          attribute:
            io-wait-time-ns-avg:
              metric_type: gauge
              alias: kafka.producer.io_wait
  
  
      # v0.8.2.x Consumers
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=ConsumerFetcherManager,name=MaxLag,clientId=.*'
          attribute:
            Value:
              metric_type: gauge
              alias: kafka.consumer.max_lag
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=ConsumerFetcherManager,name=MinFetchRate,clientId=.*'
          attribute:
            Value:
              metric_type: gauge
              alias: kafka.consumer.fetch_rate
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=ConsumerTopicMetrics,name=BytesPerSec,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.consumer.bytes_in
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=ConsumerTopicMetrics,name=MessagesPerSec,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.consumer.messages_in
  
      # Offsets committed to ZooKeeper
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=ZookeeperConsumerConnector,name=ZooKeeperCommitsPerSec,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.consumer.zookeeper_commits
      # Offsets committed to Kafka
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=ZookeeperConsumerConnector,name=KafkaCommitsPerSec,clientId=.*'
          attribute:
            Count:
              metric_type: rate
              alias: kafka.consumer.kafka_commits
  
      # v0.9.0.x Consumers
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=consumer-fetch-manager-metrics,client-id=.*'
          attribute:
            bytes-consumed-rate:
              metric_type: gauge
              alias: kafka.consumer.bytes_in
      - include:
          domain: 'kafka.consumer'
          bean_regex: 'kafka\.consumer:type=consumer-fetch-manager-metrics,client-id=.*'
          attribute:
            records-consumed-rate:
              metric_type: gauge
              alias: kafka.consumer.messages_in
  
      #
      # Aggregate cluster stats
      #
  