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

Note that you are 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.