Installing agents as a non-root user

If you do not have root privileges and you want to install a monitoring agent, you can install the agent as a non-root user. Also, you can install the agent as a non-root user if you are a host administrator and you do not want to run the monitoring agent as a root user. Installation flow is the same as for a root user. After a non-root installation, run the UpdateAutoRun.sh script with root user or sudo user access.

Before you begin

To uniquely identify the computer system, the Linux® OS agent must identify the computer system board Universal Unique Identifier (UUID), manufacturer, model, and serial number. This information is required before the agent is added to an application in the Cloud APM console.
Obtain the computer system information by verifying the following entities exist on the computer system:
  1. Check whether the /usr/bin/hal-get-property command is installed on the computer system and the hald process (HAL daemon) is running. If the command is not installed, continue to step 2. If the command is installed, skip step 2 and step 3. Note: If the OS version is Red Hat 7, the hald process is not available.
  2. If the /usr/bin/hal-get-property command is not installed on the computer system, then confirm that the /sys/class/dmi/id/product_uuid file exists and contains the computer system UUID, and the user who installs the Linux OS agent has read access to this file. If this file does not exist, continue to step 3. If the file exists, skip step 3.
  3. If the /usr/bin/hal-get-property command is not installed and the /sys/class/dmi/id/product_uuid file does not exist, you must ensure that the hostname or hostnamectl commands return the fully qualified hostname. If these commands return the short hostname without the domain, you must set the fully qualified hostname by entering the"hostname <fqhn>" or "hostnamectl set-hostname <fqhn>" commands where <fqhn> must be replaced with the fully qualified hostname.
Note: The Linux OS agent retrieves this information periodically so the commands or files in the previous steps must remain in place even after installation.
Note: The Linux OS Agent does not support monitoring of Docker when running as non-root.

Procedure

  1. Install your monitoring agents on Linux or UNIX systems, as described in Installing agents on Linux systems and Installing agents on UNIX systems.
  2. Optional: If you installed your agent as a selected user and want to configure the agent as a different user, run the ./secure.sh script.
    For more information about the ./secure.sh script, see Configuring agents as a non-root user and Securing the agent installation files.
    For example: ./secure.sh -g db2iadm1
  3. Optional: Configure your monitoring agents on Linux or UNIX as necessary, see Configuring your environment.
  4. To update the system startup scripts, run the following script with root user or sudo user access: install_dir/bin/UpdateAutoRun.sh

What to do next

If you installed your agent as a non-root user and you want to configure the agent as the same user, no special action is required. If you installed your agent as a selected user and want to configure the agent as a different user, see Configuring agents as a non-root user.

If you installed and configured your agent as a non-root user and you want to start the agent as the same user, no special action is required. If you installed and configured your agent as a selected user and want to start the agent as a different user, see Starting agents as a non-root user.

Use the same user ID for agent installation and upgrades.

If you run the UpdateAutoRun.sh script as root user, the agent is configured to automatically start after the operating system restart. If you do not want this agent behavior, you can disable the automatic agent start. For more information, see Disabling automatic agent start on UNIX and Linux systems.