deprecate anomaly-detect (오탐 다수로 인스턴스까지 제거)

원인: Grok-4-fast agentic 분석기가 더미 IP(1.1.1.1, 1.2.3.4 시퀀스),
Cloudflare 엣지 IP(172.70.x), 자체 Linode IDC 대역(45.79.x)을
path-enumeration으로 오탐 ban. 같은 기간 hub 시나리오는 진짜 스캐너
1건(India SoloRDP)을 정확히 잡음.

작업:
- infra/platform/anomaly-detect.md → deprecated stub
- history/2026-04-25-anomaly-detect-removal.md 신규 (폐기 사유, 재가동 조건 정리)
- crowdsec-safeline.md acquisition 다이어그램에서 anomaly-detect 분기 제거
- infra/compute/infra-hosts.md hp2 default 5→4 갱신
- infra/platform/_index.md, history/_index.md 인덱스 갱신
- infra/security/vault.md apps 목록에서 항목 제거 (apps/anomaly-detect 경로는 비어있음, 유지)

보존:
- Vault secret/ai/openrouter (다른 서비스 공용 가능성)
- Gitea kaffa/anomaly-detect repo (재구축 reference)
This commit is contained in:
kaffa
2026-04-25 15:00:13 +09:00
parent ffdabc994b
commit 46cb3236d3
7 changed files with 94 additions and 171 deletions

View File

@@ -0,0 +1,62 @@
---
title: anomaly-detect 폐기 (오탐 다수)
updated: 2026-04-25
tags: [security, crowdsec, anomaly-detect, deprecation]
---
# anomaly-detect 인스턴스 완전 제거 (2026-04-25)
## 결정
[[../infra/platform/anomaly-detect|anomaly-detect]] (Grok-4-fast agentic 분석기)를 컨테이너 포함 완전 제거.
## 폐기 사유
CrowdSec active decision 점검 중 anomaly-detect가 발급한 ban이 사실상 모두 오탐임을 확인.
### 오탐 사례 (2026-04-19 ~ 2026-04-24 alerts metrics 기준)
| ban된 IP | 시나리오 | 의심 사유 |
|---|---|---|
| `1.1.1.1`, `2.2.2.2`, `3.3.3.3`, `4.4.4.4`, `5.5.5.5` | path-enumeration | 명백한 시퀀스/예시 IP. 1.1.1.1은 Cloudflare DNS |
| `1.2.3.4`, `5.6.7.8`, `9.10.11.12`, `13.14.15.16` | path-enumeration | 튜토리얼/예제용 더미 IP 패턴 |
| `172.70.242.122` | path-enumeration | **Cloudflare 엣지 IP 대역** (172.70.0.0/16). real IP 추출 실패 의심 |
| `45.79.164.218`, `45.79.207.123`, `45.79.218.123/124`, `45.79.245.123` | path-enumeration | **Linode 도쿄 IDC 대역** — Netbis NPM 오리진과 같은 IDC. 자체 인프라 가능성 |
| `203.133.168.226/227/228` | path-enumeration | 동일 ASN 연속 IP — NAT 통합 환경과 공격 구분 실패 |
같은 기간 hub 시나리오는 단 1건(`103.215.74.213`, India SoloRDP)만 잡았고 그것이 진짜 스캐너였음 (`http-probing` + `http-sensitive-files` + `http-crawl-non_statics` 동시 매칭).
### 추정 원인
1. **Grok-4-fast의 LogSQL 결과 해석 오류**: APISIX access log에 합성/health-check/tutorial 트래픽이 섞여있고, agent가 이를 "여러 IP가 같은 path 열거"로 분류
2. **real IP 추출 검증 부재**: `172.70.x.x` ban이 통과한 건 Cloudflare 엣지 IP를 client_ip로 받았다는 의미. APISIX `real_ip_from`에 CF 엣지 대역이 빠진 가능성
3. **자체 인프라 whitelist 부재**: Linode IDC `45.79.x` 대역이 화이트리스트에 없음
## 작업 내역 (헤임달 위임)
| 단계 | 명령 | 위치 |
|---|---|---|
| 1 | `systemctl stop anomaly-detect.timer anomaly-detect.service` + `disable` | incus-hp2 / `anomaly-detect` 컨테이너 |
| 2 | `cscli decisions delete --origin crowdsec` (활성 2건 해제: `45.94.31.74`, `45.76.123.45`) | jp1 incus / `crowdsec` 컨테이너 |
| 3 | `incus stop anomaly-detect; incus delete anomaly-detect` | incus-hp2 |
| 4 | `cscli machines delete <anomaly-detect watcher>` | jp1 incus / `crowdsec` 컨테이너 |
## 보존 항목
- **Vault `secret/ai/openrouter`**: OpenRouter API 키. 다른 서비스가 공용으로 사용할 가능성이 있어 삭제하지 않고 보존.
- **Gitea `kaffa/anomaly-detect` private repo**: 코드 reference로 보존 (재구축 시 참고).
## 향후 재가동 조건
재도입 시 다음 항목 선행 필수:
1. APISIX access log 합성/health-check 트래픽 사전 필터링 (Vector transform 단계)
2. APISIX `real_ip_from`에 Cloudflare 엣지 대역 (`173.245.48.0/20`, `103.21.244.0/22`, `103.22.200.0/22`, `103.31.4.0/22`, `141.101.64.0/18`, `108.162.192.0/18`, `190.93.240.0/20`, `188.114.96.0/20`, `197.234.240.0/22`, `198.41.128.0/17`, `162.158.0.0/15`, `104.16.0.0/13`, `104.24.0.0/14`, `172.64.0.0/13`, `131.0.72.0/22`) 추가 검증
3. Linode 도쿄 IDC 대역 (45.79.x 등 자체 인프라 IDC) whitelist 등록
4. dry_run으로 최소 1주 운영 후 임계값 조정
## 참고
- 정본 stub: [[../infra/platform/anomaly-detect]] (deprecated marker만 남김)
- 이전 설계 반복 이력: [[2026-04-08-anomaly-detect-iterations]]
- CrowdSec LAPI 정본: [[../infra/security/crowdsec-safeline]]

