{"id":37942866,"url":"https://github.com/netwatcherio/agent","last_synced_at":"2026-05-28T00:01:48.587Z","repository":{"id":59044843,"uuid":"528199682","full_name":"netwatcherio/agent","owner":"netwatcherio","description":"A lightweight network monitoring agent that reports metrics to the NetWatcher platform.","archived":false,"fork":false,"pushed_at":"2026-02-19T19:02:20.000Z","size":43052,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-19T20:56:34.119Z","etag":null,"topics":["agent","automation","monitoring","network","ping","traceroute","traffic-simulation"],"latest_commit_sha":null,"homepage":"https://netwatcher.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netwatcherio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-23T23:48:43.000Z","updated_at":"2026-02-19T18:36:19.000Z","dependencies_parsed_at":"2026-01-16T19:03:28.633Z","dependency_job_id":null,"html_url":"https://github.com/netwatcherio/agent","commit_stats":null,"previous_names":["sagostin/netwatcher-agent","netwatcherio/agent"],"tags_count":113,"template":false,"template_full_name":null,"purl":"pkg:github/netwatcherio/agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netwatcherio%2Fagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netwatcherio%2Fagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netwatcherio%2Fagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netwatcherio%2Fagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netwatcherio","download_url":"https://codeload.github.com/netwatcherio/agent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netwatcherio%2Fagent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","automation","monitoring","network","ping","traceroute","traffic-simulation"],"created_at":"2026-01-16T17:46:28.444Z","updated_at":"2026-05-23T06:10:17.670Z","avatar_url":"https://github.com/netwatcherio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetWatcher Agent\n\nA lightweight network monitoring agent that reports metrics to the NetWatcher platform.\n\n## Features\n\n- **MTR Checks** - Traceroute analysis using Trippy\n- **Ping Tests** - ICMP latency monitoring with pro-bing\n- **DNS Monitoring** - DNS resolution time and record validation\n- **Traffic Simulation** - Synthetic UDP traffic between agents\n- **System Information** - Host metrics and status\n- **Network Information** - Interface and connectivity data\n- **Speedtests** - On-demand bandwidth testing\n- **Auto-Updates** - Automatic version updates from GitHub releases\n\n## Requirements\n\n- **Platforms**: Linux, macOS, Windows\n- **Permissions**: Root/Administrator (required for ICMP and raw sockets)\n- **NetWatcher Controller**: Running instance of [netwatcher-oss](https://github.com/netwatcherio/oss)\n\n## Quick Start\n\n### Linux\n\n```bash\n# Download and run the installer\ncurl -fsSL https://raw.githubusercontent.com/netwatcherio/agent/master/install.sh | sudo bash -s -- \\\n  --workspace YOUR_WORKSPACE_ID \\\n  --id YOUR_AGENT_ID \\\n  --pin YOUR_AGENT_PIN\n```\n\n### Windows (PowerShell as Administrator)\n\n```powershell\n# Download the installer\nInvoke-WebRequest -Uri \"https://raw.githubusercontent.com/netwatcherio/agent/master/install.ps1\" -OutFile \"install.ps1\"\n\n# Run the installer\n.\\install.ps1 -Workspace YOUR_WORKSPACE_ID -Id YOUR_AGENT_ID -Pin \"YOUR_AGENT_PIN\"\n```\n\n\u003e **Note:** If you encounter an execution policy error, run PowerShell as Administrator and use:\n\u003e ```powershell\n\u003e powershell -ExecutionPolicy Bypass -File install.ps1 -Workspace YOUR_WORKSPACE_ID -Id YOUR_AGENT_ID -Pin \"YOUR_AGENT_PIN\"\n\u003e ```\n\n### macOS\n\n```bash\n# Download and run the installer (user-level, no sudo)\ncurl -fsSL https://raw.githubusercontent.com/netwatcherio/agent/master/install-macos.sh | bash -s -- \\\n  --workspace YOUR_WORKSPACE_ID \\\n  --id YOUR_AGENT_ID \\\n  --pin YOUR_AGENT_PIN\n\n# Or system-level (requires sudo, runs at boot)\ncurl -fsSL https://raw.githubusercontent.com/netwatcherio/agent/master/install-macos.sh | sudo bash -s -- \\\n  --workspace YOUR_WORKSPACE_ID \\\n  --id YOUR_AGENT_ID \\\n  --pin YOUR_AGENT_PIN \\\n  --system\n```\n\nFor detailed macOS installation and administration documentation, see [docs/agent-installation-macos.md](../docs/agent-installation-macos.md).\n\n### Self-Hosted Deployment\n\nFor self-hosted NetWatcher instances:\n\n```bash\n# Linux\ncurl -fsSL https://raw.githubusercontent.com/netwatcherio/agent/master/install.sh | sudo bash -s -- \\\n  --host your-controller.example.com \\\n  --ssl true \\\n  --workspace 1 \\\n  --id 42 \\\n  --pin 123456789\n```\n\n```powershell\n# Windows\npowershell -ExecutionPolicy Bypass -File install.ps1 -Host \"your-controller.example.com\" -SSL $true -Workspace 1 -Id 42 -Pin \"123456789\"\n```\n\n## Configuration\n\nThe agent stores its configuration in `config.conf`:\n\n| Parameter | Description |\n|-----------|-------------|\n| `CONTROLLER_HOST` | Controller hostname (e.g., `api.netwatcher.io`) |\n| `CONTROLLER_SSL` | Use HTTPS/WSS (`true` or `false`) |\n| `WORKSPACE_ID` | Workspace ID |\n| `AGENT_ID` | Agent ID |\n| `AGENT_PIN` | Initial authentication PIN |\n\n### Configuration Locations\n\n| Platform | Path |\n|----------|------|\n| Linux | `/opt/netwatcher-agent/config.conf` |\n| macOS (user-level) | `~/netwatcher-agent/config.conf` |\n| macOS (system-level) | `/var/root/netwatcher-agent/config.conf` |\n| Windows | `C:\\Program Files\\NetWatcher-Agent\\config.conf` |\n\n## Service Management\n\n### Linux (systemd)\n\n```bash\nsudo systemctl status netwatcher-agent   # Check status\nsudo systemctl restart netwatcher-agent  # Restart\nsudo journalctl -u netwatcher-agent -f   # View logs\n```\n\n### Windows\n\n```powershell\nGet-Service -Name NetWatcherAgent        # Check status\nRestart-Service -Name NetWatcherAgent    # Restart\nGet-EventLog -LogName Application -Source NetWatcherAgent -Newest 20  # View logs\n```\n\n### macOS (launchd)\n\n```bash\n# User-level service\nlaunchctl list | grep com.netwatcher.agent   # Check status\ntail -f ~/netwatcher-agent/agent.log          # View logs\nlaunchctl stop com.netwatcher.agent \u0026\u0026 launchctl start com.netwatcher.agent  # Restart\n\n# System-level service\nsudo launchctl list | grep com.netwatcher.agent   # Check status\nsudo tail -f /var/root/netwatcher-agent/agent.log # View logs\n```\n\n## Installer Options\n\n### Linux (`install.sh`)\n\n| Flag | Description |\n|------|-------------|\n| `--workspace`, `-w` | Workspace ID (required for install) |\n| `--id`, `-i` | Agent ID (required for install) |\n| `--pin`, `-p` | Agent PIN (required for install) |\n| `--host` | Controller host (default: `api.netwatcher.io`) |\n| `--ssl` | Use SSL/HTTPS — `true` or `false` (default: `true`) |\n| `--install-dir` | Installation directory (default: `/opt/netwatcher-agent`) |\n| `--version` | Install a specific version tag |\n| `--force` | Force reinstallation or skip uninstall confirmation |\n| `--no-service` | Skip systemd service creation |\n| `--no-start` | Don't start the service after installation |\n| `--update` | Update only the binary (preserves config and service) |\n| `--uninstall` | Uninstall the agent |\n| `--debug` | Enable debug output |\n\n```bash\n# Update to latest\nsudo ./install.sh --update\n\n# Update to specific version\nsudo ./install.sh --update --version v20260219-5c692b8\n\n# Uninstall\nsudo ./install.sh --uninstall\n\n# Force uninstall without confirmation\nsudo ./install.sh --uninstall --force\n```\n\n### macOS (`install-macos.sh`)\n\n| Flag | Description |\n|------|-------------|\n| `--workspace`, `-w` | Workspace ID (required for install) |\n| `--id`, `-i` | Agent ID (required for install) |\n| `--pin`, `-p` | Agent PIN (required for install) |\n| `--host` | Controller host (default: `api.netwatcher.io`) |\n| `--ssl` | Use SSL/HTTPS — `true` or `false` (default: `true`) |\n| `--install-dir` | Installation directory (default: `~/netwatcher-agent`) |\n| `--system` | Install as system-level service (requires sudo) |\n| `--user` | Install as user-level service (default, no sudo) |\n| `--force` | Force reinstallation or skip uninstall confirmation |\n| `--no-service` | Skip launchd service creation |\n| `--no-start` | Don't start the service after installation |\n| `--version` | Install a specific version tag |\n| `--update` | Update only the binary (preserves config and service) |\n| `--uninstall` | Uninstall the agent |\n| `--debug` | Enable debug output |\n\n```bash\n# Update to latest\n./install-macos.sh --update\n\n# Update to specific version\n./install-macos.sh --update --version v20260219-5c692b8\n\n# Uninstall\n./install-macos.sh --uninstall\n\n# Force uninstall without confirmation\n./install-macos.sh --uninstall --force\n```\n\n### Windows (`install.ps1`)\n\n| Flag | Description |\n|------|-------------|\n| `-Workspace` | Workspace ID (required for install) |\n| `-Id` | Agent ID (required for install) |\n| `-Pin` | Agent PIN (required for install) |\n| `-ControllerHost` | Controller host (default: `api.netwatcher.io`) |\n| `-SSL` | Use SSL/HTTPS (default: `$true`) |\n| `-InstallDir` | Installation directory (default: `C:\\Program Files\\NetWatcher-Agent`) |\n| `-Version` | Install a specific version tag |\n| `-Force` | Force reinstallation |\n| `-NoStart` | Don't start the service after installation |\n| `-Update` | Update only the binary (preserves config and service) |\n| `-UpdateVersion` | Specific version to update to (used with `-Update`) |\n| `-Uninstall` | Uninstall the agent |\n\n```powershell\n# Update to latest\n.\\install.ps1 -Update\n\n# Update to specific version\n.\\install.ps1 -Update -UpdateVersion \"v20260219-5c692b8\"\n\n# Uninstall\n.\\install.ps1 -Uninstall\n\n# Force uninstall without confirmation\n.\\install.ps1 -Uninstall -Force\n```\n\n## Troubleshooting\n\n### Failed Auto-Updates\n\nIf the agent's auto-update fails (e.g., read-only `/tmp`, network issues), use the install script to manually update. See [Installer Options](#installer-options) above for all flags.\n\n```bash\n# Linux\nsudo ./install.sh --update\n\n# Windows\n.\\install.ps1 -Update\n```\n\n### Manual Binary Replacement\n\nIf the install script isn't available, manually replace the binary:\n\n```bash\n# 1. Stop the service\nsudo systemctl stop netwatcher-agent\n\n# 2. Download the latest release\n# Visit: https://github.com/netwatcherio/agent/releases/latest\n# Download the appropriate file for your platform (e.g., linux-amd64.zip)\n\n# 3. Extract and replace\ncd /opt/netwatcher-agent\nunzip ~/Downloads/netwatcher-*.zip -d /tmp/nw-update\ncp /tmp/nw-update/netwatcher-agent ./netwatcher-agent\nchmod +x ./netwatcher-agent\n\n# 4. Verify and restart\n./netwatcher-agent --version\nsudo systemctl start netwatcher-agent\n```\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Auto-update fails with \"read-only file system\" | Updated agents create `.tmp` folder locally instead of using `/tmp`. Update manually with `--update` flag. |\n| Service fails to start after update | Check logs: `journalctl -u netwatcher-agent -n 50`. Rollback if needed by restoring `.backup` file. |\n| Agent not connecting to controller | Verify `config.conf` settings, check firewall, ensure controller is reachable. |\n| \"Unauthorized\" errors | Re-bootstrap with correct PIN or generate new agent credentials in the dashboard. |\n\n### Viewing Logs\n\n```bash\n# Linux - Follow logs live\nsudo journalctl -u netwatcher-agent -f\n\n# Linux - Last 100 lines\nsudo journalctl -u netwatcher-agent -n 100\n\n# macOS - User-level\ntail -f ~/netwatcher-agent/agent.log\n\n# macOS - System-level\nsudo tail -f /var/root/netwatcher-agent/agent.log\n\n# Windows\nGet-EventLog -LogName Application -Source NetWatcherAgent -Newest 50\n```\n\n## Building from Source\n\n```bash\ngit clone https://github.com/netwatcherio/agent\ncd agent\ngo build -o netwatcher-agent\n```\n\n## Libraries\n\n\n- [pro-bing](https://github.com/prometheus-community/pro-bing) - ICMP ping\n- [rperf](https://github.com/opensource-3d-p/rperf) - Traffic simulation\n\n## License\n\n[GNU Affero General Public License v3.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetwatcherio%2Fagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetwatcherio%2Fagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetwatcherio%2Fagent/lists"}