obsidian: VictoriaLogs 중앙 로그 허브 통합 — 오사카 Vector + CrowdSec acquisition
- 오사카 APISIX에 Vector(Docker) 추가, VictoriaLogs ES bulk API로 로그 전송 - CrowdSec에 victorialogs acquisition (tail 모드) 추가, 서울+오사카 통합 수신 - anomaly-detect 설명에 오사카 포함 반영 - 기존 http-logger 직접 push는 레거시로 병행 유지 (추후 제거) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,7 @@ ssh incus-hp2 "incus exec anomaly-detect -- journalctl -u anomaly-detect.service
|
||||
|
||||
**월 비용 예상**: 평시 사이클당 ~$0.001-0.002, 5분 주기 × 288/일 × 30일 = **~$10-15/월**. DDoS 발생 시 사이클당 $0.01 수준 (massive_ddos 시나리오 기준)까지 튈 수 있으나 일시적.
|
||||
|
||||
[[crowdsec-safeline#~~ddos-detect (AI 행위 분석)~~ — 폐기 (2026-04-08)|폐기된 ddos-detect]] 후속. [[victorialogs|VictoriaLogs]]에 적재된 K3s 서울 APISIX access log를 5분마다 분석하여 봇/공격성 IP를 [[crowdsec-safeline|CrowdSec]]에 자동 ban으로 등록한다.
|
||||
[[crowdsec-safeline#~~ddos-detect (AI 행위 분석)~~ — 폐기 (2026-04-08)|폐기된 ddos-detect]] 후속. [[victorialogs|VictoriaLogs]]에 적재된 서울+오사카 APISIX access log를 5분마다 분석하여 봇/공격성 IP를 [[crowdsec-safeline|CrowdSec]]에 자동 ban으로 등록한다.
|
||||
|
||||
## 위치 / 사양
|
||||
|
||||
|
||||
@@ -32,23 +32,33 @@ Traefik DaemonSet (stdout JSON accessLog)
|
||||
| 인증 | `Authorization: traefik-crowdsec-log-2024` |
|
||||
| 파서 | `crowdsecurity/traefik-logs` (Hub, JSON 모드) |
|
||||
|
||||
### APISIX → CrowdSec (http-logger)
|
||||
### APISIX → VictoriaLogs → CrowdSec (서울+오사카 통합)
|
||||
|
||||
```
|
||||
APISIX K3s 서울 (apisix ns, global_rules http-logger 플러그인)
|
||||
→ 배치 50건, 5초 buffer
|
||||
→ CrowdSec HTTP acquisition (:8085/apisix-logs)
|
||||
서울 APISIX (K3s) stdout → Vector DaemonSet → VictoriaLogs (ES bulk API)
|
||||
오사카 APISIX (Docker) stdout → Vector (Docker) → VictoriaLogs (ES bulk API)
|
||||
→ CrowdSec victorialogs acquisition (tail 모드, 실시간)
|
||||
→ custom/apisix-json-logs 파서
|
||||
+ anomaly-detect (5분 폴링, AI 분석)
|
||||
```
|
||||
|
||||
| 항목 | 값 |
|
||||
|------|-----|
|
||||
| 송신처 | **K3s 서울 APISIX 단독** (osaka는 송신 안 함, zlambda는 라우트 비어있음) |
|
||||
| 설정 | K3s APISIX Admin API `global_rules/http-logger` (`uri: http://10.253.100.240:8085/apisix-logs`) |
|
||||
| VictoriaLogs | `vl.inouter.com` (K3s logging ns, Traefik IngressRoute) |
|
||||
| CrowdSec acquisition | `/etc/crowdsec/acquis.d/victorialogs-apisix.yaml` (`source: victorialogs`, `mode: tail`, `query: program:apisix log_type:access`) |
|
||||
| 서울 Vector | K3s DaemonSet (Helm `vector/vector`), `parse_apisix` transform → `vlogs` ES sink |
|
||||
| 오사카 Vector | Docker `timberio/vector:0.45.0-debian`, `/etc/vector/vector.yaml`, `docker_logs` source → `parse_apisix` → `vlogs` ES sink. `location: osaka` 필드 추가 |
|
||||
| 파서 | `custom/apisix-json-logs` (로컬) |
|
||||
|
||||
### APISIX → CrowdSec (http-logger, 레거시 — 병행 중)
|
||||
|
||||
서울 APISIX가 CrowdSec HTTP acquisition으로 직접 push하는 기존 경로. VictoriaLogs 경로와 이중 수신 중이며 추후 제거 예정.
|
||||
|
||||
| 항목 | 값 |
|
||||
|------|-----|
|
||||
| 설정 | K3s APISIX GatewayProxy `global_rules/http-logger` (`uri: http://10.253.100.240:8085/apisix-logs`) |
|
||||
| CrowdSec 포트 | 8085 |
|
||||
| 인증 | `Authorization: apisix-crowdsec-log-2024` |
|
||||
| 파서 | `custom/apisix-json-logs` (로컬) |
|
||||
| osaka의 처리 | 송신은 안 하고 `crowdsec-bouncer` 글로벌 플러그인으로 결정 **소비**만. `real-ip` 플러그인도 글로벌. |
|
||||
|
||||
### APISIX → log-collector → CrowdSec (sandbox-tokyo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user