Prerequisites

System requirements:

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

Installing agents on single servers

To download an agent onto a server, from the console:

  1. From All Clients, select the client.
  2. Go to Setup > Downloads > Agent.
  3. From the Linux section, click Download agent deployment script.

Installing agents on multiple servers

Use a software deployment tool, such as Chef Recipe and Puppet Cookbook.

Deploying agents as docker containers

Execute below command in the host machine.

  • Without 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
    
  • With 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
    

The following are the validations to check if you are using the default seccomp profile:

1. docker info | grep Profile
WARNING: You’re not using the default seccomp profile
Profile: /etc/docker/seccomp.json
2. 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
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

The onboarded containers are available at the Infrastructure page. OpsRamp triggers alerts for events start, kill, and oom (out-of-memory) generated on the containers.

When you delete a Container from the Docker host, OpsRamp triggers an alert

Stop receiving Docker alerts

To stop receiving Docker alerts::

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

Uninstalling agents

You can uninstall agent with the options to manage or unamanage the server.

Uninstalling agents and managing the server

For Single Server: Run the following commands:

  • For Ubuntu
    • dpkg -P opsramp-agent – For uninstalling agents.
    • rm -rf /opt/opsramp – For removing any files related to agents.
  • For Redhat
    • rpm -e opsramp-agent – For uninstalling agents.
    • rm -rf /opt/opsramp – For removing any files related to agents.

For Multiple Servers: Use a software deployment tool, such as Chef Recipe and Puppet Cookbook.

Uninstalling agents and unmanaging the server

To uninstall the agent and unmanage the server:

  1. Go to Infrastructure and from the list of resources, select the resources from which you want to uninstall the agent.
  2. Click Unmanage Devices.
  3. Click OK for confirmation.