Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on
09-24-2019
02:08 PM
- edited on
12-20-2019
05:38 PM
by
Claudia.Landiva
jConsole is a utility that comes with the Java Development Kit (JDK). It helps to test the connection between the extension and the JMX artifact being monitored. You can use jConsole to troubleshoot connection issues in the extension. You can also use it to configure the MBeans the extension collects.
This article walks you through using jConsole with the artifact that you want to monitor.
The JDK needs to be installed on the machine where the extension is installed.
How do I get started with jConsole?
How do I troubleshoot JMX connection fails?
How do I view and configure the JMX MBeans?
To start using jConsole with a JMX artifact, you'll need to launch jConsole, and then connect the artifact to it.
If you have enabled JMX monitoring via SSL on the artifact, you need to run jConsole as follows.
jconsole -J-Djavax.net.ssl.trustStore=/path/to/truststore \
-J-Djavax.net.ssl.trustStorePassword=trustword
config.yml
or a host JMX-port pair to connect to the artifact.service:jmx:rmi:///jndi/rmi://host:JMXport/jmxrmi
If you're choosing the host and JMX port to connect, the format of the Host JMX-port pair is <IP address of the machine on which the artifact is running>:<JMX-port>
For example:
34.222.32.114:9999
localhost:9999
If the configuration is correct, the connection between the extension and the artifact will be successful, and metrics will be reported.
If you see any error messages, please refer to the How do I troubleshoot JMX connection fails? section below.
java -Djavax.net.ssl.trustStore=/path/to/truststore \ -Djavax.net.ssl.trustStorePassword=trustword <other parameters go here> -jar machine-agent.jar
If you see a jConsole connection failing, as shown with the “connection refused” message, it might be caused by one or more of the following reasons:
Once the connection is successful (starting from the Java Monitoring and Management Console), navigate to the MBeans tab.
The extension is configured to fetch some metrics by default. But if you find that the metrics that you want aren’t listed in config.yml
by default, you can configure config.yml
to add them.
Once you have followed How do I get started with jConsole steps 1 and 2, the jConsole should be up. You should see the MBean Explorer on the left pane of the jConsole window. Each MBean has a few metrics listed underneath it: navigate through the MBeans down to the metric(s) you're interested in.
As an example, let's consider using the Kafka monitoring extension to track metrics:
You can use Kafka to see the number of UnderReplicatedPartitions in your partition.
Add the MBean in your config.yml
MBeans:
<<Other MBeans>>
<<add your MBean here>>
<<Example of adding UnderReplicatedPartitions.Value here>>
- objectName: 'kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions'
metrics:
- Value:
alias: 'Value'
multiplier: ''
delta: false
aggregationType: 'OBSERVATION'
timeRollUpType: 'CURRENT'
clusterRollUpType: 'INDIVIDUAL'
Let’s consider another case where there are multiple metrics under one object:FailedIsrUpdatesPerSec
. Those metrics are listed under kafka.server -> Replica Manager ->object:FailedIsrUpdatesPerSec -> Attributes
.
For example, to fetch all metrics(stats) about FailedIsrUpdatesPerSec (Count, MeanRate, OneMinuteRate, etc.), list each of them in the metrics section of the FailedIsrUpdatesPerSec. The Value metric is listed as an example.
If you want to add all the MBeans under ReplicaManager, you can add a wildcard (a *) in your config.yml
MBeans:
<<Other MBeans>>
<<add your MBean here>>
<<Example of adding UnderReplicatedPartitions.Value here>>
- objectName: 'kafka.server:type=ReplicaManager,name=*'
metrics:
- Value:
alias: 'Value'
multiplier: ''
delta: false
aggregationType: 'OBSERVATION'
timeRollUpType: 'CURRENT'
clusterRollUpType: 'INDIVIDUAL'
The extension can only collect metrics if the JMX connection is successful.
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form