Agent Installation
The Tergum Agent runs on both master and slave servers, collecting metrics and executing commands.
Agent Overview
The agent is a lightweight Python daemon that:
- Reports server health every 30 seconds
- Monitors MySQL/MariaDB replication status
- Executes commands from the dashboard (sync, failover, etc.)
- Manages file synchronization (master only)
Manual Installation
If you need to reinstall the agent:
# Download agent
curl -o /opt/tergum/agent/tergum_agent.py \
https://app.tergum.ca/api/agent/tergum_agent.py
# Create config
cat > /opt/tergum/config/agent.conf << CONF
API_TOKEN=your_token_here
SERVER_ID=your_server_id
ROLE=master # or slave
API_ENDPOINT=https://app.tergum.ca/api
CONF
# Start service
systemctl restart tergum-agent
Verifying Agent Status
# Check service status
systemctl status tergum-agent
# View recent logs
journalctl -u tergum-agent -n 50
# Check agent version
grep VERSION /opt/tergum/agent/tergum_agent.py
Agent Updates
The agent updates automatically when new versions are available. You can also trigger updates from the Admin panel in the dashboard.