Introduction

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 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. 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. 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-{version}.i386.rpm
        

    64 bit

        sudo AGENTUSER={username} rpm -i opsramp-{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. 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.

Deploy agents on multiple servers

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

Deploying the agent 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, provide 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

Handling 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 hostcontainer also triggers an alert.

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 the agent

Delete the agent and /opsramp/agent directory:

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

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