Back to Documentation

Server Setup Guide

Add servers to your Wakestack monitoring infrastructure

How It Works
┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  Your Server 1  │     │  Your Server 2  │     │  Your Server N  │
│  ┌───────────┐  │     │  ┌───────────┐  │     │  ┌───────────┐  │
│  │   Agent   │  │     │  │   Agent   │  │     │  │   Agent   │  │
│  └─────┬─────┘  │     │  └─────┬─────┘  │     │  └─────┬─────┘  │
└────────┼────────┘     └────────┼────────┘     └────────┼────────┘
         │                       │                       │
         └───────────────────────┼───────────────────────┘
                                 │ HTTPS (every 30s)
                                 ▼
                    ┌────────────────────────┐
                    │   Wakestack Platform   │
                    └────────────────────────┘

The Wakestack Agent is a lightweight Go binary installed on each server you want to monitor. It collects system metrics and sends them securely to the Wakestack platform every 30 seconds.

Quick Start
Get monitoring set up in 2 simple steps
1

Register Your Server

Register the server via the API to get an API key:

curl -X POST https://wakestack.co.uk/api/hosts \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN" \
  -d '{
    "name": "web-server-1",
    "hostname": "web1.example.com",
    "tags": ["production", "web"]
  }'

Important

Save the apiKey from the response immediately. It's only shown once!

2

Install the Agent

SSH into your server and run:

curl -sSL https://wakestack.co.uk/install.sh | sudo bash -s YOUR_API_KEY

That's it!

The agent will start sending metrics every 30 seconds. Your server will appear in the dashboard within a minute.

Manual Installation
Prefer to install manually? Follow these steps.

Database Monitoring (Optional)
The agent can also monitor MySQL and PostgreSQL databases

1. Create a monitoring user:

-- Connect to PostgreSQL as superuser
CREATE USER wakestack_monitor WITH PASSWORD 'your_secure_password';
GRANT CONNECT ON DATABASE your_database TO wakestack_monitor;
GRANT pg_monitor TO wakestack_monitor;

2. Update agent config:

# /etc/wakestack/agent.yaml
api_key: "wk_YOUR_API_KEY"
endpoint: "https://wakestack.co.uk"
interval: 30

database:
  enabled: true
  type: "postgresql"
  host: "localhost"
  port: 5432
  user: "wakestack_monitor"
  password: "your_secure_password"
  dbname: "your_database"

3. Restart the agent:

sudo systemctl restart wakestack-agent
Collected Metrics
What the agent monitors on your servers

System Metrics

  • CPU usage, load averages, temperature
  • Memory (total, used, free, cached)
  • Swap usage
  • Disk usage per mount point
  • Disk I/O (read/write bytes)
  • Network I/O (bytes and packets)
  • System uptime
  • Process count and top consumers

Database Metrics

  • Active connections
  • Connection usage percentage
  • Transactions/queries per second
  • Cache/buffer hit ratio
  • Replication lag
  • Database size
  • Slow queries (MySQL)
Troubleshooting
Common issues and how to resolve them

Ready to monitor your servers?

Create a free account to get started with server monitoring.