Installing ActiveMQ

Prerequisites

  • For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
  • URL/IP of the SixthSense collector (your tenant URL which will be provided by Customer Support).
  • Access token from the SixthSense portal.
  • SixthSense JMX Agent. (Requires JRE 1.8 and above)
  • JMX host and port details of ActiveMQ Artemis.

Enabling ActiveMQ Monitoring

SixthSense agent will remotely monitor ActiveMQ. The agent will run as a separate process and will connect to the JMX port exposed by ActiveMQ for fetching the metrics. The following procedure helps you enable ActiveMQ monitoring.

  1. Enabling remote JMX support in ActiveMQ through environment variables/JVM args. For more information, see Enabling JMX support in ActiveMQ.
  2. (Optional) Enabling authentication on the port exposed by ActiveMQ for JMX remote monitoring. For more information, see Enabling authentication on port exposed.
  3. Download the SixthSense Agent. For more information, see Downloading the agent
  4. Configure and run the SixthSense Agent. For more information, see Configuring the agent.

Enabling JMX support in ActiveMQ

JMX remote support can be enable through environment variable or JVM args:

Pass “sun.management.jmxremote” as true in order to enable JMX remote support. Given below are the other mandatory jvm arguments for configuring JMX remote. These JVM arguments will be picked by artemis after restart.

Arguments

DEBUG_ARGS="-Dcom.sun.management.jmxremote=true \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=127.0.0.1 \
-Dcom.sun.management.jmxremote.port=9010"
note

This will enable JMX support in non-authentication mode. Please refer to the following section for enabling authentication on this port.

  • Set “java.rmi.server.hostname” to the IP address of the node/host.

Enabling Authentication on port exposed

This will be done by Java-provided local JMX authentication method, which stores credentials and controls access using a local file

  • Create a new folder called jmxremote
> mkdir -vp /etc/jmxremote
  • Create two files in this directory

    • password
    • access
  • The password file has the credentials that the JMX agent will check during client authentication.

> cat /etc/jmxremote/jmxremote.password
sixthsense R@kuten@1234
info

Here the file content is registering the user "sixthsense" with password "R@kuten@1234"

  • The access file has authorization information that is who is allowed to do what.
> cat jmxremote/jmxremote.access
sixthsense readwrite
  • Change the permissions on both files so that only owner can edit and view them.
> chmod -R 600 /etc/jmxremote/jmxremote.*

Add the following sun.management.jmxremote.authenticate=true, com.sun.management.jmxremote.access.file=/etc/jmxremote/jmxremote.acces”s
com.sun.management.jmxremote.password.file=/etc/jmxremote/jmxremote.password” in JVM_ARGS.

It should look like the following:

DEBUG_ARGS="-Dcom.sun.management.jmxremote=true \
-Dcom.sun.management.jmxremote.authenticate=true \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=127.0.0.1 \
-Dcom.sun.management.jmxremote.port=9010 "\
-Dcom.sun.management.jmxremote.access.file=/etc/jmxremote/jmxremote.access \
-Dcom.sun.management.jmxremote.password.file=/etc/jmxremote/jmxremote.password"

Downloading Agent

Prerequisites

  • Private Token from the onboarding team.
  • Link to download a specific version.

To download the agent, perform the following procedure.

  1. Ensure there is ingress from the internet/ from the SixthSense enabled.
  2. Download the agent using curl.
curl --header "PRIVATE-TOKEN: <TOKEN> " --output sixthsense-activemq -agent.zip https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/32/packages/generic/ActiveMQ-Agent/latest/ActiveMQ-Agent.zip

Configuring the agent

  1. Unzip the downloaded Agent.
  2. Navigate to agent.config file i.e. Agent folder/config/agent.config file.The agent can be configured by adding the information in agent.config file.

In the agent.config file below, brokers JMX host and port details must be updated.

brokerConfigs:
- brokerUrl: ${SS_BROKER1_URL:localhost}
brokerPort: ${SS_BROKER1_PORT:1100}
username: ${SS_BROKER1_USERNAME:sixthsense}
password: ${SS_BROKER1_PASSWORD:R@kuten@1234}
- brokerUrl: ${SS_BROKER2_URL:localhost}
brokerPort: ${SS_BROKER2_PORT:1200}
username: ${SS_BROKER2_USERNAME:sixthsense}
password: ${SS_BROKER2_PASSWORD:R@kuten@1234}

In the agent.config file below, agent general configuration must be updated.

agentConfig:
serviceName: ${SS_SERVICE_NAME:Artemis}
collectorBackendService: ${SS_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:11800}
agentAuthentication: ${SD_AGENT_AUTHENTICATION: <add token here>}
agentForceTls: ${SD_AGENT_FORCE_TLS:true}
logFileName: ${SS_LOGGING_FILE_NAME:sixthsense-api.log}
logLevel: ${SS_LOGGING_LEVEL:INFO}
# Logging max_file_size, default: 5 * 1024 * 1024 = 5242880 // 5 MB
logMaxFileSize: ${SW_LOGGING_MAX_FILE_SIZE:5242880}

For OneCloud Platform, use the following command:

agentConfig:
serviceName: ${SS_SERVICE_NAME:Artemis}
collectorBackendService: ${SS_AGENT_COLLECTOR_BACKEND_SERVICES:133.237.176.44:80}
# For connectivity to backend using onecloud private network: 100.99.116.221:80
# For connectivity to backend using intra public network: 133.237.176.44:80
agentAuthentication: ${SD_AGENT_AUTHENTICATION: <add token here>}
agentForceTls: false
logFileName: ${SS_LOGGING_FILE_NAME:sixthsense-api.log}
logLevel: ${SS_LOGGING_LEVEL:INFO}
# Logging max_file_size, default: 5 * 1024 * 1024 = 5242880 // 5 MB
logMaxFileSize: ${SW_LOGGING_MAX_FILE_SIZE:5242880}
info

The agent will override the values of these configs if set through environment variables.

Running the Agent

The Agent will run as a separate process and will connect to port exposed by ActiveMQ artemis. Use the following command to run the agent.

> java -jar sixthsense-jmx-agent.jar