Uploaded image for project: 'Spring Boot & Cloud'
  1. Spring Boot & Cloud
  2. SB-343

Document & design a HowTo Guide to explain how to grab jolokia JMX Mbeans

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • documentation
    • None
    • SB-2018-09-28, SB-2018-10-12, SB-2018-10-27, SB-2018-11-09, SB-2018-11-23, SB-2018-12-07

      The openjdk 8 docker image that we are using to package a Spring Boot app exposes using Jolokia a Servlet to access the JMX/MBeans [1]

      Log of the pod --> Jolokia: Agent started with URL https://172.20.5.205:8778/jolokia/

      Using this http endpoint, we get JMX infos within the pod

      curl -k -u jolokia:THEPASSWORD https://localhost:8778/jolokia/version
      --> {"request":{"type":"version"},"value":{"agent":"1.3.6","protocol":"7.2","config":...
      

      or using the Kubernetes Api [1]

      http --verify=no https://osemaster.spring-boot.osepool.centralci.eng.rdu2.redhat.com:8443/api/v1/namespaces/cmoulliard/pods/https:spring-boot-rest-http-2-gck73:8778/proxy/jolokia/read/java.lang:type\=Memory/HeapMemoryUsage 'Authorization:Bearer TOKEN'
      HTTP/1.1 200 OK
      Cache-Control: no-store
      Cache-Control: no-cache
      Content-Length: 206
      Content-Type: text/plain; charset=utf-8
      Date: Tue, 14 Nov 2017 11:57:48 GMT
      Expires: Tue, 14 Nov 2017 10:57:48 GMT
      Pragma: no-cache
      
      {
          "request": {
              "attribute": "HeapMemoryUsage",
              "mbean": "java.lang:type=Memory",
              "type": "read"
          },
          "status": 200,
          "timestamp": 1510660668,
          "value": {
              "committed": 131072000,
              "init": 132120576,
              "max": 131072000,
              "used": 44817232
          }
      }
      

      As such feature, collecting JMX Metrics or MBeans info exposed through Spring Boot Actuator is a key success factor to improve the Developer Experience around Kubernetes/Openshift, we should :

      • Document it and design a How to Guide using https://github.com/snowdrop/spring-boot-jolokia
      • Extend the use case to install a Management console (Hawkular, ....) to display graphically the metrics/filter, ....
      • Add this capability to istio in order to collect the infos and inject them into an ElasticSearch DB for Monitoring

      See more info about strategies : https://github.com/fabric8-launch/appdev-documentation/issues/891

      [1] https://developers.redhat.com/blog/2016/03/30/jolokia-jvm-monitoring-in-openshift/

        1. Screenshot 2018-11-20 12.04.34.png
          151 kB
          Charles Moulliard
        2. Screenshot 2018-11-20 12.04.47.png
          196 kB
          Charles Moulliard
        3. Screenshot 2018-11-20 12.05.05.png
          242 kB
          Charles Moulliard

              cmoullia Charles Moulliard
              cmoullia Charles Moulliard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: