A lightweight server monitoring solution that tracks CPU and RAM usage through a secure REST API.
Before setting up the monitoring service, ensure you have:
-
Domain Name
- A domain or subdomain that you can configure
- Access to your domain's DNS settings
-
Server Requirements
- A VPS or server with:
- Docker installed
- Docker Compose installed
- Ports 80 and 443 available
- At least 1GB RAM recommended
- A VPS or server with:
-
DNS Configuration If using a subdomain (e.g.,
monitor.yourdomain.com
):Type: A Host: monitor Value: Your-Server-IP TTL: 3600 (or default)
If using a root domain (e.g.,
yourdomain.com
):Type: A Host: @ Value: Your-Server-IP TTL: 3600 (or default)
-
One-Line Installation
curl -fsSL https://raw.githubusercontent.com/kaanmertkoc/simple-monitor/main/setup.sh -o setup.sh && chmod +x setup.sh && ./setup.sh
Or manually:
# Download setup script wget https://raw.githubusercontent.com/kaanmertkoc/simple-monitor/main/setup.sh # Make it executable chmod +x setup.sh # Run setup with your domain ./setup.sh
That's it! Your monitoring service will be available at https://your-domain.com
- Log in to Cloudflare Dashboard
- Select your domain
- Go to DNS settings
- Click "Add Record"
- Choose A record
- Enter subdomain (if using)
- Enter your server's IP
- Save
- Log in to GoDaddy
- Go to DNS Management
- Find the DNS records section
- Add new record
- Choose A record
- Enter subdomain (if using)
- Enter your server's IP
- Save
- Log in to Namecheap
- Go to Domain List
- Click "Manage" next to your domain
- Go to Advanced DNS
- Add new record
- Choose A record
- Enter subdomain (if using)
- Enter your server's IP
- Save
If you prefer to set up manually:
-
Create directory structure:
mkdir -p monitor && cd monitor mkdir -p nginx/conf.d data certbot/conf certbot/www
-
Download setup files:
curl -fsSL https://raw.githubusercontent.com/kaanmertkoc/simple-monitor/main/docker-compose.yml -o docker-compose.yml
-
Start the service:
docker compose up -d
Access your monitoring dashboard at https://your-domain.com
API Endpoints:
/metrics
- Current metrics/metrics/history
- Historical data/health
- Health check
# View logs
docker compose logs -f
# Stop service
docker compose down
# Update to latest version
docker compose pull
docker compose up -d
# Restart service
docker compose restart
- Ensure DNS is properly configured
- Check if ports 80 and 443 are open
- Wait for DNS propagation (can take up to 48 hours)
To manually trigger certificate renewal:
docker compose run --rm certbot certonly --webroot --webroot-path /var/www/certbot -d
-
Check if containers are running:
docker compose ps
-
Check logs:
docker compose logs -f
For specific services:
docker compose logs -f monitor docker compose logs -f nginx
- Make sure your domain is pointing to the correct IP
- Check if SSL certificate was generated:
ls -la certbot/conf/live/your-domain.com/
- Ensure DNS is properly configured
- Check if ports 80 and 443 are open
- Verify domain points to correct IP
- Wait for DNS propagation (up to 48 hours)
This setup includes:
- Automatic HTTP to HTTPS redirection
- Modern SSL configuration
- Regular certificate renewal
- Secure headers
If you encounter any issues:
- Check the common issues section
- Open an issue on GitHub
- Join our community Discord
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.