Linux Install Using the RPM Package

This page describes how to install the Machine Agent on Linux systems that support the RPM Package Manager:

  • CentOS
  • RHEL
  • Fedora
  • openSUSE
  • SUSE Linux Enterprise Server

  • AARCH

For Linux systems that do not support RPM, use the JRE Bundled Zip Archive.

The RPM installer makes these changes to the host machine:

  • Creates an appdynamics group and an appdynamics user
  • Assigns ownership of certain files in the machine-agent directory to the appdynamics user

These changes are necessary to enable non-root users to configure and run an RPM-installed agent. To use a different user or group for the machine agent service, set the MACHINE_AGENT_USER and MACHINE_AGENT_GROUP environment variables in a shell for RPM installation.

CODE
sudo MACHINE_AGENT_USER=myuser MACHINE_AGENT_GROUP=mygroup rpm -ivh appdynamics-machine-agent.rpm

If the specified user or group does not exist, an error message appears and the RPM installation stops. To continue, you must define users and groups.If this is an issue in your environment, then you install the agent using the ZIP archive (see Linux Install Using ZIP with Bundled JRE).

Linux RPM Management (Combined Agent)

Starting from 26.3.0, the RPM package for the AppDynamics Machine Agent includes the Splunk OTel Collector. Unlike other installation methods, the Linux RPM deployment treats the Machine Agent and the Splunk OTel Collector as independent systemd units. This allows you to manage each service separately based on your specific observability requirements.

This integration streamlines the setup for unified observability by deploying both the AppDynamics Machine Agent and the OTel Collector in a single workflow.

After the RPM installation is complete, you must configure both services independently to ensure they function correctly:

Machine Agent:
  • Configuration: Edit the controller information file located at /etc/appdynamics/machine-agent/controller-info.xml .
  • Service Management: Start the agent using the command: systemctl start appdynamics-machine-agent.
  • User Configuration: If you need to change the user under which the agent runs, edit /etc/sysconfig/appdynamics-machine-agent.
Splunk OTel Collector:
  • Configuration: /etc/appdynamics/machine-agent/otel/agent_config.yaml. For For Pipeline Configuration, customize the OTel Collector pipeline by editing /opt/appdynamics/machine-agent/conf/otel/agent_config.yaml or /etc/appdynamics/machine-agent/otel/agent_config.yaml
  • Service Management: Start the collector using the command: systemctl start splunk-otel-collector.
  • User Configuration: Configure your required credentials in the file located at /etc/sysconfig/splunk-otel-collector.

Deployment Modes

You can choose from the following three deployment modes by managing the respective services:

Machine Agent (MA) only)
  • Start only the Machine Agent service: systemctl start appdynamics-machine-agent
  • Do not configure or start the splunk-otel-collector service.
Combined (Dual Signal) Mode:
  • Start both services:
    • systemctl start appdynamics-machine-agent
    • systemctl start splunk-otel-collector
  • Configure your credentials in the file located at: /etc/sysconfig/splunk-otel-collector
OTel-only Mode:
  • Start only the OTel Collector service: systemctl start splunk-otel-collector
  • The Machine Agent service is not required and should not be started.
Warning: When deploying through RPM/systemd, the two services are managed independently. Do not set SPLUNK_OTEL_ENABLED=true within the Machine Agent's JAVA_OPTS (found in the Machine Agent service file). Setting this flag within the Machine Agent configuration causes the wrapper script to attempt to launch a second redundant OTel collector process, which results in a port conflict and prevent the services from starting correctly.

