The tech-log tenant needs objects inside platform namespaces: its database and role, ingress to Postgres and AIStor, blackbox probes, alert rules, a dashboard and two observability NetworkPolicies. They were only ever applied with kubectl and no repository holds them, so a deleted object cannot be recreated and a platform re-apply can drop tech-log access without anyone noticing. Declare them in services/tenants/techlog, copied from each object's last-applied configuration. The dashboard follows the repository's dashboard pattern (JSON file + configMapGenerator, same name, same labels). The hyeonworks-prod Namespace moves here as the tenant boundary and gets PSA enforce=baseline, warn/audit=restricted. Rejected: enforce=restricted now. A server dry-run shows all three tech-log pods would violate it; baseline has zero violations. Risk: the render matches the live objects exactly except the added PSA labels. The pg_hba rules and the Secret stay out of this root (Cluster owner and Git policy). Verification (desktop): - render-tenants-and-policies.sh passes. - kubectl diff of the render shows only the Namespace PSA labels. - kubectl label --dry-run=server enforce=baseline: no warnings.
1 line
8.4 KiB
JSON
1 line
8.4 KiB
JSON
{"uid": "techlog-operations", "title": "TechLog · 운영 상태", "tags": ["techlog", "home", "application"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": "30s", "time": {"from": "now-1h", "to": "now"}, "panels": [{"id": 1, "title": "API 메트릭 수집", "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 0, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "up{namespace=\"hyeonworks-prod\",service=\"techlog-management\"}", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 2, "title": "의존성 readiness", "type": "stat", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 0, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "probe_success{job=\"techlog-readiness\"}", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 3, "title": "웹·API HTTPS 상태", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 7, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "probe_success{job=\"techlog-edge\"}", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 4, "title": "인증서 남은 기간", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 7, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "(probe_ssl_earliest_cert_expiry{job=\"techlog-edge\"}-time())/86400", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "d"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 5, "title": "HTTP 요청률", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 14, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "sum by(uri,status)(rate(http_server_requests_seconds_count{namespace=\"hyeonworks-prod\",uri!~\"/actuator.*\"}[$__rate_interval]))", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 6, "title": "HTTP p95·p99 지연", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 14, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "histogram_quantile(0.99,sum by(le)(rate(http_server_requests_seconds_bucket{namespace=\"hyeonworks-prod\",uri!~\"/actuator.*\"}[$__rate_interval])))", "legendFormat": "p99"}, {"refId": "B", "expr": "histogram_quantile(0.95,sum by(le)(rate(http_server_requests_seconds_bucket{namespace=\"hyeonworks-prod\",uri!~\"/actuator.*\"}[$__rate_interval])))", "legendFormat": "p95"}], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 7, "title": "HTTP 상태별 응답", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 21, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "sum by(status)(rate(http_server_requests_seconds_count{namespace=\"hyeonworks-prod\"}[$__rate_interval]))", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 8, "title": "JVM 메모리", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 21, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "sum by(area)(jvm_memory_used_bytes{namespace=\"hyeonworks-prod\"})", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "bytes"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 9, "title": "JVM GC 시간", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 28, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "sum by(action)(rate(jvm_gc_pause_seconds_sum{namespace=\"hyeonworks-prod\"}[$__rate_interval]))", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 10, "title": "프로세스 CPU", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 28, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "process_cpu_usage{namespace=\"hyeonworks-prod\"}", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "percentunit"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 11, "title": "DB 연결 풀 사용·대기", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 35, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "hikaricp_connections_active{namespace=\"hyeonworks-prod\"}", "legendFormat": "active"}, {"refId": "B", "expr": "hikaricp_connections_pending{namespace=\"hyeonworks-prod\"}", "legendFormat": "pending"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 12, "title": "DB 연결 획득 지연", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 35, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "rate(hikaricp_connections_acquire_seconds_sum{namespace=\"hyeonworks-prod\"}[$__rate_interval])/clamp_min(rate(hikaricp_connections_acquire_seconds_count{namespace=\"hyeonworks-prod\"}[$__rate_interval]),0.001)", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 13, "title": "Pod 재시작", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 42, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "kube_pod_container_status_restarts_total{namespace=\"hyeonworks-prod\"}", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 14, "title": "분산 추적 샘플링 비율", "type": "timeseries", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 42, "w": 12, "h": 7}, "targets": [{"refId": "A", "expr": "tracing_sampling_rate{namespace=\"hyeonworks-prod\"}", "legendFormat": "{{uri}} {{status}} {{pool}} {{id}}"}], "fieldConfig": {"defaults": {"unit": "percentunit"}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}}, {"id": 15, "title": "TechLog 구조화 로그 · 요청 ID / 추적 ID", "type": "logs", "datasource": {"type": "loki", "uid": "loki"}, "gridPos": {"x": 0, "y": 49, "w": 24, "h": 12}, "targets": [{"refId": "A", "expr": "{namespace=\"hyeonworks-prod\",app=\"techlog-backend\"}", "queryType": "range"}], "options": {"showTime": true, "showLabels": false, "showCommonLabels": false, "wrapLogMessage": true, "prettifyLogMessage": true, "sortOrder": "Descending", "enableLogDetails": true}}, {"id": 16, "type": "text", "title": "추적 수집 상태", "gridPos": {"x": 0, "y": 61, "w": 24, "h": 4}, "options": {"mode": "markdown", "content": "요청 ID와 추적 ID는 JSON 로그에서 조회할 수 있습니다. **Tempo span 저장은 현재 이미지에서 검증되지 않았습니다.** 메트릭·로그·의존성 health 수집은 동작합니다."}}], "links": []} |