Verified removed across all 3 sites: - K3s APISIX: no http-logger plugin in global_rules/routes/services/plugin_configs - CrowdSec: no apisix-logs HTTP acquisition file, :8085 not listening - Osaka APISIX: http-logger exists but targets VictoriaLogs (vector.inouter.com), not legacy Runtime verification via cs_parser_hits metrics: only source is https://vl.inouter.com/ (victorialogs type). Split detailed findings to history/2026-04-15-apisix-http-logger-removal.md.
104 lines
3.9 KiB
Markdown
104 lines
3.9 KiB
Markdown
---
|
|
date: 2026-04-15
|
|
topic: APISIX → CrowdSec http-logger 레거시 경로 제거
|
|
areas:
|
|
- infra/crowdsec-safeline.md
|
|
- infra/apisix.md
|
|
---
|
|
|
|
# APISIX http-logger 레거시 경로 제거 (2026-04-15)
|
|
|
|
## 배경
|
|
|
|
서울 K3s APISIX가 CrowdSec HTTP acquisition(:8085/apisix-logs)으로 직접 push하던 레거시 경로. VictoriaLogs 파이프라인 도입(2026-04-08) 이후 병행 중이었고, 이번 정리로 레거시 완전 종료.
|
|
|
|
## 실측 결과: 이미 전 구간 제거 완료
|
|
|
|
작업 착수 후 현황 점검 결과, **모든 구간에서 http-logger 레거시는 이미 사실상 사라진 상태**였음. 본 작업은 실제 제거 변경 없이 doc 정리로 마무리.
|
|
|
|
### 1. 서울 K3s APISIX
|
|
|
|
Admin API 전수 스캔 (`global_rules`, `routes`, `services`, `plugin_configs`):
|
|
|
|
```bash
|
|
$ curl -sS -H "X-API-KEY: ..." http://apisix-admin:9180/apisix/admin/global_rules
|
|
{"list":[{"key":"/apisix/global_rules/limit-req","value":{...,"plugins":{"limit-req":{...}}}}],"total":1}
|
|
```
|
|
|
|
`http-logger` 플러그인 흔적 없음. 언제 제거됐는지는 불명 — etcd 감사로그 미확보.
|
|
|
|
### 2. K3s Vector 싱크
|
|
|
|
`~/k8s/vector/values.yaml` / `kubectl -n logging get cm vector -o yaml`:
|
|
|
|
```yaml
|
|
sinks:
|
|
vlogs: # VictoriaLogs ES bulk (유일)
|
|
type: elasticsearch
|
|
inputs: [parse_apisix, parse_apisix_http, parse_traefik]
|
|
endpoints: [http://vlogs-victoria-logs-single-server.logging.svc.cluster.local:9428/insert/elasticsearch/]
|
|
```
|
|
|
|
과거 문서 기록(`crowdsecurity/traefik-logs` → :8086)의 HTTP 싱크는 이미 없음. **모든 로그가 VictoriaLogs로만 흐름.**
|
|
|
|
### 3. 오사카 APISIX
|
|
|
|
`/apisix/osaka/global_rules/1`에 `http-logger`가 존재하지만 target URI가 `https://vector.inouter.com/` — **신규 VictoriaLogs 파이프라인**이지 레거시 CrowdSec(:8085) 아님. 보존.
|
|
|
|
```json
|
|
"http-logger": {
|
|
"uri": "https://vector.inouter.com/",
|
|
"concat_method": "new_line",
|
|
"batch_max_size": 50,
|
|
...
|
|
}
|
|
```
|
|
|
|
### 4. CrowdSec LAPI (jp1 crowdsec 컨테이너)
|
|
|
|
```
|
|
$ ls /etc/crowdsec/acquis.d/
|
|
safeline-http.yaml # :8088 (SafeLine)
|
|
victorialogs-apisix.yaml # VictoriaLogs tail 모드
|
|
victorialogs-traefik.yaml # VictoriaLogs tail 모드
|
|
|
|
$ ss -tlnp | grep crowdsec
|
|
LISTEN *:6060 (metrics)
|
|
LISTEN *:8080 (LAPI)
|
|
LISTEN *:8088 (safeline acquisition)
|
|
# log-collector(:8087) 별도 데몬
|
|
```
|
|
|
|
**:8085 listener 없음, apisix-logs HTTP acquisition 파일 없음.** 언제 제거됐는지는 불명.
|
|
|
|
### 5. CrowdSec 메트릭 (runtime verification)
|
|
|
|
`curl http://10.253.100.240:6060/metrics | grep cs_parser_hits`:
|
|
|
|
```
|
|
cs_parser_hits_ok_total{acquis_type="nginx",source="https://vl.inouter.com/",type="victorialogs"} 26
|
|
cs_parser_hits_ok_total{acquis_type="traefik",source="https://vl.inouter.com/",type="victorialogs"} 115441
|
|
cs_parser_hits_ko_total{acquis_type="nginx",source="https://vl.inouter.com/",type="victorialogs"} 146
|
|
```
|
|
|
|
**유일한 acquisition source는 `https://vl.inouter.com/` (victorialogs type).** 8085/8086 HTTP acquisition 히트 0.
|
|
|
|
버킷 pour:
|
|
```
|
|
cs_bucket_poured_total{name="custom/apisix-high-rate-per-ip",source="https://vl.inouter.com/",type="victorialogs"} 115463
|
|
cs_bucket_poured_total{name="custom/apisix-499-burst",source="https://vl.inouter.com/",type="victorialogs"} 1
|
|
```
|
|
|
|
APISIX 시나리오는 전부 VictoriaLogs 소스에서 발동 — 피드백 루프 정상.
|
|
|
|
## 조치 사항
|
|
|
|
- `infra/crowdsec-safeline.md` "APISIX → CrowdSec (http-logger, 레거시)" 섹션 삭제
|
|
- 본 history 파일로 이력 분리
|
|
- graphify 업데이트
|
|
|
|
## 남는 이슈 / 메모
|
|
|
|
- **parser name 불일치**: 정본 doc에 `custom/apisix-json-logs` 파서 기재돼 있으나 `victorialogs-apisix.yaml`의 `labels.type: nginx`. 실제 파싱은 nginx 계열 파서가 처리(APISIX access log가 nginx format이므로 동작). 추후 doc 정정 대상.
|
|
- **관련 정본 경량화**: 3차 보안 구조 섹션의 "APISIX 로그: http-logger → :8085 → custom/apisix-json-logs" 문구도 현행(VictoriaLogs)로 갱신 필요.
|