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).

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

Linux RPM management for the Combined Agent on systemd

Install and manage the Machine Agent and the bundled OpenTelemetry Collector on Linux systems that use RPM and systemd.

This procedure applies to RPM installations that use systemd. The bundled collector is not an independently managed RPM service on SysV installations. Do not apply the collector service commands or deployment-mode guidance in this task to SysV installations.

Starting with Machine Agent 26.3.0, supported RPM packages include the Splunk Distribution of the OpenTelemetry Collector. On RPM installations that use systemd, the Machine Agent and collector run as independent services:

  • appdynamics-machine-agent.service

  • splunk-otel-collector.service

Starting with Machine Agent 26.8.0, a fresh RPM installation installs and prepares the collector binary and service unit but leaves splunk-otel-collector.service disabled and inactive. Installing or starting the Machine Agent does not start the collector.

During an RPM upgrade, the installer preserves the existing collector service state. An enabled service remains enabled, a disabled service remains disabled, a running service is not stopped, and a stopped service is not started. The collector is not restarted automatically. Updated binaries and merged configuration take effect after an operator-approved restart.

By default, both services use the appdynamics account. MACHINE_AGENT_USER and MACHINE_AGENT_GROUP customize only the Machine Agent service. The packaged splunk-otel-collector.service continues to run as appdynamics.

Important:

