This shows an example of how to install an Amazon Linux agent. The example demonstrates how to install the agent using RPM package management. Follow the same steps to install the agent on other Linux platforms, using dpkg package management on Debian Linux for example.

An agent has the following features, which can be selectively enabled:

  • Automation Runbook automation, remote script execution, and custom script monitoring
  • PatchManagement Device patch scanning and installation
  • RemoteCommand Remote command execution
  • RemoteConsole Remote device access

By default, all features are enabled.

The agent download file name format is opsramp-agent_{version}_{osType}.{packageType} where

  • version OpsRamp Agent version
  • osType 32-bit or 64-bit
  • packageType installation package format.

For example,

opsramp-agent_8.0.0-1_x86_64.rpm

After the agent is installed, the agent automatically begins sending telemetry to OpsRamp.

The following sections describe several installation options:

Prerequisites

  • Processor: 1 GHz CPU or greater
  • Memory: 2 GB RAM
  • Disk Space: 200 MB

Download and install a root user agent

  1. From All Clients choose a client.

  2. In the Dashboard menu, navigate to Setup > Download > Agent.

  3. In the Amazon Linux tile or the tile for your Linux platform, click 32-bit or 64-bit for your operating system.

  4. Follow the dialog to download and save the agent installer.

  5. Install the agent:

    32 bit

        sudo rpm -i opsramp-agent_{version}_i386.rpm
        

    64 bit

        sudo rpm -i opsramp-agent_{version}_x86_64.rpm
        
  6. Start the agent with the authentication tokens generated for your organization, enabling the features you want.

    Click Instructions in the Amazon Linux tile to get the authentication tokens. The -K and -S argument values in the instructions are populated for your organization. The -M true argument is optional and enabling it enables auto-monitoring. Copy-and-paste the values into the command line.

    • Enable all features:
        sudo /opt/opsramp/agent/bin/configure -K {accessKey} -S {securityKey} -s client-name.api.opsramp.com -M true
        
    • Enable specific features:
        sudo /opt/opsramp/agent/bin/configure -K {accessKey} -S {securityKey} -s client-name.api.opsramp.com -M true -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
        

See the /tmp/opsramp-agent_install.log file for installation progress.

Download and install a default non-root user agent

The default, non-root agent installation automatically creates the default user.

  1. From All Clients choose a client.

  2. In the Dashboard menu, navigate to Setup > Download > Agent.

  3. In the Amazon Linux tile or the tile for your Linux platform, click 32-bit or 64-bit for your operating system.

  4. Download the 32-bit or 64-bit agent for your operating system using the download links on this page.

  5. Install the agent:

    32 bit

        sudo ISNONROOT=Y rpm -i opsramp-agent_{version}_i386.rpm
        

    64 bit

        sudo ISNONROOT=Y rpm -i opsramp-agent_{version}_x86_64.rpm
        
  6. Start the agent with the authentication tokens generated for your organization, enabling the features you want.

    Click Instructions in the Amazon Linux tile to get the authentication tokens. The -K and -S argument values in the instructions are populated for your organization. The -M true argument is optional and enabling it enables auto-monitoring. Copy-and-paste the values into the command line.

    • Enable all features:
        sudo /opt/opsramp/agent/bin/configure -K {accessKey} -S {securityKey} -s client-name.api.opsramp.com -M true 
        
    • Enable specific features:
        sudo /opt/opsramp/agent/bin/configure -K {accessKey} -S {securityKey} -s client-name.api.opsramp.com -M true -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
        

See the /tmp/opsramp-agent_install.log file for installation progress.

Download and install a non-root custom user agent

To install the agent as a custom user with non-root privilege, create a new user and group before installing the agent:

  1. Create a new user group:

        groupadd --system {username}
        
  2. Create a custom user:

        useradd -g {username} -d /opt/opsramp -m {username} -s /bin/sh --system
        
  3. Set the user password:

        echo {username}:{password} | chpasswd
        
  4. From All Clients choose a client.

  5. In the Dashboard menu, navigate to Setup > Download > Agent.

  6. In the Amazon Linux tile or the tile for your Linux platform, click 32-bit or 64-bit for your operating system.

  7. Download the 32-bit or 64-bit agent for your operating system using the download links on this page.

  8. Install the agent:

    32 bit

        sudo AGENTUSER={username} rpm -i opsramp-agent_{version}_i386.rpm
        

    64 bit

        sudo AGENTUSER={username} rpm -i opsramp-agent_{version}_x86_64.rpm
        
  9. Start the agent with the authentication tokens generated for your organization, enabling the features you want.

    Click Instructions in the Amazon Linux tile to get the authentication tokens. The -K and -S argument values in the instructions are populated for your organization. The -M true argument is optional and enabling it enables auto-monitoring. Copy-and-paste the values into the command line.

    • Enable all features:
        sudo /opt/opsramp/agent/bin/configure -K {accessKey} -S {securityKey} -s client-name.api.opsramp.com -M true
        
    • Enable specific features:
        sudo /opt/opsramp/agent/bin/configure -K {accessKey} -S {securityKey} -s client-name.api.opsramp.com -M true -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
        

See the /tmp/opsramp-agent_install.log file for installation progress.