View File

@@ -1,6 +1,6 @@
--- ---
title: history 인덱스 title: history 인덱스
updated: 2026-04-16 updated: 2026-04-25
tags: [moc, history] tags: [moc, history]
--- ---
@@ -31,3 +31,4 @@ tags: [moc, history]
| [[2026-04-16-pgcat-patroni-tcp-keepalive]] | pgcat + Patroni TCP keepalive 적용 | | [[2026-04-16-pgcat-patroni-tcp-keepalive]] | pgcat + Patroni TCP keepalive 적용 |
| [[2026-04-16-pgpool-full-migration]] | pgpool-II 전면 전환 + pgcat 퇴역 | | [[2026-04-16-pgpool-full-migration]] | pgpool-II 전면 전환 + pgcat 퇴역 |
| [[2026-04-16-pgpool-n8n-poc]] | pgpool-II PoC (n8n 전용 전환) | | [[2026-04-16-pgpool-n8n-poc]] | pgpool-II PoC (n8n 전용 전환) |
| [[2026-04-25-anomaly-detect-removal]] | anomaly-detect 폐기 (오탐 다수, 컨테이너 포함 완전 제거) |

View File

@@ -1,6 +1,6 @@
--- ---
title: 인프라 호스트 및 네트워크 title: 인프라 호스트 및 네트워크
updated: 2026-04-09 정합성 점검 — Incus 3호스트 라이브 전수, ArgoCD/Helm/Vault/etcd/anomaly-detect drift 정리 updated: 2026-04-25 anomaly-detect 폐기 반영 (hp2 default 5→4)
tags: [infra, network, kr-zone, openwrt] tags: [infra, network, kr-zone, openwrt]
--- ---
@@ -199,7 +199,6 @@ db (proxysql, pgcat), kroki, mq (RabbitmqCluster CR), openmemory (mcp/ui/qdrant)
| searxng | K3s 클러스터 (searxng ns) | kubectl | | searxng | K3s 클러스터 (searxng ns) | kubectl |
| juice-shop | K3s 클러스터 (juiceshop ns, 별도 jp1 default 프로젝트에도 컨테이너 존재) | kubectl | | juice-shop | K3s 클러스터 (juiceshop ns, 별도 jp1 default 프로젝트에도 컨테이너 존재) | kubectl |
| Teleport / sftpgo / sshpiper / searxng / Outline | K3s 클러스터 (각자 전용 ns) | kubectl | | Teleport / sftpgo / sshpiper / searxng / Outline | K3s 클러스터 (각자 전용 ns) | kubectl |
| anomaly-detect | hp2 incus default 프로젝트 컨테이너 `anomaly-detect` (10.100.2.164, 2026-04-08~) | incus exec |
| Prometheus, Grafana (인프라 metric 백업) | jp1 monitoring 프로젝트 (Grafana 10.253.103.199, Prometheus 10.253.100.193) — 일상 운영은 K3s VictoriaMetrics 스택 사용 | incus exec --project monitoring | | Prometheus, Grafana (인프라 metric 백업) | jp1 monitoring 프로젝트 (Grafana 10.253.103.199, Prometheus 10.253.100.193) — 일상 운영은 K3s VictoriaMetrics 스택 사용 | incus exec --project monitoring |
| DB 서버 (jp1 db 프로젝트) | jp1 db 프로젝트: etcd-1 | incus exec --project db | | DB 서버 (jp1 db 프로젝트) | jp1 db 프로젝트: etcd-1 | incus exec --project db |
| DB (분산 mariadb/postgres) | mariadb-1/postgres-1 (hp2), mariadb-2/postgres-2 (kr1), mariadb-3/postgres-3 (kr2) — 각 서울 노드 default 프로젝트 | incus exec | | DB (분산 mariadb/postgres) | mariadb-1/postgres-1 (hp2), mariadb-2/postgres-2 (kr1), mariadb-3/postgres-3 (kr2) — 각 서울 노드 default 프로젝트 | incus exec |
@@ -226,7 +225,7 @@ db (proxysql, pgcat), kroki, mq (RabbitmqCluster CR), openmemory (mcp/ui/qdrant)
| kr1 | ops | 1 | heimdall (tofu 관리) | | kr1 | ops | 1 | heimdall (tofu 관리) |
| kr2 | default | 2 | mariadb-3, postgres-3 | | kr2 | default | 2 | mariadb-3, postgres-3 |
| kr2 | inbest | 7 | cloudflared 포함 | | kr2 | inbest | 7 | cloudflared 포함 |
| hp2 | default | 5 | anomaly-detect 포함 | | hp2 | default | 4 | jarvis, mariadb-1, postgres-1, trader (anomaly-detect 폐기 2026-04-25) |
| hp2 | inbest | 0 | 프로젝트만 존재, 인스턴스 없음 | | hp2 | inbest | 0 | 프로젝트만 존재, 인스턴스 없음 |
스토리지 풀: jp1=`btrfs-pool` (btrfs, /dev/sda1 268G/109G used), kr1=`default` (dir, NVMe 937G/115G used), kr2=`default` (dir, NVMe 937G/115G used), hp2=`default` (btrfs, `/dev/mapper/pve-root` 126G/63G used — Proxmox 잔재 LVM 레이아웃). 스토리지 풀: jp1=`btrfs-pool` (btrfs, /dev/sda1 268G/109G used), kr1=`default` (dir, NVMe 937G/115G used), kr2=`default` (dir, NVMe 937G/115G used), hp2=`default` (btrfs, `/dev/mapper/pve-root` 126G/63G used — Proxmox 잔재 LVM 레이아웃).
@@ -261,7 +260,7 @@ db (proxysql, pgcat), kroki, mq (RabbitmqCluster CR), openmemory (mcp/ui/qdrant)
### hp2 컨테이너 ### hp2 컨테이너
**default 프로젝트** (5): **anomaly-detect** (10.100.2.164, 2026-04-08 신규), jarvis (10.100.2.162), mariadb-1 (10.100.2.234), postgres-1 (10.100.2.5), trader (10.100.2.9) **default 프로젝트** (4): jarvis (10.100.2.162), mariadb-1 (10.100.2.234), postgres-1 (10.100.2.5), trader (10.100.2.9). _anomaly-detect (10.100.2.164)는 2026-04-25 폐기 — [[../../history/2026-04-25-anomaly-detect-removal|history]]_
**inbest 프로젝트** (0): 프로젝트만 존재, 인스턴스 없음 (default profile만 사용 중). kr2 inbest와 페어 구성을 고려해 만들어둔 빈 프로젝트로 보임. **inbest 프로젝트** (0): 프로젝트만 존재, 인스턴스 없음 (default profile만 사용 중). kr2 inbest와 페어 구성을 고려해 만들어둔 빈 프로젝트로 보임.

