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

Expose version via JMX for 'new' producer

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.0
    • Fix Version/s: 0.9.0.0
    • Component/s: clients, producer
    • Labels:
      None

      Description

      Add version of Kafka to jmx (monitoring tool can use this info).
      Something like that

      kafka.common:type=AppInfo,name=Version
            Value java.lang.Object = 0.8.2-beta
      

      we already have this in "core" Kafka module (see kafka.common.AppInfo object).

        Activity

        Hide
        gwenshap Gwen Shapira added a comment -

        Thanks for updating the status.

        Show
        gwenshap Gwen Shapira added a comment - Thanks for updating the status.
        Hide
        omkreddy Manikumar added a comment -

        This got fixed part of KAFKA-1901

        Server AppInfo MBean: kafka.server:type=app-info,id=([0-9]+)
        Producer AppInfo MBean: kafka.producer:type=app-info,id=([-.\w]+)
        Consumer AppInfo MBean: kafka.consumer=app-info,id=([-.\w]+)
        
        MBean Attributes: 
        CommitId : gives the build time commit hash 
        Version : gives the version of the running kafka 
        
        Show
        omkreddy Manikumar added a comment - This got fixed part of KAFKA-1901 Server AppInfo MBean: kafka.server:type=app-info,id=([0-9]+) Producer AppInfo MBean: kafka.producer:type=app-info,id=([-.\w]+) Consumer AppInfo MBean: kafka.consumer=app-info,id=([-.\w]+) MBean Attributes: CommitId : gives the build time commit hash Version : gives the version of the running kafka
        Hide
        omkreddy Manikumar added a comment -

        Yes, version info can be exposed as JMX info. If some one want to programmatically retrieve the version info, how to retrieve?

        Show
        omkreddy Manikumar added a comment - Yes, version info can be exposed as JMX info. If some one want to programmatically retrieve the version info, how to retrieve?
        Hide
        jkreps Jay Kreps added a comment -

        The metrics are just for metrics which are by nature numeric, right?

        I don't think that package is the best way to expose generic JMX information. I would just use normal Java JMX support for that. That works, right?

        Show
        jkreps Jay Kreps added a comment - The metrics are just for metrics which are by nature numeric, right? I don't think that package is the best way to expose generic JMX information. I would just use normal Java JMX support for that. That works, right?
        Hide
        rkellogg Rick Kellogg added a comment -

        Please be aware that exposure of version information can sometimes cause security certification problems. Individuals use this information to target security holes. So as a consequence, there should be a way to disable this information.

        Show
        rkellogg Rick Kellogg added a comment - Please be aware that exposure of version information can sometimes cause security certification problems. Individuals use this information to target security holes. So as a consequence, there should be a way to disable this information.
        Hide
        omkreddy Manikumar added a comment -

        Jay Kreps Jun Rao Currently Kafka metrics can return only double value (Metric.java).
        How to handle future metrics which can return other data types (int, long, string).?
        We may need to introduce generic types to metrics. This will be a sizable change and will change some public APIs.

        I encountered this, while I was trying to include version info to producer metrics.

        Show
        omkreddy Manikumar added a comment - Jay Kreps Jun Rao Currently Kafka metrics can return only double value (Metric.java). How to handle future metrics which can return other data types (int, long, string).? We may need to introduce generic types to metrics. This will be a sizable change and will change some public APIs. I encountered this, while I was trying to include version info to producer metrics.

          People

          • Assignee:
            omkreddy Manikumar
            Reporter:
            vladimir.tretyakov Vladimir Tretyakov
            Reviewer:
            Joel Koshy
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development