Install the Machine Agent

  1. Before installing, review Install the Machine Agent.
  2. Download and install the RPM Package. With administrative privileges, enter the following CLI code where <pkg-name.rpm> is the name of the package for your environment, such as appdynamics-machine-agent-<version>.x86_64.rpm.
    CODE
    sudo rpm -ivh <pkg-name.rpm>

    The agent files are installed in opt/appdynamics/machine-agent and the agent is added as a service.

  3. Gather your configuration details and configure the agent by editing the <machine_agent_home>/conf/controller-info.xml file or by adding system properties to the JVM startup script file. See Linux Install Using the RPM Package.
    1. (Required) Configure the Controller host name, port number, and account access key.
    2. (Optional) Review memory requirements. See Machine Agent Requirements and Supported Environments.
    3. (Optional) Configure the agent to use SSL. See Enable SSL for Machine Agent.
    4. (Optional) Configure the agent to use proxy settings. See Machine Agent Configuration Properties.
    5. (Required for Multi-Tenant Mode or SaaS installations) Configure the Agent Account Information. See Multi-Tenant Controller Accounts.
    6. (Optional) Determine if you need to specify an application name and tier name. See Machine Agent Installation Scenarios. If you are installing the Machine Agent on the same server with any Splunk AppDynamics app agent, do not specify application name and tier name.
  4. Start the Agent. You can start the agent as a service (requires sudo or root user) or from the command line. If systemd was detected during installation, you can use the systemctl command to start the agent service.
    • Using SysV: service appdynamics-machine-agent start
    • Using systemd: systemctl start appdynamics-machine-agent
    • From the Command Line: <machine_agent_home>/bin/machine-agent
    • From the Launcher: <machine_agent_home>/etc/init.d/appdynamics-machine-agent start

RPM Package Function

The RPM package manager installs the agent files to opt/appdynamics/machine-agent, creates symbolic links, sets environment variables, and adds the agent as a service.

/etc/init.d/appdynamics-machine-agent >> /opt/appdynamics/machine-agent/etc/init.d/appdynamics-machine-agent

This script provides these service commands:

  • Start: Starts the service, runs a script that starts the agent
  • Stop: Stops the service
  • Restart: Restarts the service
  • Status: Returns the status of the service.

For example: service appdynamics-machine-agent start

SysV -

CODE
/etc/sysconfig/appdynamics-machine-agent >> /opt/appdynamics/machine-agent/etc/sysconfig/appdynamics-machine-agent

This script sets up the environment variables:

  • MACHINE_AGENT_HOME=/opt/appdynamics/machine-agent: Specifies where the agent files are located.
  • JAVA_HOME=/opt/appdynamics/machine-agent/jre: Specifies the JRE the agent uses. We recommend that you use the RPM package installer that contains its own JRE. However, you can use a different JRE as long as it meets the JRE requirements.
  • MACHINE_AGENT_USER=root: Specifies the system user for starting the agent (default is root). We recommend that you create a non-root user to run the machine agent. The new user needs to have read-access to controller-info.xml and write access to the log file. See Permissions Required to Run the Machine Agent.

systemd: The environment variables are in the service file:

CODE
/etc/systemd/system/appdynamics-machine-agent.service >> /opt/appdynamics/machine-agent/etc/systemd/system/appdynamics-machine-agent.service
Note: "MACHINE_AGENT_USER" variable doesn't exist in the systemd service file. The variable is just User.

Sets up a link to the controller-info.xml file containing the properties for agent-to-controller communication.

CODE
/etc/appdynamics/machine-agent/controller-info.xml >> /opt/appdynamics/machine-agent/conf/controller-info.xml

Logging Configuration

The log4j.xml file controls the detail of information logged by the agent. By default, the logging level is set to info

CODE
/etc/appdynamics/machine-agent/logging/log4j.xml >> /opt/appdynamics/machine-agent/conf/logging/log4j.xml

Adds the Agent as a Service

After the package is installed, the appdynamics-machine-agent runs opt/appdynamics/machine-agent/bin/postInstall.sh to add the agent to the services. The installer either copies the SysV script to add the service or, if systemd is detected, the installer copies the agent unit file /etc/systemd/system/appdynamics-machine-agent.service and adds the agent to the services using this unit file.

Installs a systemd Unit File for the Agent Service

If systemcd is detected on the system when you install the RPM package or run the postinstall.sh script, the systemd unit file for the agent service is copied to the following location: /etc/systemd/system/appdynamics-machine-agent.service

ExecStart: This option in the systemd service file points to a script that starts the agent as a daemon. If you did not install the Machine Agent in /opt/appdynamics/machine-agent, then change the path to <machine-agent-home>/scripts/machine-agent-daemon. If you did not edit the path, then it points to the correct place by default.

You can start and stop the agent service using the relevant systemctl commands. For information on all systemctl commands, see the systemctlman pages.

Command Format

start

stop

status

restart

systemctl <command> appdynamics-machine-agent.service

disable

enable

(Use the full path)

systemctl <command> /etc/systemd/system/appdynamics-machine-agent.service