View File

@@ -1,6 +1,6 @@
--- ---
title: platform 인덱스 title: platform 인덱스
updated: 2026-04-23 updated: 2026-04-25
tags: [moc, platform] tags: [moc, platform]
--- ---
@@ -8,7 +8,7 @@ tags: [moc, platform]
| 문서 | 설명 | | 문서 | 설명 |
|------|------| |------|------|
| [[anomaly-detect]] | 이상 트래픽 감지 (VictoriaLogs + Grok-4 agentic) | | ~~[[anomaly-detect]]~~ | 이상 트래픽 감지 **폐기 2026-04-25** ([[../../history/2026-04-25-anomaly-detect-removal|history]]) |
| [[brokkr]] | Brokkr 홈페이지 제작 에이전트 | | [[brokkr]] | Brokkr 홈페이지 제작 에이전트 |
| [[helm-charts]] | Helm 차트 관리 체계 (ArgoCD GitOps) | | [[helm-charts]] | Helm 차트 관리 체계 (ArgoCD GitOps) |
| [[infra-forge]] | Forge 인프라 에이전트 (지식 베이스 + LLM 보고) | | [[infra-forge]] | Forge 인프라 에이전트 (지식 베이스 + LLM 보고) |

View File

@@ -1,171 +1,29 @@
--- ---
title: anomaly-detect (VictoriaLogs + ollama 기반 이상 트래픽 감지) title: anomaly-detect (폐기 2026-04-25)
updated: 2026-04-08 agentic 재설계 updated: 2026-04-25
tags: [security, crowdsec, victorialogs, ollama, gemma, anomaly] tags: [security, crowdsec, deprecated]
status: deprecated
--- ---
> 코드: `gitea.inouter.com/kaffa/anomaly-detect` (private) > [!warning] 폐기됨 (2026-04-25)
> 아키텍처: OpenRouter agentic (Grok-4-fast) + VictoriaLogs tool + CrowdSec LAPI tool > Grok-4-fast agentic 분석기가 더미 IP(1.1.1.1, 1.2.3.4 시퀀스), Cloudflare 엣지 IP(172.70.x), 자체 Linode IDC 대역(45.79.x)을 path-enumeration으로 오탐 ban하는 사례 다수 확인.
> 컨테이너 포함 완전 제거. 폐기 경과 및 재가동 조건: [[../../history/2026-04-25-anomaly-detect-removal|history]]
# anomaly-detect ## 보존된 자산
## 아키텍처 | 항목 | 위치 | 비고 |
|---|---|---|
| 코드 | `gitea.inouter.com/kaffa/anomaly-detect` (private) | 재구축 reference |
| Vault | `secret/ai/openrouter` (OpenRouter API key) | 다른 서비스 공용 가능성 — 보존 |
| 설계 이력 | [[../../history/2026-04-08-anomaly-detect-iterations]] | 1차 stats → 2차 cohort → 3차 agentic 반복 |
OpenRouter `x-ai/grok-4-fast`에 tool 2개(logsql_query, ban_ips)만 노출하는 agentic 구조. fallback 모델 `qwen/qwen3-235b-a22b-2507`. ## 제거된 자산
설계 반복 및 모델 벤치마크 이력: [[2026-04-08-anomaly-detect-iterations|history]] - incus-hp2 `anomaly-detect` 컨테이너 (10.100.2.164)
- systemd `anomaly-detect.timer` / `anomaly-detect.service`
- CrowdSec LAPI watcher 등록
- 활성 decision 2건 (`45.94.31.74`, `45.76.123.45`)
### 새 아키텍처 ## CrowdSec 시나리오 잔재
``` `anomaly-detect/path-enumeration`, `anomaly-detect/brute-force` 시나리오 이름은 본인이 발급한 alert에만 등장. CrowdSec Hub 표준 시나리오가 아니라 LAPI 측에서 별도 정리 불필요.
systemd timer (5분)
analyzer.py (Python oneshot)
├─ OpenRouter → x-ai/grok-4-fast (tools=[logsql_query, ban_ips])
├─ agent loop (max 10턴)
│ ├─ tool: logsql_query(query, start, limit) — VictoriaLogs 자유 조회
│ │ ※ 응답에서 사설망/Tailscale/RFC5737 IP 자동 제거 (서버측 guardrail)
│ └─ tool: ban_ips(ips, reason, scenario) — CrowdSec LAPI batch POST
│ ※ dedup 24h, MAX_BAN_PER_CYCLE cap, 사설망 거부
├─ DRY_RUN=1 (기본): ban_ips가 "would ban" 로그만 찍고 실제 POST 안 함
└─ dedup.json 갱신
```
### 환경변수
| 변수 | 기본값 | 비고 |
|------|--------|------|
| `OPENROUTER_API_KEY` | (from `/etc/anomaly-detect/openrouter.env`) | Vault `secret/ai/openrouter` |
| `OR_MODEL` | `x-ai/grok-4-fast` | 주 모델 |
| `OR_FALLBACK_MODEL` | `qwen/qwen3-235b-a22b-2507` | OR 장애 시 재시도 |
| `WINDOW_MIN` | 5 | 조사 윈도우 |
| `MAX_TURNS` | 10 | agent loop 상한 |
| `MAX_BAN_PER_CYCLE` | 2000 | 한 사이클 ban 상한 (대규모 DDoS 대비) |
| `LAPI_BAN_CHUNK` | 500 | LAPI POST를 500건씩 쪼개 발송 (부분 실패 허용) |
| `BAN_DURATION` | 4h | |
| `DRY_RUN` | **1** | ⚠ 초기 안전장치 |
### 서버측 guardrail (중요)
LLM은 지시만 받고 강제할 수 없다. 따라서 `logsql_query``ban_ips` 두 tool 모두 **파이썬 코드 레벨에서** 다음을 enforce:
- `is_skippable_ip()`: `ipaddress.is_private` + Tailscale 100.64/10 + RFC5737 TEST-NET-2/3 포함
- Python 3.9의 `ipaddress.ip_address('203.0.113.42').is_private == True` — 문서 IP도 자동 차단됨 (2026-04-08 벤치마크에서 확인)
LLM 프롬프트가 무시되어도 실수로 사설망이 ban되지 않음.
### Vault 위치
- OpenRouter key: `secret/ai/openrouter` (`API_KEY` 키)
- 컨테이너 배포본: `/etc/anomaly-detect/openrouter.env` (mode 600, systemd `EnvironmentFile=`)
### 운영 중 주의사항
- **injected 로그 잔재**: E2E 테스트 중 주입한 270 rows가 vlogs retention 기간 동안 남음. `sim_e2e` 마커 필드로 식별 가능. 다음 cycle에서 다시 탐지될 수 있으나 dedup 24h으로 재ban 차단됨.
- **재테스트 시**: 테스트 후 반드시 `cscli decisions delete -s anomaly-detect/<scenario>` + `/var/lib/anomaly-detect/dedup.json` 업데이트 (해당 IP 추가하거나 리셋)
### 비용 모니터링
매 사이클 journalctl에 한 줄 요약 출력 (`48eb489` 이후):
```
cycle usage: turns=5 prompt=9142 completion=2670 total=11812 cost=$0.001866
```
집계 명령:
```bash
# 오늘 누적
ssh incus-hp2 "incus exec anomaly-detect -- bash -c '
journalctl -u anomaly-detect.service --since today --no-pager |
grep -oE \"cost=\\\$[0-9.]+\" |
awk -F\\\$ \"{sum+=\\\$2} END {printf \\\"today: \\\$%.6f (%d cycles)\\n\\\", sum, NR}\"
'"
# 사이클별 상세
ssh incus-hp2 "incus exec anomaly-detect -- journalctl -u anomaly-detect.service --since today --no-pager | grep 'cycle usage'"
```
**OpenRouter `/activity` API의 지연** (~2-3주)으로 실시간 비용 조회는 여기(journalctl) 경로를 써야 한다. dashboard는 https://openrouter.ai/activity 에서 UI 확인 가능 (더 빠름). management(provisioning) 키는 Vault `secret/ai/openrouter``PROVISIONING_KEY` 에 저장됨.
**월 비용 예상**: 평시 사이클당 ~$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]]에 적재된 서울+오사카 APISIX access log를 5분마다 분석하여 봇/공격성 IP를 [[crowdsec-safeline|CrowdSec]]에 자동 ban으로 등록한다.
## 위치 / 사양
| 항목 | 값 |
|------|-----|
| 호스트 | incus-hp2 |
| 컨테이너 | `anomaly-detect` (default 프로젝트, Debian 13 trixie) |
| IP | 10.100.2.164 |
| 사양 | 1 vCPU, 512MB RAM, 5GB |
| 설치 경로 | `/opt/anomaly-detect/{venv,analyzer.py}`, `/etc/anomaly-detect/lapi.yaml`, `/etc/anomaly-detect/openrouter.env`, `/var/lib/anomaly-detect/dedup.json` |
| systemd | `anomaly-detect.service` (oneshot) + `anomaly-detect.timer` (`OnCalendar=*:0/5`, `Persistent=true`, `RandomizedDelaySec=20`) |
## 데이터 흐름
```
[5분 주기 systemd timer]
analyzer.py
├─ 1) https://vl.inouter.com — LogsQL: program:apisix log_type:access 지난 5분
├─ 2) per-IP 통계 게이트 (count/4xx/5xx/499/distinct paths)
├─ 3) 후보 N개 (default max 5)
├─ 4) 각 후보 → http://100.87.221.126:11434/api/generate (kaffa-macmini ollama)
│ 모델: gemma4:e4b (Q4_K_M, 8.0B), format=json
├─ 5) verdict=yes → CrowdSec LAPI alert POST
│ http://10.253.100.240:8080/v1/alerts
│ profiles.yaml의 default_ip_remediation이 자동 ban 생성
└─ 6) dedup.json에 처리 IP + 타임스탬프 기록 (24h 내 재처리 안 함)
```
## CrowdSec LAPI 등록
`anomaly-detect`라는 watcher machine을 jp1 crowdsec에 등록하고, credentials를 컨테이너 안 `/etc/anomaly-detect/lapi.yaml`에 저장:
```yaml
url: http://10.253.100.240:8080
login: anomaly-detect
password: <vault: secret/apps/anomaly-detect>
```
> [!warning] cscli machines add 함정
> `cscli machines add NAME --auto`는 default로 `/etc/crowdsec/local_api_credentials.yaml`을 덮어씀 — 이건 jp1 crowdsec **daemon 자체의 LAPI 클라이언트 설정**이라 덮어쓰면 daemon이 새 password로 LAPI 인증을 시도하면서 동기화가 깨짐. 반드시 `--file <별도 경로>` 옵션을 줘야 한다. 만약 실수로 덮어썼다면 `cscli machines add <default-machine-name> --auto --force --file /etc/crowdsec/local_api_credentials.yaml`로 default machine 새 credentials 발급 후 `systemctl reload crowdsec`로 복구.
## 운영 명령
```bash
# 컨테이너 진입
ssh incus-hp2 'incus exec anomaly-detect -- bash'
# 수동 1회 실행
incus exec anomaly-detect -- /opt/anomaly-detect/venv/bin/python /opt/anomaly-detect/analyzer.py
# 상태
incus exec anomaly-detect -- systemctl status anomaly-detect.timer
incus exec anomaly-detect -- journalctl -u anomaly-detect.service --since "30 minutes ago"
# dedup 초기화 (모든 IP 재분석 허용)
incus exec anomaly-detect -- sh -c 'echo "{}" > /var/lib/anomaly-detect/dedup.json'
# 게이트/모델/주기 변경 → /etc/systemd/system/anomaly-detect.service의 Environment=
```
## 검증 (최초 배포)
- `cscli machines list``anomaly-detect` 등록 확인
- `curl https://vl.inouter.com/select/logsql/query?query=program:apisix\&limit=1` 200 OK (컨테이너 내부)
- `curl http://100.87.221.126:11434/api/tags``gemma4:e4b` 노출
- `curl http://10.253.100.240:8080/v1/decisions` → 403 (인증 필요, 네트워크 OK)
- 더미 IP `198.51.100.99`로 alert POST → 201 + decision 등록 → cleanup 확인 (smoke test)
## 향후 작업
- [ ] **[Medium]** Discord webhook 알림 추가 (`secret/apps/discord` Vault에서 가져오기) + systemd `OnFailure=` drop-in
- [ ] **[Low]** CrowdSec alert `origin``"crowdsec"``"anomaly-detect"`로 태깅
전임자 (`ddos-detect`, 1/2차 구현) 폐기 이력: [[2026-04-08-anomaly-detect-iterations|history]]

