Download and Install the Infrastructure Agent on UNIX/Linux

apmsaas
Download the Infrastructure Agent
An agent package is a deployable set of agent binaries and configuration files in ZIP or TAR format. The Infrastructure Agent download package contains the Infrastructure Agent and the extensions that you can deploy to provide data about your infrastructure components. By default, the Infrastructure Agent contains the Agent Controller and is delivered as an agent extension. The Agent Controller manages agents running on the same host where the Agent Controller runs. You can add the Agent Controller extension to Java agents. During run time, the Agent Controller starts as a subprocess of the agent monitoring process.
The Infrastructure Agent download package enables you to deploy multiple infrastructure monitoring extensions at a time. Download as many agent packages for infrastructure monitoring as you need for comprehensive metric collection.
Steps to download Infrastructure Agent for Unix or Linux
The following procedure explains the steps to download only the Infrastructure Agent for Unix or Linux.
Follow these steps:
  1. Log in to
    DX SaaS
    .
  2. Open the
    DX Application Performance Management
    tile.
  3. In the left navigation, under
    Settings
    , click
    Agents
    .
  4. In the
    Settings Agent
    page, click
    Download Agent
    .
    The
    Select Agent to Download
    dialog opens with the agents that each operating system supports.
  5. Select UNIX/Linux as the operating system.
  6. In the
    Infrastructure
    tab, click
    Infrastructure Agent
    .
    The
    Configure Infrastructure Agent
    dialog opens with
    Agent Controller
    and
    Attribute Decorator
    selected.
    In this dialog, you can select any number of extensions to be downloaded. For some of the extensions, you can configure the properties and also save the configuration for future use. For more information, see the respective Agent Extension documentation.
  7. Click
    Download
    .
    The Infrastructure Agent is downloaded.
Prerequisites
The APM Infrastructure Agent has the following Memory Requirements:
  • The default minimum Java Heap Size is 256MB and the default maximum Java Heap Size is 512MB.
  • The memory requirements vary based on the extension that you configure.
  • You can are also provided with an option to customize the memory requirements. To modify the memory requirements while installing the APMIA, use the following:
    • Windows:
      APMIACtrl.bat install min_heap <size_in_mb> max_heap <size_in_mb>
    • Linux:
      ./APMIACtrl.sh install min_heap=<size_in_mb> max_heap=<size_in_mb>
  • If you want to increase the memory size post-installation of the Infrastructure agent, perform
    one
    of the following methods:
    For Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP), the recommended minimum and maximum heap size is
    4GB
    .
    • Method 1: Set the Heap Size in wapper.conf file
      • Navigate to
        apmia/conf/wrapper.conf
        folder.
      • Set the heap size for the following properties:
        • # Initial Java Heap Size (in MB)
          wrapper.java.initmemory=<value of the heap size>
        • # Maximum Java Heap Size (in MB)
          wrapper.java.maxmemory=<value of the heap size>
      Method 2: Set the Heap Size during Restart of Infrastructure Agent
      • To set the heap size during the restart of Infrastructure Agent, run the following command:
        • Windows:
          APMIACtrl.bat restart min_heap <size_in_mb> max_heap <size_in_mb>
          For example,
          APMIACtrl.bat restart min_heap=4096 max_heap=8192
        • Linux:
          ./APMIACtrl.sh restart min_heap=<size_in_mb> max_heap=<size_in_mb>
          For example,
          ./APMIACtrl.sh restart min_heap=4096 max_heap=8192
      The heap size set using the restart command is not persistent for the instance. The size must be provided every time you run the restart command.
      For more information about the sizing guide, contact Broadcom Support.
Install the Infrastructure Agent
You can install the Infrastructure Agent on UNIX/Linux operating systems in three ways:
  • Install as a root user or user with sudo access
  • Start as a non-root user without sudo permission
  • Install as a root user and assign the APMIA service to a non-root user
The Infrastructure Agent performs the necessary tasks to install and create a service.
Install as a root user or user with sudo access
To install as root user with sudo access, perform the following steps:
  1. Navigate to the directory where the Infrastructure Agent is downloaded.
  2. Extract the downloaded file.
  3. Navigate to the
    apmia
    directory.
  4. Execute the script to install the agent. For other commands for a root user and a non-root user with
    sudo
    permissions, see the table in this section.
    ./APMIACtrl.sh install
