Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4449

zookeeper monitoring metrics error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.5.8
    • 3.5.8
    • None
    • None

    Description

      Deploy kafka and zookeeper in k8s, and use the following configuration to output monitoring metrics

       

      -javaagent:/opt/kafka/libs/jmx_prometheus_javaagent-0.12.0.jar=9404:/opt/kafka/custom-config/metrics-config.yml 

       

       

      The metrics configuration is as follows:

       

      $ cat /opt/kafka/custom-config/metrics-config.yml
      {
          "lowercaseOutputName":true,
          "rules":[
             
      {             "name":"zookeeper_$2",             "pattern":"org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+)><>(\\w+)",             "type":"GAUGE"         }
      ,
              {
                  "labels":
      {                 "replicaId":"$2"             }
      ,
                  "name":"zookeeper_$3",
                  "pattern":"org.apache.ZooKeeperService<name0=ReplicatedServer_id(d+), name1=replica.(\\d+)><>(w+)",
                  "type":"GAUGE"
              },
              {
                  "labels":
      {                 "memberType":"$3",                 "replicaId":"$2"             }
      ,
                  "name":"zookeeper_$4",
                  "pattern":"org.apache.ZooKeeperService<name0=ReplicatedServer_id(d+), name1=replica.(d+), name2=(w+)><>(Packets.*)",
                  "type":"COUNTER"
              },
              {
                  "labels":
      {                 "memberType":"$3",                 "replicaId":"$2"             }
      ,
                  "name":"zookeeper_$4",
                  "pattern":"org.apache.ZooKeeperService<name0=ReplicatedServer_id(d+), name1=replica.(d+), name2=(\\w+)><>(w+)",
                  "type":"GAUGE"
              },
              {
                  "labels":
      {                 "memberType":"$3",                 "replica":"$2"             }
      ,
                  "name":"zookeeper_$5",
                  "pattern":"org.apache.ZooKeeperService<name0=(.).name1=(.).name2=(.).name3=(.)><>(PacketsReceived)",
                  "type":"COUNTER"
              },
              {
                  "labels":
      {                 "memberType":"$3",                 "replica":"$2"             }
      ,
                  "name":"zookeeper_$5",
                  "pattern":"org.apache.ZooKeeperService<name0=(.).name1=(.).name2=(.).name3=(.)><>(PacketsSent)",
                  "type":"COUNTER"
              },
              {
                  "labels":
      {                 "memberType":"$3",                 "replicaId":"$2"             }
      ,
                  "name":"zookeeper_$4_$5",
                  "pattern":"org.apache.ZooKeeperService<name0=ReplicatedServer_id(d+), name1=replica.(d+), name2=(w+), name3=(\\w+)><>(w+)",
                  "type":"GAUGE"
              },
             
      {             "name":"zookeeper_$2",             "pattern":"org.apache.ZooKeeperService<name0=StandaloneServer_port(\\d+)><>(\\w+)",             "type":"GAUGE"         }
      ,
             
      {             "name":"zookeeper_$2",             "pattern":"org.apache.ZooKeeperService<name0=StandaloneServer_port(\\d+), name1=InMemoryDataTree><>(\\w+)",             "type":"GAUGE"         }
          ]
      } 

       

       

      At this time, there are some very strange monitoring metrics in promethues

       

      The jmx exporter version used is 0.12.0

      What is the problem at this time, have you encountered it?

      Attachments

        Activity

          People

            Unassigned Unassigned
            lanzhiwang lanzhiwang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: