Yolean/kubernetes-kafka

Issue with prometheus

fr-sgujrati opened this issue · 2 comments

Hi,
I applied files in prometheus folder, and I can see metrics container along with broker container. But all I see in the logs of metrics container is

VM settings:
Max. Heap Size (Estimated): 53.50M
Ergonomics Machine Class: server
Using VM: OpenJDK 64-Bit Server VM

I also updated broker's stateful set as follows:

       containers:
      - name: broker
        image: solsson/kafka:1.0.2@sha256:7fdb326994bcde133c777d888d06863b7c1a0e80f043582816715d76643ab789
        env:
        - name: KAFKA_LOG4J_OPTS
          value: -Dlog4j.configuration=file:/etc/kafka/log4j.properties
        - name: KAFKA_OPTS
          value: -Djavax.net.debug=all
        - name: JMX_PORT
          value: "5555"
        ports:
        - name: inside
          containerPort: 9092
        - name: jmx
          containerPort: 5555

Am I missing something? Thanks

You should try to curl /metrics on the pod's scrape port, for example using kubectl port-forward. There you should get the prometheus plaintext format.

Thanks for quick reply @solsson. It works. Closing the issue.