swtich from ELK to Loki!
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
This commit is contained in:
@@ -1,50 +1,73 @@
|
||||
# LogServer
|
||||
# Log Server (Loki + Grafana)
|
||||
|
||||
Centralized logging with ELK Stack (Elasticsearch, Logstash, Kibana).
|
||||
Central log server using Grafana + Loki. MUCH simpler than ELK/Kibana!
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. **System Setup**
|
||||
```bash
|
||||
sudo sysctl -w vm.max_map_count=262144
|
||||
```
|
||||
|
||||
2. **Configure**
|
||||
Edit `config/service.env`:
|
||||
- Set `SERVER_PUBLICBASEURL` to your actual server URL
|
||||
- Set `KIBANA_USERNAME` to your preferred username
|
||||
- Change `KIBANA_USER_PASSWORD` from default
|
||||
|
||||
3. **Install**
|
||||
1. **Install**
|
||||
```bash
|
||||
dropshell install logserver
|
||||
```
|
||||
|
||||
4. **Generate Client Keys**
|
||||
2. **Access Web UI**
|
||||
- URL: `http://<server-ip>:3000`
|
||||
- Login: `admin` / `changeme` (set in service.env)
|
||||
|
||||
3. **View Logs**
|
||||
- Click **Dashboards** (4 squares icon)
|
||||
- Click **"Central Logs"**
|
||||
- All logs from all servers appear!
|
||||
|
||||
## For Client Servers
|
||||
|
||||
On each server that should send logs here:
|
||||
|
||||
1. Edit `logclient/config/service.env`:
|
||||
```bash
|
||||
./generate-api-key.sh
|
||||
# Enter hostname when prompted
|
||||
# Save the API key for client configuration
|
||||
LOGSERVER_HOST=<this-server-ip>
|
||||
LOGSERVER_PORT=3100
|
||||
LOKI_USER=logclient # Default username
|
||||
LOKI_PASSWORD=<your-password> # From server's service.env
|
||||
```
|
||||
|
||||
5. **Setup Kibana** (first time only)
|
||||
2. Install the client:
|
||||
```bash
|
||||
./setup-kibana.sh
|
||||
dropshell install logclient
|
||||
```
|
||||
|
||||
6. **Access Kibana**
|
||||
- URL: `http://<server-ip>:5601`
|
||||
- Username: Set in `service.env` (KIBANA_USERNAME, default: `admin`)
|
||||
- Password: Set in `service.env` (KIBANA_USER_PASSWORD)
|
||||
- Click "Discover" → View your logs!
|
||||
## Features
|
||||
- **Super simple interface** - Just one dashboard
|
||||
- **Lightweight** - Uses 10x less resources than ELK
|
||||
- **Real-time** - Logs appear instantly
|
||||
- **Multi-server** - See all servers in one place
|
||||
- **Automatic labels** - Filter by hostname, container, etc.
|
||||
|
||||
## Security
|
||||
- Loki endpoint requires authentication (HTTP Basic Auth)
|
||||
- Default: `logclient` / `changeme`
|
||||
- **IMPORTANT**: Change `LOKI_PASSWORD` in service.env!
|
||||
|
||||
## Ports
|
||||
- `5601` - Kibana Web UI
|
||||
- `5044` - Log ingestion (Filebeat)
|
||||
- `3000` - Grafana Web UI
|
||||
- `3100` - Loki API (authenticated)
|
||||
|
||||
## Files
|
||||
- `config/service.env` - Configuration
|
||||
- `config/api-keys.yml` - Client API keys
|
||||
- `generate-api-key.sh` - Add new clients
|
||||
## How to Use
|
||||
|
||||
See [DOCUMENTATION.md](DOCUMENTATION.md) for full details.
|
||||
### Filter by Server
|
||||
- Use the "Server" dropdown at the top
|
||||
- Or click any `hostname` label
|
||||
|
||||
### Filter by Container
|
||||
- Click any `container_name` label
|
||||
|
||||
### Search Text
|
||||
- Use the search box in each panel
|
||||
|
||||
### Time Range
|
||||
- Top-right corner - adjust as needed
|
||||
|
||||
## Why This Instead of ELK?
|
||||
- **10x simpler** - One clean dashboard vs Kibana complexity
|
||||
- **10x smaller** - ~200MB RAM vs 2-3GB for ELK
|
||||
- **Zero configuration** - Just works
|
||||
- **Fast setup** - No index patterns, mappings, or complexity
|
Reference in New Issue
Block a user