The installation takes a few minutes and a message is displayed when the installation is successful.
The following table lists all the commands for a
root user
and a
non-root user with sudo
permissions:
Task
Root User
Non-Root User with Sudo Permissions
Install Infrastructure Agent
./APMIACtrl.sh install
sudo ./APMIACtrl.sh install
Uninstall Infrastructure Agent
./APMIACtrl.sh uninstall
sudo ./APMIACtrl.sh uninstall
Start the Infrastructure Agent
./APMIACtrl.sh start
sudo ./APMIACtrl.sh start
sudo systemctl start apmia
Stop Infrastructure Agent
./APMIACtrl.sh stop
sudo ./APMIACtrl.sh stop
sudo systemctl stop apmia
Restart Infrastructure Agent
./APMIACtrl.sh restart
sudo ./APMIACtrl.sh restart
sudo systemctl restart apmia
Check Infrastructure Agent Status
./APMIACtrl.sh status
sudo ./APMIACtrl.sh status
sudo systemctl status apmia
Console Start Infrastructure Agent
Runs the Infrastructure Agent without installing it.
console_start
starts the Infrastructure Agent.
When the Infrastructure Agent is started using
console_start
, the agent does not restart after reboot.
./APMIACtrl.sh console_start
sudo ./APMIACtrl.sh console_start
Console Stop Infrastructure Agent
Stops the Infrastructure Agent instance that was initiated by
console_start
.
Ctrl+c or console_stop
If you are stopping the Infrastructure Agent instance using the terminal, use
console_stop
option.
Ctrl+c or ./APMIACtrl.sh console_stop
You need the
root access
as the Infrastructure Agent is based on Java Service wrapper (Tanuki requires root access) that facilitates the installation of the Infrastructure Agent as a Linux daemon process. In addition, root access is required by the OS-based service manager to manage the APMIA service.
  • All the commands in the above table (
    install/uninstall/start/stop/restart
    ) creates the respective APMIA service, except for
    console_start
    and
    console_stop
    .
  • If you are running the Infrastructure Agent as
    nohup
    , then you can stop the Infrastructure Agent by running
    console_stop
    command
  • After installation, the you can also use generic
    systemd
    commands to manage APMIA operations (
    start/stop/status/restart
    ). For example,
    • sudo systemctl start apmia
    • sudo systemctl stop apmia
    • sudo systemctl restart apmia
    • sudo systemctl status apmia
Start as a non-root user without sudo permission
If you are a non-root user who does not have the required sudo permissions, you can still use
console_start
and
console_stop
commands to run and stop the agent respectively.
Task
Root User
Console Start Infrastructure Agent
Runs the Infrastructure Agent without installing it.
console_start
starts the Infrastructure Agent.
When the Infrastructure Agent is started using
console_start
, the agent does not restart after reboot.
./APMIACtrl.sh console_start
Console Stop Infrastructure Agent
Stops the Infrastructure Agent instance that was initiated by
console_start
.
Ctrl+c or console_stop
If you are stopping the Infrastructure Agent instance using the terminal, use
console_stop
option.
  • If you want to start
    apmia
    in the background instead of the foreground, you can do that by using
    nohup,
    as the
    apmia
    keeps running even after the current shell or terminal exits.
  • If you are running the Infrastructure Agent as
    nohup
    , then you can stop the Infrastructure Agent by running
    console_stop
    command
Install as a Root User and Assign the APMIA service to a Non-Root User
In this process, the root user installs the APM Infrastructure Agent and assigns its service to a non-root user. However, you still need the root privileges to manage the service (
start/stop/restart/uninstall/status check
). To install as a root user and assign the APMIA service to a non-root user, perform the following steps:
Before you begin the installation, ensure that APMIA is installed in a different location from the
/root
location. For example, say
/home
location.
  1. You need to add a
    new user
    for the APM Infrastructure Agent. For example, you can use the following command to add a new user:
    sudo useradd iauser
    Where
    iauser
    is the name of the user.
  2. Navigate to the parent directory of your
    apmia
    .
  3. Grant
    ownership/access
    of the parent directory to the new user. For example,
    'chown -R iauser apmia'
  4. Execute the script to install the Infrastructure Agent, and then run the service for this user. For example,
    ./APMIACtrl.sh install user=iauser
The installation takes a few minutes and a message is displayed when the installation is successful.
Log Files
The
apmia directory
includes the following log files:
  • APMIA_install.log
    : This file includes the details of the installation.
The
apmia/logs
directory includes the following log files:
  • APMIAgentConsole.log
  • AutoProbe
  • IntroscopeAgent
  • APMIAWrapper.log