feat: add Prometheus and Grafana configurations and document Alpine Docker setup
This commit is contained in:
1 parent
78508ed16e
commit
72422f4336
4 files changed
+81
-6
No files matched your search
@@ -75,10 +75,6 @@ Thumbs.db
|
|||||||
*.tfstate.backup
|
*.tfstate.backup
|
||||||
.terraform/
|
.terraform/
|
||||||
|
|
||||||
# Monitoring & temp
|
|
||||||
prometheus/
|
|
||||||
grafana/
|
|
||||||
|
|
||||||
# Agent / Tool files
|
# Agent / Tool files
|
||||||
.github/instructions/TODO.md
|
.github/instructions/TODO.md
|
||||||
.github/instructions/DONE.md
|
.github/instructions/DONE.md
|
||||||
|
|||||||
@@ -249,8 +249,38 @@ For testing deployments on a local network server without setting up a full prod
|
|||||||
|
|
||||||
#### Test Environment Prerequisites
|
#### Test Environment Prerequisites
|
||||||
|
|
||||||
- A remote server running Docker at IP `192.168.88.40`.
|
- A remote server running Docker at IP `192.168.88.40` (running Alpine Linux).
|
||||||
- Docker TCP socket enabled and listening on port `2375` on the remote server (ensure this port is secured/firewalled to trusted local IPs only).
|
- Docker TCP socket enabled and listening on port `2375` on the remote server.
|
||||||
|
|
||||||
|
##### Enabling Docker TCP Socket on Alpine Linux
|
||||||
|
|
||||||
|
To allow the Gitea Actions runner (or your local machine) to deploy to the remote Alpine host, you must configure the Docker daemon to listen on the TCP socket:
|
||||||
|
|
||||||
|
1. Edit `/etc/conf.d/docker` on the Alpine host:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vi /etc/conf.d/docker
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Update the `DOCKER_OPTS` line to include both the unix socket and the TCP socket:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Restart the Docker service:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rc-service docker restart
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Verify that Docker is listening on port `2375`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
netstat -tlnp | grep 2375
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Ensure any firewall (like `awall` or `iptables`) on the Alpine host allows incoming traffic on port `2375` from your local network subnet (e.g., `192.168.88.0/24`).
|
||||||
|
|
||||||
#### Deployment Steps
|
#### Deployment Steps
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"title": "Linear Void Monitoring",
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"title": "Concurrent Viewers",
|
||||||
|
"type": "timeseries",
|
||||||
|
"targets": [{ "expr": "linearvoid_chat_connected_clients" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Stored Messages",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"expr": "linearvoid_chat_messages_total"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Moderation Actions",
|
||||||
|
"type": "timeseries",
|
||||||
|
"targets": [{ "expr": "linearvoid_chat_moderation_actions_total" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Redis Reachable",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{ "expr": "linearvoid_chat_redis_up" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Admin Sessions",
|
||||||
|
"type": "timeseries",
|
||||||
|
"targets": [{ "expr": "linearvoid_chat_admin_sessions_active" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Chat Scrape Health",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{ "expr": "up{job=\"chat\"}" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: "chat"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["chat:3000"]
|
||||||
|
- job_name: "prometheus"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["prometheus:9090"]
|
||||||
Reference in new issue
Block a user