Install and configure AstraNetmon monitoring agents on Windows, Linux, and macOS
The AstraNetmon agent is a lightweight service that runs on your systems to collect and report metrics. This guide covers installation on all supported platforms.
Before you begin: You'll need your Agent API Key from the dashboard. Navigate to Dashboard â Settings â Agents to find it.
Download the Windows agent executable from your dashboard or directly:
# Using PowerShell
Invoke-WebRequest -Uri "https://your-domain.com/downloads/astra-netmon-agent.exe" -OutFile "astra-netmon-agent.exe"Create a config.toml file in the same directory as the agent:
api_url = "https://your-domain.astraid.io/api/agent"
api_key = "YOUR_AGENT_API_KEY_HERE"
poll_interval = 60
speedtest_enabled = true
speedtest_interval = 3600
traceroute_enabled = true
traceroute_targets = ["8.8.8.8", "1.1.1.1"]Replace YOUR_AGENT_API_KEY_HERE with your actual API key from the dashboard.
Run PowerShell as Administrator and execute:
# Install the service
.\astra-netmon-agent.exe install
# Start the service
Start-Service "AstraNetmon Agent"
# Verify it's running
Get-Service "AstraNetmon Agent"Logs are written to:
C:\ProgramData\AstraNetmon\logs\agent.logCommon service commands:
# Stop the service
Stop-Service "AstraNetmon Agent"
# Restart the service
Restart-Service "AstraNetmon Agent"
# Uninstall the service
.\astra-netmon-agent.exe uninstallDownload the Linux agent binary:
# Download
wget https://your-domain.com/downloads/astra-netmon-agent-linux -O /usr/local/bin/astra-netmon-agent
# Make executable
chmod +x /usr/local/bin/astra-netmon-agentCreate the configuration directory and file:
# Create config directory
sudo mkdir -p /etc/astranetmon
# Create config file
sudo cat > /etc/astranetmon/config.toml << 'EOF'
api_url = "https://your-domain.astraid.io/api/agent"
api_key = "YOUR_AGENT_API_KEY_HERE"
poll_interval = 60
speedtest_enabled = true
speedtest_interval = 3600
traceroute_enabled = true
traceroute_targets = ["8.8.8.8", "1.1.1.1"]
EOF
# Set permissions
sudo chmod 600 /etc/astranetmon/config.tomlCreate a systemd service file:
sudo cat > /etc/systemd/system/astranetmon-agent.service << 'EOF'
[Unit]
Description=AstraNetmon Agent
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/astra-netmon-agent --config /etc/astranetmon/config.toml
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF# Reload systemd
sudo systemctl daemon-reload
# Enable auto-start on boot
sudo systemctl enable astranetmon-agent
# Start the service
sudo systemctl start astranetmon-agent
# Check status
sudo systemctl status astranetmon-agent# View recent logs
sudo journalctl -u astranetmon-agent -n 50
# Follow logs in real-time
sudo journalctl -u astranetmon-agent -fCommon service commands:
# Stop the service
sudo systemctl stop astranetmon-agent
# Restart the service
sudo systemctl restart astranetmon-agent
# Disable auto-start
sudo systemctl disable astranetmon-agent# Download
curl -L https://your-domain.com/downloads/astra-netmon-agent-macos -o /usr/local/bin/astra-netmon-agent
# Make executable
chmod +x /usr/local/bin/astra-netmon-agent# Create config directory
sudo mkdir -p /etc/astranetmon
# Create config file
sudo cat > /etc/astranetmon/config.toml << 'EOF'
api_url = "https://your-domain.astraid.io/api/agent"
api_key = "YOUR_AGENT_API_KEY_HERE"
poll_interval = 60
speedtest_enabled = true
speedtest_interval = 3600
traceroute_enabled = true
traceroute_targets = ["8.8.8.8", "1.1.1.1"]
EOFCreate a launchd plist file:
sudo cat > /Library/LaunchDaemons/com.astranetmon.agent.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.astranetmon.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/astra-netmon-agent</string>
<string>--config</string>
<string>/etc/astranetmon/config.toml</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/var/log/astranetmon-agent.log</string>
<key>StandardErrorPath</key>
<string>/var/log/astranetmon-agent-error.log</string>
</dict>
</plist>
EOF
# Set permissions
sudo chmod 644 /Library/LaunchDaemons/com.astranetmon.agent.plist# Load the daemon
sudo launchctl load /Library/LaunchDaemons/com.astranetmon.agent.plist
# Check if it's running
sudo launchctl list | grep astranetmon# View stdout logs
tail -f /var/log/astranetmon-agent.log
# View error logs
tail -f /var/log/astranetmon-agent-error.log# Stop the daemon
sudo launchctl unload /Library/LaunchDaemons/com.astranetmon.agent.plist
# Start the daemon
sudo launchctl load /Library/LaunchDaemons/com.astranetmon.agent.plist
# Restart
sudo launchctl unload /Library/LaunchDaemons/com.astranetmon.agent.plist
sudo launchctl load /Library/LaunchDaemons/com.astranetmon.agent.plistAvailable configuration options in config.toml:
| Option | Type | Required | Description |
|---|---|---|---|
| api_url | string | Yes | API endpoint URL |
| api_key | string | Yes | Your agent API key |
| poll_interval | integer | No | Metrics polling interval (seconds, default: 60) |
| speedtest_enabled | boolean | No | Enable speed tests (default: false) |
| speedtest_interval | integer | No | Speed test interval (seconds, default: 3600) |
| traceroute_enabled | boolean | No | Enable traceroute (default: false) |
| traceroute_targets | array | No | Target IPs for traceroute |
For more advanced configuration options, see the Agent Configuration Guide.
After installation, verify the agent is working:
Agent is online! You should start seeing metrics in the dashboard within a few minutes.
For more help, see the Troubleshooting Guide.