Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10776

JMX metric RequestsPerSec requires API version to access

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0
    • None
    • None

    Description

      JMX metric for "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce" seems to require the API version by adding "version=8" at the end of JMX metric name.

      badai@Badai-Aqrandista-MBP15 % bin/kafka-run-class kafka.tools.JmxTool --jmx-url service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi -object-name kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce           Trying to connect to JMX url: service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi. No matched attributes for the queried objects ArrayBuffer(kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce).
      

       

      badai@Badai-Aqrandista-MBP15 % bin/kafka-run-class kafka.tools.JmxTool --jmx-url service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi -object-name kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8
      Trying to connect to JMX url: service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi.
      "time","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:Count","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:EventType","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:FifteenMinuteRate","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:FiveMinuteRate","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:MeanRate","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:OneMinuteRate","kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce,version=8:RateUnit"
      1606699872861,6,requests,0.1989162534702867,0.19690572377187665,0.15294943373697226,0.1883600179350904,SECONDS
      1606699874859,6,requests,0.19781422719176484,0.19365115842372535,0.14552410136055885,0.1732995824406591,SECONDS
      1606699876860,8,requests,0.19781422719176484,0.19365115842372535,0.18505354392836157,0.1732995824406591,SECONDS
      1606699878863,8,requests,0.19893436710436987,0.19706180478057453,0.1768573689590503,0.19142554703039305,SECONDS
      ^C

       

      While other JMX metric under RequestMetrics do not require to specify API version:

      badai@Badai-Aqrandista-MBP15 confluent-5.5.1 % bin/kafka-run-class kafka.tools.JmxTool --jmx-url service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi -object-name kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce    Trying to connect to JMX url: service:jmx:rmi:///jndi/rmi://127.0.0.1:9999/jmxrmi. "time","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:50thPercentile","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:75thPercentile","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:95thPercentile","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:98thPercentile","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:999thPercentile","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:99thPercentile","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:Count","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:Max","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:Mean","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:Min","kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce:StdDev" 1606700344429,2.0,2.0,4.699999999999989,31.279999999999745,46.0,46.0,72,46.0,2.638888888888889,1.0,5.436718033280366 1606700346433,2.0,2.0,4.699999999999989,31.279999999999745,46.0,46.0,72,46.0,2.638888888888889,1.0,5.436718033280366 
      ^C                                             
      

       

      This is definitely not documented here: https://kafka.apache.org/documentation/#monitoring

       

      I think "version=X" part in  "RequestsPerSec" is a mistake and should be removed.

       

      Attachments

        Issue Links

          Activity

            People

              showuon Luke Chen
              badai Badai Aqrandista
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: