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.
The axon-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.
Update the following lines within /etc/axonops/axon-agent.yml.
The highlighted lines should match the host and org keys found within
/etc/axonops/axon-server.yml.
axon-server:
hosts: "axon-server_endpoint"# Your axon-server IP or hostname, e.g. axonops.mycompany.com
port: 1888# The default axon-server port is 1888
axon-agent:
org: "my-company"# Your organisation name
# SSL/TLS Settings from AxonOps Agent to AxonOps Server
tls:
mode: "disabled"# disabled, TLS, mTLS
# Only set below if mode is TLS or mTLS
skipVerify: false# Disables CA and Hostname verification
caFile: "path_to_certs_on_axon_agent_node.crt"# required if skipVerify is not set and you are using a self-signed cert
certFile: "path_to_certs_on_axon_agent_node.crt"# only set if mode is mTLS
keyFile: "path_to_key_file_on_axon_agent_node.key"# only set if mode is mTLS
# Command execution restrictions (see below for details)
# disable_command_exec: false
# scripts_location: /var/lib/axonops/scripts/
NTP:
host: "ntp.mycompany.com"# Your NTP server IP address or hostname
The mode setting in the tls block under axon-agent must be one of disabled,
TLS or mTLS:
disabled: no encryption. No certificate settings apply.
TLS: the agent verifies the axon-server certificate and does not present a
client certificate. The agent needs no certFile or keyFile.
mTLS (mutual TLS): the agent verifies the axon-server certificate and must
present a client certificate, configured with certFile and keyFile.
axon-server in mTLS mode does not accept an agent without one. The agent
certificate must be signed by the same certificate authority (CA) as the server
certificate.
Agents that connect to AxonOps Cloud must use TLS mode with an agent key. mTLS
is not available for AxonOps Cloud connections.
The axon-agent can execute commands on the host system to perform operations such as repairs, backups, and restarts. These options allow configuration of the command execution security posture based on organisational requirements:
Option
Default
Description
disable_command_exec
false
When set to true, the agent only executes scripts located in the scripts_location directory.
scripts_location
/var/lib/axonops/scripts/
The directory containing permitted scripts when disable_command_exec is enabled.
Three command execution modes are available:
Mode
Configuration
Description
Full access
disable_command_exec: false
The agent can execute commands sent from AxonOps. This is the default.
Permitted scripts only
disable_command_exec: true with scripts in scripts_location
The agent only executes scripts placed in the designated directory.
No execution
disable_command_exec: true with empty scripts_location
The agent cannot execute any commands.
Permitted Scripts Only
axon-agent:
org: "my-company"
disable_command_exec: true
scripts_location: /var/lib/axonops/scripts/
With this configuration, only scripts placed in /var/lib/axonops/scripts/ can be executed by the agent.
Add the following at the end of /etc/cassandra/cassandra-env.sh, replacing any existing line that loads
the AxonOps agent, so the agent is not loaded twice:
# Please note the period (.) at the beginning of the line.
. /usr/share/axonops/axonops-jvm.options
# Please note the period (.) at the beginning of the line.
. /usr/share/axonops/axonops-jvm.options
# Please note the period (.) at the beginning of the line.
. /usr/share/axonops/axonops-jvm.options
# Please note the period (.) at the beginning of the line.
. /usr/share/axonops/axonops-jvm.options
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. On Cassandra 4.1, 4.0 and 3.11, axonops-jvm.options is included in the AxonOps Cassandra Agent
package from version 1.1.0. If the file is missing, Cassandra does not start and nodetool commands fail.
On a node that already runs the agent, upgrade the agent package to 1.1.0 or later before replacing its
JVM_OPTS="$JVM_OPTS -javaagent:..." line, and restore that line before downgrading the agent package
below 1.1.0.
NB. Make sure this configuration is not overridden by automation tools.
Adding the axonops user to the cassandra user group.
Adding the cassandra user to the axonops user group.
Terminal window
CASSANDRA_GROUP=cassandra
CASSANDRA_USER=cassandra
sudousermod-aG"$CASSANDRA_GROUP"axonops
sudousermod-aGaxonops"$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.
The AxonOps Kafka Agent is the jar that is directly loaded by Kafka.
The AxonOps Kafka Agent then reaches out directly to the AxonOps Agent binary
which contacts the AxonOps Server directly.
The AxonOps Agent is a dependency of the AxonOps Kafka Agent. This binary
contacts the AxonOps Server directly while minimizing the memory footprint
and CPU utilization of the Kafka process.
NB. Make sure that this configuration will not get overridden by an automation tool.
Add axonops user to Kafka user group and Kafka user to axonops group
Terminal window
sudousermod-aG"$KAFKA_GROUP"axonops
sudousermod-aGaxonops"$KAFKA_USER"
Start/Restart Kafka
To load the AxonOps Java Agent and Kafka config changes please either start the Kafka service if stopped restart the Kafka service if already running.
Terminal window
<Kafka_Home>/bin/kafka-server-stop.sh
<Kafka_Home>/bin/kafka-server-start.sh
Add axonops user to Zookeeper user group and Zookeeper user to axonops group
Terminal window
sudousermod-aG"$ZOOKEEPER_GROUP"axonops
sudousermod-aGaxonops"$ZOOKEEPER_USER"
Start/Restart Zookeeper
To load the AxonOps Java Agent and Zookeeper config changes please either start the Zookeeper service if stopped or restart the Zookeeper service if already running.
Terminal window
<Zookeeper_Home>/bin/zookeeper-server-stop.sh
<Zookeeper_Home>/bin/zookeeper-server-start.sh
Add axonops user to KRaft Broker user group and KRaft Broker user to axonops group
Terminal window
sudousermod-aG"$KRAFT_GROUP"axonops
sudousermod-aGaxonops"$KRAFT_USER"
Start/Restart KRaft Broker
To load the AxonOps Java Agent and Kafka KRaft config changes please either start the Kafka KRaft service if stopped or restart the Kafka KRaft service if already running.
Terminal window
<Kafka_Home>/bin/kafka-server-stop.sh
<Kafka_Home>/bin/kafka-server-start.sh
Add axonops user to KRaft Controller user group and KRaft Controller user to axonops group
Terminal window
sudousermod-aG"$KRAFT_GROUP"axonops
sudousermod-aGaxonops"$KRAFT_USER"
Start/Restart KRaft Controller
To load the AxonOps Java Agent and Kafka KRaft config changes please either start the Kafka KRaft service if stopped or restart the Kafka KRaft service if already running.
Terminal window
<Kafka_Home>/bin/kafka-server-stop.sh
<Kafka_Home>/bin/kafka-server-start.sh
Add axonops user to Kafka Connect user group and Kafka Connect user to axonops group
Terminal window
sudousermod-aG"$CONNECT_GROUP"axonops
sudousermod-aGaxonops"$CONNECT_USER"
Start/Restart Kafka Connect
To load the AxonOps Java Agent and Kafka Connect config changes please either:
Start the Kafka Connect service if stopped.
Restart the Kafka Connect service if already running.
Terminal window
<Kafka_Home>/bin/kafka-server-stop.sh
<Kafka_Home>/bin/connect-distributed.sh
The mode setting in the tls block under axon-agent must be one of disabled,
TLS or mTLS:
disabled: no encryption. No certificate settings apply.
TLS: the agent verifies the axon-server certificate and does not present a
client certificate. The agent needs no certFile or keyFile.
mTLS (mutual TLS): the agent verifies the axon-server certificate and must
present a client certificate, configured with certFile and keyFile.
axon-server in mTLS mode does not accept an agent without one. The agent
certificate must be signed by the same certificate authority (CA) as the server
certificate.
Agents that connect to AxonOps Cloud must use TLS mode with an agent key. mTLS
is not available for AxonOps Cloud connections.
Streaming Kafka topic messages from the AxonOps dashboard requires a kafka_stream_server block in /etc/axonops/axon-agent.yml on at least one node. The stream server is disabled by default and is not part of the configuration above. See Set up the Kafka Message Stream Viewer.
axon-agent maintains a persistent disk-backed queue at /var/lib/axonops/mq/ that buffers all outbound metrics, logs, and events whenever the connection to AxonOps is interrupted — whether due to axon-server downtime, a network disruption between the agent host and AxonOps Cloud, or any other connectivity loss. The queue survives agent restarts and is bounded only by available disk space on the agent host. When connectivity is restored, the agent drains the queue and resumes normal delivery automatically. No data is lost and no manual intervention is required.
Two queue size limits govern the maximum buffered data volume for each direction of the agent connection. Both are configured in axon-server.yml: