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:
- From All Clients, select the client.
- Go to Setup > Downloads > Agent.
- From the Linux section, click Download agent deployment script.
Notes:
- The installation script is downloaded in .py format. You can open this file with any text editor. However, we recommend opening the installation script file using Microsoft Word.
- When you download Agent, ensure that the SHA-256 checksum matches the downloaded file.
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
Note
If you are not using the default seccomp profile, pass the following security-opt label:disable
flag to the existing command.
–security-opt label:disable.
Example: docker run -it –security-opt label:disable -v /var/run/docker.sock:/var/run/docker.sock
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::
- On the host resource (Agent installed resource), navigate to
/opt/opsramp/agent/conf
. - Edit the configuration file:
/opt/opsramp/agent/conf/configuration.properties
- 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:
- Go to Infrastructure and from the list of resources, select the resources from which you want to uninstall the agent.
- Click Unmanage Devices.
- Click OK for confirmation.