Skip to main content
Version: Deploy 23.1

Using JMX counters for Deploy Satellite

You can use the Java Management Extensions (JMX) technology to manage and monitor your Deploy Satellite servers. With JMX counters you can keep track of the resources that the Deploy Satellite server is consuming.

A JMX agent can be started on Deploy by configuring JMX settings in the deploy-jmx.yaml file. Using a client like JConsole or VisualVM, you can connect to the running JMX agent through a port to view the information tracked by the JMX counters.

Supported JMX counters

  • task.done - Number of tasks completed.
  • task.active - Number of active tasks.
  • remote.<host_ip>-<host_port> - Where host_ip is the IP address on which Deploy is connected to Deploy Satellite, and host_port is the port on which Deploy is connected to Deploy Satellite. The value for this counter can be either ASSOCIATED or DISASSOCIATED, depending on if Deploy and Deploy Satellite are connected or not.

Configure secure communications

A client like JConsole can connect to the JMX agent over a secure communication channel using the TLS/SSL technology.

To configure a secure communication:

  1. Generate a key and a certificate for Deploy or Deploy Satellite servers.
  2. Add a certificate to the truststore on the client machine.

Sample keystore and truststore creation

This example describes how to create keys and self-signed certificates using the keytool utility.

  1. Generate a key for a Deploy or Deploy Satellite instance:
    keytool -genkey -alias jmx -keyalg RSA -keypass k3yp@ss -storepass st0r3p@ss -keystore keystore-jmx.jks -validity 360 -keysize 1024
  2. Export the public certificate:
    keytool -export -keystore keystore-jmx.jks -alias jmx -file jmx-cert.cer
  3. Import the certificate into the truststore on the client machine:
    keytool -import -alias jmx -file jmx-cert.cer -storepass st0r3p@ss -keystore truststore-jmx.jks

Configure Deploy or Deploy Satellite to start the JMX agent

Modify the deploy-jmx.yaml file for Deploy for Deploy Satellite:

deploy.jmx:
enabled: yes
port: 1099

ssl:
enabled: yes
key-store: "keystore-jmx.jks"
key-password: "k3yp@ss"
key-store-password: "st0r3p@ss"
protocol: "TLSv1.2"
enabled-algorithms: ["TLS_RSA_WITH_AES_128_CBC_SHA"]

Start the Deploy or Deploy Satellite servers with the above configuration. This will start the JMX agent with SSL enabled.

To connect the client, for example JConsole, to the JMX agent:

jconsole -J-Djavax.net.ssl.trustStore=truststore-jmx.jks -J-Djavax.net.ssl.trustStorePassword=st0r3p@ss

Use the following URL to connect to the JMX agent:

service:jmx:rmi:///jndi/rmi://`<server_host>`:1099/jmxrmi