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.

マシンエージェントのインストール

  1. インストールする前に、「マシンエージェントのインストール」を確認してください。
  2. RPM パッケージをダウンロードしてインストールします。管理者権限を使用して、次の CLI コードを入力します。ここで、<pkg-name.rpm>appdynamics-machine-agent-<version>.x86_64.rpm などの環境に適したパッケージの名前です。
    CODE
    sudo rpm -ivh <pkg-name.rpm>

    エージェントファイルが opt/appdynamics/machine-agent にインストールされ、エージェントがサービスとして追加されます。

  3. 設定の詳細を収集し、<machine_agent_home>/conf/controller-info.xml ファイルを編集するか、JVM 起動スクリプトファイルにシステムプロパティを追加してエージェントを設定します。「RPM パッケージを使用した Linux へのインストール」を参照してください。
    1. (必須)コントローラのホスト名、ポート番号、およびアカウントアクセスキーを設定します。
    2. オプション)メモリ要件を確認します。「マシンエージェントの要件とサポートされる環境」を参照してください。
    3. (オプション)SSL を使用するようにエージェントを設定します。「マシンエージェントの SSL の有効化」を参照してください。
    4. (オプション)プロキシ設定を使用するようにエージェントを設定します。「マシンエージェントの設定プロパティ」を参照してください。
    5. マルチテナントモードまたは SaaS インストールの場合に必須)エージェントアカウント情報を設定します。「マルチテナント コントローラ アカウント」を参照してください。
    6. (オプション)アプリケーション名と階層名を指定する必要があるかどうかを決定します。「マシンエージェントのインストールのシナリオ」を参照してください。すべての Splunk AppDynamics アプリケーション エージェントと同じサーバーにマシンエージェントをインストールする場合は、アプリケーション名と階層名を指定しないでください。
  4. エージェントを起動します。エージェントをサービスとして起動すること(sudo または root ユーザーが必要)、またはコマンドラインから起動することができます。インストール中に systemd が検出された場合は、systemctl コマンドを使用してエージェントサービスを起動できます。
    • SysV を使用:service appdynamics-machine-agent start
    • systemd を使用:systemctl start appdynamics-machine-agent
    • コマンドラインから:<machine_agent_home>/bin/machine-agent
    • ランチャーから:<machine_agent_home>/etc/init.d/appdynamics-machine-agent start

RPM パッケージ機能

RPM パッケージマネージャは、エージェントファイルを opt/appdynamics/machine-agent にインストールし、シンボリックリンクを作成し、環境変数を設定し、エージェントをサービスとして追加します。

SysV サービススクリプトのリンク

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

このスクリプトには、次のサービスコマンドが用意されています。

  • Start:サービスを開始し、エージェントを起動するスクリプトを実行します。
  • Stop:サービスを停止します。
  • Restart:サービスを再起動します。
  • Status:サービスのステータスを返します。

例: service appdynamics-machine-agent start

環境変数のリンク

SysV:

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

このスクリプトは、環境変数を設定します。

  • MACHINE_AGENT_HOME=/opt/appdynamics/machine-agent:エージェントファイルが配置されている場所を指定します。
  • JAVA_HOME=/opt/appdynamics/machine-agent/jre:エージェントが使用する JRE を指定します。独自の JRE を含む RPM パッケージインストーラを使用することを推奨しています。ただし、JRE の要件を満たしている限り、別の JRE を使用できます。
  • MACHINE_AGENT_USER=root:エージェントを起動するためのシステムユーザーを指定します(デフォルトは root)。マシンエージェントを実行するための非ルートユーザーを作成することを推奨します。新しいユーザには、controller-info.xml の読み取りアクセス権とログファイルへの書き込みアクセス権が必要です。「マシンエージェントを実行するために必要な権限」を参照してください。

systemd:環境変数は次のサービスファイルにあります。

CODE
/etc/systemd/system/appdynamics-machine-agent.service >> /opt/appdynamics/machine-agent/etc/systemd/system/appdynamics-machine-agent.service
注: 「MACHINE_AGENT_USER」変数は systemd サービスファイルにはありません。変数は User だけです。

エージェントからコントローラへの通信のリンク

エージェントからコントローラへの通信のプロパティを含む controller-info.xml ファイルへのリンクを設定します。

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

ロギングの設定

log4j.xml ファイルは、エージェントによってログに記録される情報の詳細を制御します。デフォルトでは、ログレベルは info に設定されます。

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

エージェントをサービスとして追加する

パッケージがインストールされた後、appdynamics-machine-agent によって opt/appdynamics/machine-agent/bin/postInstall.sh が実行され、エージェントがサービスに追加されます。インストーラは、SysV スクリプトをコピーしてサービスを追加します。または、systemd が検出された場合は、インストーラはエージェント ユニット ファイルの /etc/systemd/system/appdynamics-machine-agent.service をコピーし、このユニットファイルを使用してエージェントをサービスに追加します。

エージェントサービスの systemd ユニットファイルをインストールする

RPM パッケージをインストールするとき、または postinstall.sh スクリプトを実行するときにシステムで systemcd が検出された場合、エージェントサービスの systemd ユニットファイルが次の場所にコピーされます。/etc/systemd/system/appdynamics-machine-agent.service

ExecStart:systemd サービスファイルのこのオプションは、エージェントをデーモンとして起動するスクリプトを指します。マシンエージェントを /opt/appdynamics/machine-agent, にインストールしていない場合は、パスを <machine-agent-home>/scripts/machine-agent-daemon に変更します。パスを編集していない場合は、デフォルトで正しい場所を指しています。

関連する systemctl コマンドを使用して、エージェントサービスを開始および停止できます。すべての systemctl コマンドの詳細については、systemctl の man ページを参照してください。

コマンド 形式

起動

停止

status

再起動

systemctl <command> appdynamics-machine-agent.service

disable

イネーブル化

(フルパスを使用)

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