Introduction to do-agent
do-agent is a powerful tool designed for users of DigitalOcean's cloud services. It plays a crucial role by enabling the collection of droplet metrics, which are then sent to DigitalOcean to create resource usage graphs and establish alerts.
Supported Platforms
do-agent is versatile and supports a variety of Linux distributions, including:
- Ubuntu: Starting from the oldest Long Term Support (LTS) release that's still under standard maintenance.
- Debian: Again, supporting from the oldest LTS release still under support.
- Fedora: Versions 27 and above.
- CentOS: Version 6 and newer.
- Docker: It can also run within Docker containers.
However, CloudLinux 6+ is not officially supported. While do-agent might function on many Linux distributions beyond those officially supported, DigitalOcean does not provide official support for issues encountered on unsupported distributions.
SELinux Users
A special note for those using SELinux: the installation script for do-agent automatically enables the nis_enabled
flag. This is essential for network access required by do-agent. If you manually configure do-agent or alter any related settings, ensure to run the command setsebool -P nis_enabled 1 && systemctl daemon-reexec
to ensure proper functionality.
Installation Process
Installing do-agent is straightforward:
- On New Droplets: Simply check the Monitoring option when creating a Droplet to install the latest stable version of do-agent.
- Using Package Managers: On existing systems, you can use package managers like
yum
,dnf
, orapt-get
for installation and updates.
For a script-based installation, one can use either curl
or wget
to download and execute the installation script from DigitalOcean's repository. It's also possible to download the script for inspection before executing it, ensuring transparency and security.
Development and Contribution
Developers interested in contributing to do-agent can follow a streamlined process:
- Ensure a suitable environment with Go (version 1.11 or later), GNU Make, and Docker installed.
- Clone the GitHub repository, build the project, and manage dependencies effectively.
The development process is supported by Go modules, and direnv
is recommended for environment management.
Uninstallation
Removing do-agent is as simple as its installation. Users can utilize their distro's package manager with commands like apt-get remove do-agent
for Debian-based systems or yum remove do-agent
for RHEL-based systems.
Running as a Docker Container
do-agent can also run as a Docker container. Users need to mount the host directory /proc
to /host/proc
to enable this setup. DigitalOcean provides a stable version for easy deployment.
Example Docker Run Command:
docker run \
-v /proc:/host/proc:ro \
-v /sys:/host/sys:ro \
digitalocean/do-agent:stable
Reporting Issues
The DigitalOcean community is encouraged to participate in the ongoing improvement of do-agent. Users can report any issues by opening a new issue on the GitHub repository. Checking for existing issues before reporting can also help in efficiently resolving problems.
Overall, do-agent is an invaluable addition for DigitalOcean users who seek reliable monitoring and alerting capabilities for their cloud resources.