View File

@@ -43,9 +43,12 @@ Netbis NPM 6대 nginx file → Vector → zlambda─┘
CrowdSec victorialogs acquisition (tail, 실시간, 단일 query OR로 통합) CrowdSec victorialogs acquisition (tail, 실시간, 단일 query OR로 통합)
→ custom/apisix-json-logs 파서 + crowdsecurity/nginx-logs (NPM 호환) → custom/apisix-json-logs 파서 + crowdsecurity/nginx-logs (NPM 호환)
+ anomaly-detect (5분 폴링, AI 분석)
``` ```
> [!note] anomaly-detect 분기 제거 (2026-04-25)
> 기존 `+ anomaly-detect (5분 폴링, AI 분석)` 분기는 폐기. [[../platform/anomaly-detect|anomaly-detect]] 인스턴스 완전 제거. [[../../history/2026-04-25-anomaly-detect-removal|history]]
| 항목 | 값 | | 항목 | 값 |
|------|-----| |------|-----|
| VictoriaLogs | `vl.inouter.com` (K3s logging ns, Traefik IngressRoute) | | VictoriaLogs | `vl.inouter.com` (K3s logging ns, Traefik IngressRoute) |

View File

@@ -32,7 +32,7 @@ Vault root token은 만료 없음 (TTL: 0s)
| 카테고리 | 경로 | 내용 | | 카테고리 | 경로 | 내용 |
|----------| ai/ | brave, context7, deepseek, google/drive-mcp, openai, openrouter, pinecone, testsprite, vertex | |----------| ai/ | brave, context7, deepseek, google/drive-mcp, openai, openrouter, pinecone, testsprite, vertex |
| apps/ | anomaly-detect, cfb-manager, cf-multisite, discord, figma, gitea, gitea/registry, k3s, myapp, n8n, nocodb, ops-agents-ssh, outline, portainer, postgres, sftpgo, telegram-ai-support, trader, twilio, waf-saas | | apps/ | cfb-manager, cf-multisite, discord, figma, gitea, gitea/registry, k3s, myapp, n8n, nocodb, ops-agents-ssh, outline, portainer, postgres, sftpgo, telegram-ai-support, trader, twilio, waf-saas (anomaly-detect 폐기 2026-04-25 — apps 경로는 비어있음, 유지) |
| auth/ | api-keys/openai, api-keys/stripe, github/oauth-gitea, google/ca/external-account-key, google/ca/service-account, google/oauth-gitea | | auth/ | api-keys/openai, api-keys/stripe, github/oauth-gitea, google/ca/external-account-key, google/ca/service-account, google/oauth-gitea |
| cloud/ | alibaba, aws, backblaze, backblaze/restic, bunnycdn, cloudflare, cloudflare-netbis, cloudflare/r2, cloudflare/turnstile-crowdsec-captcha, cloudflare/turnstile-inouter-bunny, latitude, lightsail, linode, r2-gitea, r2-multisite, r2-sftpgo, supabase, vultr, zenlayer | | cloud/ | alibaba, aws, backblaze, backblaze/restic, bunnycdn, cloudflare, cloudflare-netbis, cloudflare/r2, cloudflare/turnstile-crowdsec-captcha, cloudflare/turnstile-inouter-bunny, latitude, lightsail, linode, r2-gitea, r2-multisite, r2-sftpgo, supabase, vultr, zenlayer |
| company/ | bank, info, ironclad, korbit, koreaexim, popbill | | company/ | bank, info, ironclad, korbit, koreaexim, popbill |