Skip to content

Commit

Permalink
feat: self monitoring of logs using pino-loki
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxken committed Apr 8, 2024
1 parent 14c966a commit 789fd6f
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 17 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ To configure the project you have to register (set) environment variables on you
```ini
GRAFANA_URL=""
LOKI_URL=""

SERVER_HOST=xxx.domain.com
SERVER_PORT=4000

# SSL/TLS Configuration
SERVER_SSL_ENABLED=false
# Enable if behind a proxy like Nginx or Haproxy
SERVER_SSL_CERT=/absolute/path/to/file.crt
SERVER_SSL_KEY=/absolute/path/to/file.key

# Enable if behind a proxy like NGINX or Haproxy
TRUST_PROXY=false

# Automatically forward pino (logger) logs to LOKI_URL
SELF_MONITORING=false
```

### Let's go baby 🔥
Expand All @@ -48,7 +58,8 @@ const envSchema = z.object({
SERVER_SSL_ENABLED: z.boolean().optional().default(false),
SERVER_SSL_CERT: z.string().optional(),
SERVER_SSL_KEY: z.string().optional(),
TRUST_PROXY: z.boolean().optional().default(false)
TRUST_PROXY: z.boolean().optional().default(false),
SELF_MONITORING: z.coerce.boolean().optional().default(false)
});
```

Expand Down
Loading

0 comments on commit 789fd6f

Please sign in to comment.