{"id":23960394,"url":"https://github.com/aegis-watcher/agent-infra","last_synced_at":"2026-05-30T16:31:07.767Z","repository":{"id":270867035,"uuid":"911691240","full_name":"Aegis-Watcher/agent-infra","owner":"Aegis-Watcher","description":"The Agent Infra is a lightweight tool designed to collect metrics for CPU, memory, and disk usage","archived":false,"fork":false,"pushed_at":"2025-01-18T03:25:49.000Z","size":7187,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-24T12:19:13.622Z","etag":null,"topics":["agent","cpu","disk","go","infrastructure","memory","metrics","tool"],"latest_commit_sha":null,"homepage":"https://aegiswatcher.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aegis-Watcher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T16:06:18.000Z","updated_at":"2025-01-18T03:25:51.000Z","dependencies_parsed_at":"2025-01-03T23:47:03.729Z","dependency_job_id":null,"html_url":"https://github.com/Aegis-Watcher/agent-infra","commit_stats":null,"previous_names":["aegis-watcher/agent-infra"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aegis-Watcher%2Fagent-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aegis-Watcher%2Fagent-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aegis-Watcher%2Fagent-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aegis-Watcher%2Fagent-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aegis-Watcher","download_url":"https://codeload.github.com/Aegis-Watcher/agent-infra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240475239,"owners_count":19807292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","cpu","disk","go","infrastructure","memory","metrics","tool"],"created_at":"2025-01-06T19:27:52.848Z","updated_at":"2026-05-30T16:31:07.721Z","avatar_url":"https://github.com/Aegis-Watcher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Infra\n\nThe Agent Infra is a lightweight tool designed to collect metrics for CPU, memory, and disk usage and send them to a configured endpoint. This document provides instructions for installing and configuring the agent, including options for using Docker or running it directly as a system service.\n\n---\n\n## Table of Contents\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n  - [Using Docker](#using-docker)\n  - [Running as a System Service](#running-as-a-system-service)\n- [Configuration](#configuration)\n  - [Environment Variables](#environment-variables)\n- [Usage](#usage)\n- [Uninstallation](#uninstallation)\n- [Troubleshooting](#troubleshooting)\n\n---\n\n## Prerequisites\n- Go 1.18 or later (if building from source).\n- Docker installed (if using Docker).\n- Access to required environment variables: `AGENT_UUID`, `AGENT_SECRET`.\n\n---\n\n## Installation\n\n### Using Docker\n\n1. **Pull the Docker image:**\n\n   ```bash\n   docker pull public.ecr.aws/aegis-watcher/agent/infra:lastest\n   ```\n\n2. **Run the agent using Docker:**\n\n   ```bash\n   docker run -d \\\n     -e AGENT_UUID=\"your-agent-uuid\" \\\n     -e AGENT_SECRET=\"your-agent-secret\" \\\n     public.ecr.aws/d4g3e8d6/agent/infra:latest\n   ```\n\n   Replace `your-agent-uuid`, `your-agent-secret` with appropriate values.\n\n3. **Verify the agent is running:**\n\n   ```bash\n   docker ps | grep metrics-agent\n   ```\n\n---\n\n### Running as a System Service\n\n1. **Download and Run the Installation Script:**\n\n   Download the setup script that automates the installation process:\n\n   ```bash\n   curl -o install.sh https://raw.githubusercontent.com/Aegis-Watcher/agent-infra/refs/heads/main/scripts/install.sh\n   chmod +x install.sh\n   ./install.sh\n   ```\n\n   The script performs the following actions:\n   - Builds or downloads the Metrics Agent binary.\n   - Places the binary in `/usr/local/bin/`.\n   - Prompts the user to input `AGENT_UUID`, `AGENT_SECRET`.\n   - Creates the environment configuration file (`/etc/aegis-watcher-metrics-agent.env`).\n   - Sets up and starts a systemd service for the agent.\n\n2. **Verify the Service is Running:**\n\n   ```bash\n   sudo systemctl status aegis-watcher-metrics-agent\n   ```\n\n---\n\n## Configuration\n\n### Environment Variables\n\nThe agent requires the following environment variables for configuration:\n\n- **`AGENT_UUID`** (Required): Unique identifier for the agent.\n- **`AGENT_SECRET`** (Required): Secret key for agent authentication.\n\n---\n\n## Usage\n\n### Logs\n\nTo view logs:\n\n- **Docker:**\n  ```bash\n  docker logs \u003ccontainer-id\u003e\n  ```\n\n- **System Service:**\n  ```bash\n  journalctl -u aegis-watcher-metrics-agent -f\n  ```\n\n### Testing\n\nTo verify the agent is collecting and sending metrics correctly, check your monitoring system for incoming data or use logs for debugging.\n\n---\n\n## Uninstallation\n\n### Docker\n\n1. Stop the container:\n\n   ```bash\n   docker stop \u003ccontainer-id\u003e\n   ```\n\n2. Remove the container:\n\n   ```bash\n   docker rm \u003ccontainer-id\u003e\n   ```\n\n3. Optionally, remove the image:\n\n   ```bash\n   docker rmi public.ecr.aws/aegis-watcher/agent/infra\n   ```\n\n### System Service\n\n1. Stop and disable the service:\n\n   ```bash\n   sudo systemctl stop aegis-watcher-metrics-agent\n   sudo systemctl disable aegis-watcher-metrics-agent\n   ```\n\n2. Remove the binary and configuration files:\n\n   ```bash\n   sudo rm /usr/local/bin/aegis-watcher-metrics-agent\n   sudo rm /etc/aegis-watcher-metrics-agent.env\n   sudo rm /etc/systemd/system/aegis-watcher-metrics-agent.service\n   ```\n\n3. Reload systemd:\n\n   ```bash\n   sudo systemctl daemon-reload\n   ```\n\n---\n\n## Troubleshooting\n\n- **Service Fails to Start:**\n  - Ensure the environment variables are correctly set in `/etc/metrics-agent.env`.\n  - Check logs for detailed error messages.\n    ```bash\n    journalctl -u aegis-watcher-metrics-agent\n    ```\n\n- **Metrics Not Received:**\n  - Verify the network connection and endpoint availability.\n  - Check logs for connectivity errors.\n\n---\n\nFor further assistance, please contact support at support@aegiswatcher.com\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegis-watcher%2Fagent-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faegis-watcher%2Fagent-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegis-watcher%2Fagent-infra/lists"}