Skip to content
Documentation
Updated 2 minutes to read
Markdown

Can I monitor WSO2 running in Docker or Kubernetes?

Section titled “Can I monitor WSO2 running in Docker or Kubernetes?”

Yes, when the JMX remote port of the WSO2 JVM is reachable from the Spring Boot JMX Gateway. Nodinite monitors WSO2 with the JMX Monitoring Agent, so a WSO2 container is just another JVM with a JMX remote port to publish.

  1. Add the JMX remote options to the WSO2 container's JVM options (Enable JMX Remote Monitoring). Use one fixed port, and set com.sun.management.jmxremote.rmi.port to the same value as com.sun.management.jmxremote.port.
  2. Set -Djava.rmi.server.hostname to the address the gateway uses, such as the Docker host name. RMI returns this address to the client, so a container-internal address breaks the connection.
  3. Publish the port, for example -p 5002:5002.
  4. Add the Docker host and the published port as an Application Host in the JMX Monitoring Agent configuration.

The JMX agent's Docker Container Monitoring guide has the details and common errors.

Expose the same JMX port through a Service that the gateway can reach, for example a NodePort:

apiVersion: v1
kind: Service
metadata:
name: wso2-mi-jmx
spec:
type: NodePort
ports:
- port: 5002
targetPort: 5002
nodePort: 30502
selector:
app: wso2-mi

With a NodePort, the published port differs from the container port, and RMI needs both to match. Either use the same number for the JMX port and the node port, or give each pod its own Service and port. Each pod you want to watch is its own Application Host; a Service that load-balances across several pods returns values from whichever pod answers.

The ports between the Monitoring Service, the agent, the gateway, and the WSO2 JVM are in the JMX firewall section.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...