swtich from ELK to Loki!
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s

This commit is contained in:
Your Name
2025-09-20 12:01:25 +12:00
parent d32042e42d
commit f114773d78
62 changed files with 1121 additions and 2899 deletions

View File

@@ -1,34 +1,56 @@
# LogClient
# Log Client (Promtail)
Ships Docker container and system logs to LogServer using Filebeat.
Ships Docker and system logs to Log Server. Zero configuration!
## Quick Start
1. **Get API Key**
- Ask LogServer admin to run `./generate-api-key.sh`
- They'll provide your API key
2. **Configure**
Edit `config/service.env`:
1. **Configure** (edit `config/service.env`):
```bash
LOGSERVER_HOST=<server-ip>
LOGSERVER_PORT=5044
API_KEY=<your-api-key>
LOGSERVER_HOST=<server-ip> # Your log server IP
LOGSERVER_PORT=3100 # Default Loki port
LOKI_USER=logclient # Default username
LOKI_PASSWORD=<password> # Get from server admin
```
3. **Install**
2. **Install**:
```bash
dropshell install logclient
```
## What It Does
- Collects all Docker container logs via API
- Collects system logs (/var/log)
- Ships to central LogServer
- Works with any Docker logging driver
That's it! Logs are now shipping to your central server.
## Requirements
- Docker socket access
- Network connection to LogServer port 5044
## What Gets Sent
- All Docker container logs (via Docker API)
- System logs (/var/log/syslog)
- Auth logs (/var/log/auth.log)
- Hostname is automatically included
See [DOCUMENTATION.md](DOCUMENTATION.md) for full details.
## View Your Logs
Go to: `http://<logserver-ip>:3000`
- Click Dashboards → Central Logs
- Your server's logs appear with its hostname
## Features
- **Zero maintenance** - Just runs
- **Lightweight** - ~20MB RAM
- **Automatic** - Finds all containers
- **Labeled** - Hostname included automatically
## Simple Authentication
Just a username/password - much simpler than ELK's API key system!
## Troubleshooting
Check if client is running:
```bash
./status.sh
```
View client logs:
```bash
./logs.sh
```
Test connection to server:
```bash
nc -zv <logserver-ip> 3100
```