For the supported Machine Agent RPM/systemd Dual signal workflow, use the default appdynamics account. A mixed-account configuration is not validated or supported.

  1. Configure the Machine Agent and collector independently.

    For the Machine Agent, edit <machine_agent_home>/conf/controller-info.xml or its RPM-installed link at /etc/appdynamics/machine-agent/controller-info.xml.

    For the OTel Collector, edit /etc/appdynamics/machine-agent/otel/agent_config.yaml and set its environment in /etc/sysconfig/splunk-otel-collector.

    The packaged links are:

    • /etc/appdynamics/machine-agent/otel/agent_config.yaml → /opt/appdynamics/machine-agent/conf/otel/agent_config.yaml

    • /etc/sysconfig/splunk-otel-collector → /opt/appdynamics/machine-agent/etc/sysconfig/splunk-otel-collector

    • /opt/appdynamics/machine-agent/etc/systemd/system/splunk-otel-collector.service → /etc/systemd/system/splunk-otel-collector.service

    Before starting the collector with the bundled default exporter configuration, set the required Splunk Observability Cloud credentials:

    SHELL
    SPLUNK_ACCESS_TOKEN=<access-token>
    SPLUNK_REALM=<realm>

    A custom exporter configuration can have different requirements. See Combined Agent for Infrastructure Visibility for configuration details.

    For RPM installations that use systemd, the collector does not read the account name from Machine Agent controller-info.xml. To add AppDynamics account resource context, also set:

    SHELL
    APPDYNAMICS_AGENT_ACCOUNT_NAME=<account-name>

    APPDYNAMICS_AGENT_ACCOUNT_NAME supplies resource context; it is not a credential required to start the collector. The bundled configuration sets deployment.environment.name and appd.account.name from this value. Setting DEPLOYMENT_ENVIRONMENT does not change deployment.environment.name in the bundled configuration.

  2. Manage the collector service.

    Start the collector for the current boot:

    SHELL
    sudo systemctl start splunk-otel-collector

    Enable the collector at boot and start it immediately:

    SHELL
    sudo systemctl enable --now splunk-otel-collector

    Check its status:

    SHELL
    sudo systemctl status splunk-otel-collector

    Stop the collector and disable boot-time startup:

    SHELL
    sudo systemctl disable --now splunk-otel-collector

    Restart an already-running collector after an approved configuration change:

    SHELL
    sudo systemctl restart splunk-otel-collector
  3. Select a deployment mode on systemd.

    For Machine Agent mode:

    SHELL
    sudo systemctl enable --now appdynamics-machine-agent
    sudo systemctl disable --now splunk-otel-collector

    For Dual signal mode:

    SHELL
    sudo systemctl enable --now appdynamics-machine-agent
    sudo systemctl enable --now splunk-otel-collector

    For OTel only mode:

    SHELL
    sudo systemctl disable --now appdynamics-machine-agent
    sudo systemctl enable --now splunk-otel-collector

    enable --now starts a service and enables it at boot. disable --now stops a service and disables boot-time startup.

    Verify the service state:

    SHELL
    systemctl is-enabled appdynamics-machine-agent splunk-otel-collector
    systemctl is-active appdynamics-machine-agent splunk-otel-collector
    Note:

    For RPM installations that use systemd, SPLUNK_OTEL_ENABLED=true, -Dsplunk.otel.enabled=true, <otel-enabled>true</otel-enabled>, SPLUNK_OTEL_ONLY=true, and -Dsplunk.otel.only=true do not enable or start the independent collector service. Manage both services explicitly with systemctl.

  4. Configure Docker process selection and PID-level metrics.

    Machine Agent makes Docker PID-level metrics opt in and starts enforcing the Docker individual-process selector in both the Docker API and cgroup collection paths.

    Control

    Environment variable

    JVM system property

    DockerMonitoring.yml setting

    Default

    Docker PID-level metrics

    APPDYNAMICS_DOCKER_PROCESS_METRICS_ENABLED

    appdynamics.docker.process.metrics.enabled

    processMonitorConfig.processLevelMetricsEnabled

    false

    Docker individual-process selector

    APPDYNAMICS_DOCKER_PROCESS_SELECTOR_REGEX

    appdynamics.docker.process.selector.regex

    processMonitorConfig.processSelectorRegex

    Packaged selector

    For each setting, precedence is environment variable, JVM system property, YAML setting, and then the default. Changes to DockerMonitoring.yml normally reload without a Machine Agent restart. Environment-variable and JVM-property changes require a restart.

    • containerMonitoringConfig.containerProcessSelectorRegex chooses which containers are monitored. Its Java regular expression must match an entire process command line; a container is selected when any process matches.

    • processMonitorConfig.processSelectorRegex chooses which individual processes inside a selected container contribute process metrics and metadata. It searches each full command line unless the expression is anchored with ^ and $.

    The packaged Docker selector excludes kernel-style command lines and direct executions whose executable is exactly sleep, curl, or sh, including path-qualified forms. Wrapper commands and similar executable names remain eligible.

    When process monitoring remains enabled, setting Docker PID-level metrics to false suppresses only PID-specific metric series. Process-class metrics and process metadata continue for eligible processes. A process excluded by the individual-process selector contributes no process-class metrics, PID-level metrics, or process metadata.

    To enable Docker PID-level metrics:

    YAML
    processMonitorConfig:
      processLevelMetricsEnabled: true

    Or use an environment variable and restart the Machine Agent:

    SHELL
    export APPDYNAMICS_DOCKER_PROCESS_METRICS_ENABLED=true
  5. Handle an empty application name.
    Note:

    Starting with Machine Agent 26.8.0, an empty or whitespace-only <application-name> value is treated as unspecified. The Machine Agent does not send a blank application name during registration.

  6. Configure host process-level metrics.

    The precedence for the host PID-level property is:

    1. APPDYNAMICS_MACHINE_AGENT_PROCESS_METRICS_ENABLED

    2. appdynamics.machine.agent.process.metrics.enabled

    3. <process-metrics-enabled> in controller-info.xml

    4. Default value false

    <process-metrics-enabled> is supported but is not present in the shipped templates. When XML configuration is used, add it under <controller-info> and restart the Machine Agent. Environment-variable and JVM-property changes also require a restart.

    Setting host PID-level metrics to false suppresses only PID-specific metric series. Process-class metrics and process metadata continue for eligible processes when process monitoring and Server Visibility remain enabled.

  7. Configure remediation log-path validation.

    Starting with Machine Agent 26.8.0, you can restrict the log paths that a remediation action can collect from a monitored host. The allowlist is configured locally on every target Machine Agent; the Controller does not distribute or synchronize it.

    Important:

    Validation is disabled by default for backward compatibility. While validation is disabled, action-configured log paths retain the previous unrestricted behavior and the allowlist has no effect. To restrict collection, explicitly enable validation, configure every required allowed root, and restart the Machine Agent.

    When validation is enabled:

    • No directory is allowed automatically, including the Machine Agent logs directory.

    • A requested path is collected only when it equals or is beneath an explicitly configured directory root.

    • If the allowlist is empty or contains no valid roots, all action-configured log paths are rejected.

    • Multiple requested paths are evaluated independently. An allowed path can still be collected when another path is rejected.

    • A rejected path is not compressed or uploaded. Its rejection does not fail an otherwise successful remediation action.

    • Machine Agent-generated remediation script output continues to be captured.

    The Machine Agent resolves requested paths and allowed roots to absolute real or canonical paths and uses path-aware containment. This rejects directory traversal, sibling-prefix matches, and symbolic-link escapes outside an allowed root.

  8. Configure remediation settings.

    Purpose

    controller-info.xml element

    JVM system property

    Environment variable

    Type

    Default

    Required

    Enable validation

    remediation-log-path-validation-enabled

    appdynamics.machine.agent.remediation.logPathValidation.enabled

    APPDYNAMICS_MACHINE_AGENT_REMEDIATION_LOG_PATH_VALIDATION_ENABLED

    Boolean

    false

    No

    Allowed directory roots

    remediation-log-path-allowlist

    appdynamics.machine.agent.remediation.logPath.allowlist

    APPDYNAMICS_MACHINE_AGENT_REMEDIATION_LOG_PATH_ALLOWLIST

    Comma-separated string

    Empty

    No; at least one valid root is operationally necessary when validation is enabled

    Configuration precedence is environment variable, JVM system property, and then controller-info.xml. Configure existing, accessible absolute directory roots. Use the narrowest roots required by your remediation actions.

    TEXT
    /opt/app/logs,/var/log/myapp

    On Windows:

    TEXT
    C:\App\logs,D:\Service\logs

    Configure the XML elements:

    XML
    <remediation-log-path-validation-enabled>true</remediation-log-path-validation-enabled>
    <remediation-log-path-allowlist>/opt/app/logs,/var/log/myapp</remediation-log-path-allowlist>

    Or supply JVM properties:

    SHELL
    -Dappdynamics.machine.agent.remediation.logPathValidation.enabled=true
    -Dappdynamics.machine.agent.remediation.logPath.allowlist=/opt/app/logs,/var/log/myapp

    Or configure environment variables:

    SHELL
    export APPDYNAMICS_MACHINE_AGENT_REMEDIATION_LOG_PATH_VALIDATION_ENABLED=true
    export APPDYNAMICS_MACHINE_AGENT_REMEDIATION_LOG_PATH_ALLOWLIST=/opt/app/logs,/var/log/myapp

    For PowerShell on Windows:

    POWERSHELL
    $env:APPDYNAMICS_MACHINE_AGENT_REMEDIATION_LOG_PATH_VALIDATION_ENABLED = "true"
    $env:APPDYNAMICS_MACHINE_AGENT_REMEDIATION_LOG_PATH_ALLOWLIST = "C:\App\logs,D:\Service\logs"

    Restart the Machine Agent after changing either setting.

  9. Enable remediation log-path restrictions safely after an upgrade.
    1. Identify every directory root used by existing remediation actions.

    2. Configure the narrowest required roots in the allowlist.

    3. Enable validation.

    4. Restart the Machine Agent.

    5. Run a remediation action and review the Machine Agent log for rejected paths or invalid allowlist entries.

    Enabling validation without a valid allowlist intentionally rejects every action-configured log path. Setting the allowlist without enabling validation does not restrict collection.

  10. Troubleshoot rejected paths.

    When validation rejects a path, the Machine Agent writes a warning containing the submitted path and rejection reason without logging file contents. The default log location is <machine_agent_home>/logs/machine-agent.log. The rejected path is not collected or uploaded, but other allowed paths and script output can still be archived.

    Configured roots must resolve to accessible directories. The Machine Agent ignores an invalid root with a warning and continues using other valid roots. If no valid root remains, every action-configured log path is rejected. A path that is authorized but not found retains the existing file-not-found behavior.

    In Absolute paths to log files, enter each log file that the action should collect. If validation is enabled, each path must resolve within a directory configured in the target Agent's local allowlist. Review the Machine Agent log for rejection details.

    Retain the existing requirement that remediation scripts be stored under <machine_agent_home>/local-scripts.

The Machine Agent and, when selected, the bundled OpenTelemetry Collector are configured as independent systemd services. Verify the service state and review the Machine Agent log after applying configuration changes or running remediation actions.