Download and install an agent using the deployment script

This describes how to use the Python-based deployment script to install an agent.

Check for supported operating systems.

An agent has the following features, which can be selectively enabled:

FeatureDescription
AutomationRunbook automation, remote script execution, and custom script monitoring
PatchManagementDevice patch scanning and installation
RemoteCommandRemote command execution
RemoteConsoleRemote device access

Additional prerequisites:

  • Python is required to run the script.
  • The host machine should have access to the OpsRamp API server to download the installer.

The following subsections describe the available installation and uninstall options.

Install a root user agent

  1. Download and save the deployAgent.py script.

  2. Install the agent:

    • Enable all features:

            python deployAgent.py
            
    • Enable specific features:

            python deployAgent.py -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
            

    Within a few seconds, the OpsRamp Infrastructure page displays the installed server.

Install a default non-root user agent

The default, non-root agent installation automatically creates the default user.

  1. Download and save the deployAgent.py script.

  2. Install the agent:

    • Enable all features:

            python deployAgent.py -n yes
            
    • Enable specific features:

            python deployAgent.py -n yes -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
            

    Within a few seconds, the OpsRamp Infrastructure page displays the installed server.

Install a non-root custom user agent

To install the agent as a custom user with non-root privilege, create a new user and group before installing the agent.

  1. Create a new user group:

        groupadd --system {username}
        
  2. Create a custom user:

        useradd -g {username} -d /opt/opsramp -m {username} -s /bin/sh --system
        
  3. Set the user password:

        echo {username}:{password} | chpasswd
        
  4. Download and save the deployAgent.py script.

  5. Install the agent:

    • Enable all features:

            python deployAgent.py -R {username}
            
    • Enable specific features:

            python deployAgent.py -R {username} -f "agent:RemoteCommand,agent:PatchManagement,agent:Automation,agent:RemoteConsole"
            

    Within a few seconds, the OpsRamp Infrastructure page displays the installed server.

View the installation logs in the /tmp/opsramp-agent_install.log file.

Uninstall an agent

  1. Remove the package, depending on your operating system:

    • Debian-based operating systems:

            dpkg -P opsramp-agent
            
    • Red Hat-based operating systems:

            rmp -e opsramp-agent
            
  2. Delete the folder:

        rmdir /opt/opsramp/agent
        

See the /tmp/opsramp-agent_uninstall.log file for uninstall progress.

Deploy agents on multiple servers

Use the Ansible agent deployment tool to deploy agents on multiple servers.

Deploy agents using Docker

Deploy without a proxy

docker run -d –net=host –name=opsramp-agent -v /var/run/docker.sock:/var/run/docker.sock -e AGENT_API_KEY=<api-key> -e AGENT_API_SECRET=<secret> -e APP_SERVER=<app server> -e LOG_LEVEL=”warn” -e DOCKER_CONTAINER=”TRUE” -e opsramp/agent

Deploy with a proxy

docker run -d –net=host –name=opsramp-agent -v /var/run/docker.sock:/var/run/docker.sock -e AGENT_API_KEY=<api-key> -e AGENT_API_SECRET=<secret> -e APP_SERVER=<app server> -e LOG_LEVEL=”warn” -e DOCKER_CONTAINER=”TRUE” -e PROXY_SERVER=<proxy_server_ip> -e PROXY_PORT=<proxy-port> -e PROXY_USER=<proxy username> -e PROXY_PASSWORD=<proxy password> -m CONN_MODE=proxy opsramp/agent

If you are not using the default seccomp profile, enter the security-opt label:disable flag in the command:

docker run -it –security-opt label:disable -v /var/run/docker.sock:/var/run/docker.sock

Use the following command to validate that you are using the default seccomp profile:

docker info | grep Profile

WARNING: You’re not using the default seccomp profile
Profile: /etc/docker/seccomp.json

docker run -v /var/run/docker.sock:/var/run/docker.sock –rm byrnedo/alpine-curl curl –unix-socket /var/run/docker.sock http:/localhost/info

curl: (7) Couldn’t connect to server
curl: (7) Couldn’t connect to server

For example,

docker run -d –net=host –name=opsramp-agent –security-opt label:disable -v /var/run/docker.sock:/var/run/docker.sock -e AGENT_API_KEY=”<api-key>” -e AGENT_API_SECRET=”<secret>” -e APP_SERVER=”<app server>” -e LOG_LEVEL=”warn” -e DOCKER_CONTAINER=”TRUE” -e opsramp/agent

Manage docker events

On-boarded containers can be viewed in Setup > Infrastructure.

OpsRamp triggers alerts for events start, kill, and out-of-memory (oom) generated on the containers. Deleting a Docker host container also triggers an alert.

To stop receiving Docker alerts:

  1. On the host resource (Agent installed resource), navigate to /opt/opsramp/agent/conf.
  2. Edit the /opt/opsramp/agent/conf/configuration.properties configuration file.
  3. Enter 0 (zero) as the value in the docker_events field.

Uninstall agents

rpm -e opsramp-agent
rmdir /opt/opsramp/agent

See the /tmp/opsramp-agent_uninstall.log file for uninstall progress.