WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Websphere ND integration with JMX Exporter

  • 1.  Websphere ND integration with JMX Exporter

    Posted Tue December 15, 2020 06:00 AM

    Hi,

    Monitoring tools have evolved recently and are more open source oriented (Prometheus, Grafana, TICK...)

    I find it a waste that these does not have plugins with solution like WebSphere ND, for example there is the Jboss, Wildfly, Tomcat and others that have specific configuration to have really amazing Dashboards.

    So i'm calling out for WAS Experts/Developers to help me on those integration, will gladly collaborate on this. My goal is to create the following :
    - Create a Websphere ND Grafana dashboard : Showing cells/nodes/servers ... i have already started on this one and any suggestions would be appreciated.
    - Integrate JMX exporter with Websphere ND, to gather pmis and other metrics from it. (Check prometheus/jmx_exporter

    GitHub remove preview
    prometheus/jmx_exporter
    JMX to Prometheus exporter: a collector that can configurably scrape and expose mBeans of a JMX target. This exporter is intended to be run as a Java Agent, exposing a HTTP server and serving metrics of the local JVM.
    View this on GitHub >

    https://github.com/prometheus/jmx_exporter)



    ------------------------------
    Largou walid
    ------------------------------



  • 2.  RE: Websphere ND integration with JMX Exporter

    Posted Thu December 17, 2020 01:36 AM

    Hey Largou,

    thanks for sharing! Sounds interesting. But as the PMI MBeans in WAS are - imho - quite complex (also tried to use Jolokia to retrieve them but did not really succeed) I'm I've done a PoC to use the performance servlet to retrieve the data, parse the XML, write the data to an InfluxDb and graph the data from there using Graphana. That worked quite well and was implemented in Python. So if you just want to graph PMI data this approach could be implemented without having to create a Java agent.



    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------



  • 3.  RE: Websphere ND integration with JMX Exporter

    Posted Thu December 17, 2020 05:27 AM

    Hi,

    Thank you for your feedback, can you share with me the details for the PoC you have done.

    Thanks



    ------------------------------
    Largou walid
    ------------------------------



  • 4.  RE: Websphere ND integration with JMX Exporter

    Posted Fri December 18, 2020 11:33 AM

    Hello Largou,

    you can check it out here: https://github.com/2innovate/was-metrics-exporter

    Feel free to review donate ;)

    Hope that helps ... Hermann



    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------



  • 5.  RE: Websphere ND integration with JMX Exporter

    Posted Fri December 18, 2020 09:37 AM

    Hi Largou / Hermann,

    I get what you mean about it being difficult to interface Prometheus to our JMX MBeans in WAS.  Something I want to share is that the WAS/Liberty observability squad is working on a Prometheus endpoint for WAS traditional, and a Grafana dashboard.

    If that's something you'd be interested in hearing more about, we could get it onto the Customer Advisory Board (CAB) agenda for the new year.  I'm pretty excited about it as it will open up a new way of monitoring for WAS that quite a few folks have expressed interest in. 

    Our intent is to make that endpoint (/metrics) have visibility to the entire WAS cell -- so that Prometheus could be set up to call one endpoint, on any server in the cell, and that endpoint would return metrics data for the entire cell.  That would ensure we can dynamically react to new nodes/servers being added to the cell and can also allow for high availability of the /metrics endpoint.



    ------------------------------
    Don Bourne
    WebSphere Observability Architect
    ------------------------------



  • 6.  RE: Websphere ND integration with JMX Exporter

    Posted Mon December 21, 2020 04:15 AM

    Hi,

    Thank you for your feedback, glad to hear that is work in progress, i will be waiting to discuss it on the CAB meetings.



    ------------------------------
    Largou walid
    ------------------------------



  • 7.  RE: Websphere ND integration with JMX Exporter

    Posted Mon December 21, 2020 01:58 PM

    Hi all, 

    I also have the same topic. I would like to monitor performance of jazz application running on liberty via jmx-exporter and Prometheus to Grafana Dashboard! I appriciate if you can help. 

    Thanks



    ------------------------------
    Nguyen Tu
    ------------------------------



  • 8.  RE: Websphere ND integration with JMX Exporter

    Posted Mon December 21, 2020 06:03 PM

    Hi,

    If it is using liberty, then you can check this integration :

    cpmoore/waslp-prometheusExporter

    GitHub remove preview
    cpmoore/waslp-prometheusExporter
    Prometheus JMX Exporter rewritten as a WebSphere Liberty feature This project creates a Liberty feature that reads mbeans from the server and exposes them in Prometheus format. If installed to a collective controller, the metrics from the collective members can also be exposed. Currently this repository exists as an eclipse project.
    View this on GitHub >

    https://github.com/cpmoore/waslp-prometheusExporter



    ------------------------------
    Largou walid
    ------------------------------



  • 9.  RE: Websphere ND integration with JMX Exporter

    Posted Tue December 22, 2020 09:01 AM

    Hi Largou,

    I tried to do, but I could not be successfully.

    I follow instruction in Github but it has a failure CWWKF1203E

    D:\IBM\JazzTeamServer\server\liberty\wlp\bin>featureManager.bat install prometheusExporter-1.0.0.esa
    This featureManager action is stabilized. Use installUtility install instead. The installUtility command is recommended for installation and repository-related actions.

    Contacting IBM WebSphere Liberty Repository ...
    CWWKF1203E: Unable to obtain the following features: prometheusExporter-1.0.0.esa. Ensure that the features are valid



    ------------------------------
    Nguyen Tu
    ------------------------------



  • 10.  RE: Websphere ND integration with JMX Exporter

    Posted Tue December 22, 2020 09:40 AM

    Hi Nguyễn, 

    Just to make sure, can you provide the liberty version used in your installation. For the command, it's trying to contact liberty external repository, if you have a disconnected environment, there is either the choice to configure a proxy : 

    https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_featuremanager_proxy.html

    Or : 

    Try similar approach for the prometheusExporter instead of admincenter : https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_command_featuremanager.html

    Good Luck



    ------------------------------
    Largou walid
    ------------------------------



  • 11.  RE: Websphere ND integration with JMX Exporter

    Posted Tue December 22, 2020 10:07 AM

    Hi Largou,

    Many thanks, the version is WebSphere Application Server Version 20.0.0.6 Liberty - (20.0.0.6-cl200620200528-0414)

    I'm testing on my Laptop, so it is not a problem with the proxy or internet connection.

    I also tried find command but also can not find the *.esa. 

    Any other hints?

    Thank you so much for your support.



    ------------------------------
    Nguyen Tu
    ------------------------------



  • 12.  RE: Websphere ND integration with JMX Exporter

    Posted Tue December 22, 2020 10:25 AM

    Hi,

    Please the link below (and rename to .esa) :

    https://github.com/cpmoore/waslp-prometheusExporter/releases

    Good Luck



    ------------------------------
    Largou walid
    ------------------------------



  • 13.  RE: Websphere ND integration with JMX Exporter

    Posted Tue December 22, 2020 02:12 PM

    Nguyen, depending on what your needs are you may be able to use the mpMetrics-2.3 feature for Liberty.

    - provides a "Prometheus-format" endpoint (/metrics)

    - the endpoint includes metrics from the server's JMX MXBeans

    - the endpoint includes metrics added to your apps using the MicroProfile Metrics API

    see https://openliberty.io/docs/20.0.0.12/introduction-monitoring-metrics.html for details on setting up the mpMetrics-2.3 feature

    see https://grafana.com/grafana/dashboards/11706 for Grafana dashboard that goes with that feature

    That said, I realize that PrometheusExporter that Largou is pointing to does some different things than the mpMetrics feature -- just thought I'd share this as an option.



    ------------------------------
    Don Bourne
    WebSphere Observability Architect
    ------------------------------



  • 14.  RE: Websphere ND integration with JMX Exporter

    Posted Wed December 23, 2020 08:50 AM

    Hi Lagou, Hi Don,

    Thank you very much. I set up successfully. Now I can monitor Jazz server with Grafana. I used mpMetrics.

    I also tried prometheusExporter but it hasn't worked yet. I don't know why.  I will try again when I have time.

    Merry X-Mas and Happy New Year to all of you!
    Cheers



    ------------------------------
    Nguyen Tu
    ------------------------------



  • 15.  RE: Websphere ND integration with JMX Exporter

    Posted Wed December 23, 2020 10:31 AM

    Hi Sattler,

    For the PrometheusExporter:

    I downloaded the PrometheusExporter1.0.0.esa to my folder Downloads and used the command here and see it can be installed successfully.

    featureManager install prometheusExporter --location=c:\temp\download --acceptLicense

    And then I configured in the server.xml but when I tried the url. I can't see it work http(s)://{host}:{port}/prometheusExporter/{configured_path}

    Do you have any hint?

    <featureManager>
    <feature>jsp-2.3</feature>
    <feature>servlet-3.1</feature>
    <feature>monitor-1.0</feature>
    <feature>ssl-1.0</feature>
    <feature>appSecurity-2.0</feature>
    <feature>adminCenter-1.0</feature>
    <feature>prometheusExporter</feature>
    </featureManager>


    ------------------------------
    Nguyen Tu
    ------------------------------



  • 16.  RE: Websphere ND integration with JMX Exporter

    Posted Mon December 28, 2020 12:59 AM

    Hello,

    I guess you'll have to include the feature version with its name. To check the exact name including version you can use this script which is included in the Liberty bin directory.

    productInfo featureInfo

    Example

    xpo97196@D100STUL0744 /usd/as97196a/soft/wlp/bin> ./productInfo featureInfo
    adminCenter-1.0 [1.0.0]
    apiDiscovery-1.0 [1.0.0]
    appClientSupport-1.0 [1.0.0]
    appSecurity-1.0 [1.1.0]

    ....

    wsSecuritySaml-1.1 [1.0.0]
    osgiAppIntegration-1.0 [1.0.0]

    Product Extension: usr
    dataSourceValidator-1.1 [1.1.0]

    You not only get the feature but also it's version. Maybe that helps - i do not know PrometheusExporter so I won't be able to tell the exact URL to call. 

    Good luck

    Peter



    ------------------------------
    Peter Sattler
    Finanz Informatik
    Hannover
    +49-511-5102-21726
    ------------------------------



  • 17.  RE: Websphere ND integration with JMX Exporter

    Posted Wed December 23, 2020 01:56 AM

    Hello,

    I'm using installUtility to add features. It goes like this.

    Make sure WLP_USER_DIR is set properly.

    WLP_USER_DIR=${PWD}/wlp/usr

    ./bin/installUtility install ${extension} --from=${Repository}/*.esa --to=usr

    As you can see, we install this to usr since it is a homebrewn extension. Might not be necessary in your case but you could try that option. It makes no difference in using it you add the feature to the list. 

    Regards Peter



    ------------------------------
    Peter Sattler
    Finanz Informatik
    Hannover
    +49-511-5102-21726
    ------------------------------