Agent Setup Cassandra
Install Cassandra Agent
Select the Cassandra Version¶
Select the Java Version¶
Install the AxonOps Cassandra Agent and its dependency axon-agent:
sudo apt-get install axon-cassandra3.0-agent
Configuration File Locations¶
AxonOps Cassandra Agent¶
The AxonOps Cassandra Agent is the jar that is directly loaded by Cassandra. The AxonOps Cassandra Agent then reaches out directly to the AxonOps Agent binary which contacts the AxonOps Server directly.
- Configuration File:
/etc/axonops/axon-agent.yml - Binary:
/usr/share/axonops/axon-cassandra{version}-agent.jar - Version number:
/usr/share/axonops/axon-cassandra{version}-agent.version - Copyright:
/usr/share/doc/axonops/axon-cassandra{version}-agent/copyright - Licenses:
/usr/share/axonops/licenses/axon-cassandra{version}-agent/
AxonOps Agent¶
The AxonOps Agent is a dependency of the AxonOps Cassandra Agent. This binary contacts the AxonOps Server directly while minimizing the memory footprint and CPU utilization of the Cassandra process.
- Configuration File:
/etc/axonops/axon-agent.yml - Binary:
usr/share/axonops/axon-agent - Logs:
/var/log/axonops/axon-agent.log - Systemd service:
/usr/lib/systemd/system/axon-agent.service
Agent Configuration
Update the following highlighted lines from /etc/axonops/axon-agent.yml:
Please update the key and org values, they can be viewed by logging into console.axonops.cloud
- Organization (org) name is next to the logo in the console
- Agent Keys (key) found in Agent Setup
If there is a Dedicated NTP server in your Organization please uncomment and update the NTP section.
axon-server:
hosts: "agents.axonops.cloud"
axon-agent:
key: <THIS_IS_A_DUMMY_KEY_PLEASE_UPDATE>
org: <THIS_IS_A_DUMMY_ORG_NAME_PLEASE_UPDATE>
# Specify the NTP server IP addresses or hostnames configured for your Cassandra hosts
# if using Cassandra deployed in Kubernetes or if auto-detection fails.
# The port defaults to 123 if not specified.
# NTP:
# hosts:
# - "x.x.x.x:123"
# Optionally restrict which commands can be executed by axon-agent.
# If "true", only scripts placed in scripts_location can be executed by axon-agent.
# disable_command_exec: false
# If disable_command_exec is true then axon-agent is only allowed to execute scripts
# under this path
# scripts_location: /var/lib/axonops/scripts/
Set file permissions on /etc/axonops/axon-agent.yml file by executing the following command
sudo chmod 0640 /etc/axonops/axon-agent.yml
Configure Cassandra
Add the following line at the end of /etc/cassandra/cassandra-env.sh:
JVM_OPTS="$JVM_OPTS -javaagent:/usr/share/axonops/axon-cassandra3.0-agent.jar=/etc/axonops/axon-agent.yml"
If Cassandra was installed using a tarball, the correct path for the cassandra-env.sh
will be <Cassandra Installation Directory>/conf/cassandra-env.sh.
NB. Make sure this configuration is not overridden by automation tools.
Configure Cassandra user group¶
Configure the Linux user groups by:
- Adding the
axonopsuser to thecassandrauser group. - Adding the
cassandrauser to theaxonopsuser group.
CASSANDRA_GROUP=cassandra
CASSANDRA_USER=cassandra
sudo usermod -aG "$CASSANDRA_GROUP" axonops
sudo usermod -aG axonops "$CASSANDRA_USER"
If Cassandra was setup to use a non-default user or group,
CASSANDRA_GROUP and/or CASSANDRA_USER
will need be updated accordingly for the above commands to work properly.
Uninstall needrestart Package¶
Due to recent change with needrestart, as seen in Ubuntu 24.04, uninstalling the
needrestart package is currently recommended.
Failure to uninstall the needrestart package may cause the Cassandra service to be
restarted when updating the axon-agent package.
Start/Restart Cassandra
To load the AxonOps Java Agent and Cassandra config changes please,
- Start the Cassandra service if stopped.
- Restart the Cassandra service if already running.
