Skip to content

checklogsdev/Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ CheckLogs Agent - Docker Installation

Official Docker installation for the CheckLogs monitoring agent.

πŸ“‹ Prerequisites

⚑ Quick Start

1️⃣ Get Your Credentials

  1. Go to panel.checklogs.dev
  2. Login or create an account
  3. Click "Add Server"
  4. Copy your API_KEY and UDP_PORT

2️⃣ Install the Agent

# Create installation directory
mkdir -p /opt/checklogs && cd /opt/checklogs

# Download docker-compose.yml
curl -o docker-compose.yml https://raw.githubusercontent.com/checklogsdev/Docker/main/docker-compose.yml

# Download .env.example
curl -o .env.example https://raw.githubusercontent.com/checklogsdev/Docker/main/.env.example

# Copy and configure
cp .env.example .env
nano .env  # Add your CHECKLOGS_API_KEY and CHECKLOGS_API_PORT

3️⃣ Start the Agent

docker-compose up -d

4️⃣ Verify Installation

# Check if container is running
docker-compose ps

# View logs
docker-compose logs -f

# You should see:
# βœ“ Configuration valid
# βœ“ Agent started successfully
# πŸ“¦ Sent metrics to api.checklogs.dev

5️⃣ Check Dashboard

Go to panel.checklogs.dev and verify your server appears with live metrics.


🎯 Configuration

Required Settings

Edit your .env file with values from the dashboard:

CHECKLOGS_API_KEY=your_api_key_from_dashboard
CHECKLOGS_API_PORT=your_udp_port_from_dashboard

Optional Settings

# Server name (shown in dashboard)
SERVER_NAME=My Production Server

# Collection interval in seconds (default: 10)
COLLECT_INTERVAL=10

# Enable/disable specific metrics
COLLECT_CPU=true
COLLECT_RAM=true
COLLECT_DISK=true
COLLECT_LOAD=true
COLLECT_PROCESSES=true

# Number of top processes to monitor (default: 10)
TOP_PROCESSES_COUNT=10

# Logging level: DEBUG, INFO, WARNING, ERROR (default: INFO)
LOG_LEVEL=INFO

πŸ› οΈ Management Commands

Start the Agent

docker-compose up -d

Stop the Agent

docker-compose down

Restart the Agent

docker-compose restart

View Logs

# Follow logs in real-time
docker-compose logs -f

# View last 100 lines
docker-compose logs --tail=100

# View logs with timestamps
docker-compose logs -f -t

Update to Latest Version

docker-compose pull
docker-compose up -d

Check Status

docker-compose ps

Check Resource Usage

docker stats checklogs_agent

πŸ”§ Troubleshooting

Agent not sending metrics?

  1. Check API credentials:

    docker-compose exec agent printenv | grep CHECKLOGS
  2. Check logs for errors:

    docker-compose logs -f | grep ERROR
  3. Verify network connectivity:

    docker-compose exec agent ping -c 3 api.checklogs.dev

Container keeps restarting?

# Check exit code and reason
docker-compose ps

# View full logs
docker-compose logs --tail=50

# Common issues:
# - Missing API_KEY or API_PORT in .env
# - Invalid credentials
# - Network connectivity issues

High CPU/Memory usage?

The agent is configured with resource limits:

  • CPU: 0.25 cores max
  • Memory: 256MB max

Adjust in docker-compose.yml if needed:

deploy:
  resources:
    limits:
      cpus: '0.50'
      memory: 512M

πŸ”’ Security

  • The agent runs with minimal privileges
  • Host filesystems mounted read-only
  • Resource limits prevent system impact
  • No sensitive data stored in logs
  • API key transmitted securely via UDP

πŸ“Š What Metrics Are Collected?

  • βœ… CPU: Usage, user/system time, I/O wait
  • βœ… RAM: Used, free, available, cached, swap
  • βœ… Disk: Usage per partition, inodes
  • βœ… Load: 1min, 5min, 15min averages
  • βœ… Processes: Top 10 by CPU/RAM usage
  • βœ… Uptime: System uptime and boot time

🌐 Network Requirements

The agent needs outbound UDP access to:

  • Host: api.checklogs.dev
  • Port: Your assigned UDP port (from dashboard)

No inbound ports needed!


πŸ†˜ Support


πŸ“„ License

MIT License - See LICENSE file for details.


πŸ™ Contributing

We welcome contributions! See our Agent Repository for the source code.


Made with ❀️ by CheckLogs Team