Monitoring Local Edition components using JMX
There are two ways to get JMX data from the Traffic Manager pod, depending on what you need.
Method 1: Query metrics directly (no configuration changes)
The Traffic Manager runs a built-in JMX-to-HTTP servlet that reads MBean data from its own local JVM and returns it as a JSON response, so you can query metrics with a simple curl command. No remote JMX agent, image change, or pod restart is required.
Endpoint pattern:
GET /jmx/<MBean ObjectName>
Prerequisite
The management port (8082) is not exposed through trafficmanager-svc, so you need to forward it directly from the pod.
-
Find the Traffic Manager pod name:
kubectl get pods -l app=trafficmanager-deploy -
Forward the management port to your local machine:
kubectl port-forward pod/<trafficmanager-pod-name> 8082:<xxxx>
Replace <xxxx> with the Traffic Manager’s actual management port for your deployment, for example, kubectl port-forward pod/<trafficmanager-pod-name> 8082:8009.
All the sample commands in this section use the base URL http://localhost:8082/jmx/.
Method 2: Connect a JMX client (JConsole, VisualVM, jmxterm)
Use this method if you want to explore JMX data with a standard JMX client instead of curl. It requires enabling the JVM's remote JMX agent, which involves a configuration change and a pod restart. Refer to Enabling remote JMX on the Traffic Manager pod for more information.