수업 1오류 및 포화 지표: 4xx/5xx 비율, 오류 예산 소모 (http_requests_total{code=~"5.."})Prometheus를 사용하여 HTTP 오류와 포화를 모니터링하는 방법을 학습합니다. 4xx 및 5xx 비율을 매핑하고, 오류 예산 소모를 계산하며, 클라이언트 문제와 서버 실패 및 과부하 증상을 구분하는 알림을 설계합니다.
Tracking 4xx vs 5xx error rate time seriesUsing http_requests_total with code labelCalculating error budget burn from SLOsDetecting saturation via queue and retry metricsAlerting on fast vs slow error budget burn수업 2PostgreSQL 메트릭: 연결, 활성 쿼리, 트랜잭션 커밋/롤백, 복제 지연 (pg_stat_activity count, pg_stat_database_xact_commit, pg_stat_replication)Prometheus에 노출된 핵심 PostgreSQL 메트릭을 탐구합니다. 연결, 활성 쿼리, 트랜잭션 동작, 복제 지연을 추적하여 프로덕션 데이터베이스 클러스터에서 과부하, 블로킹, 페일오버 위험을 감지합니다.
Monitoring connection counts and limitsActive query tracking with pg_stat_activityTransaction commit and rollback metricsMeasuring replication lag and replay delayAlerting on blocked and long running queries수업 3스토리지 및 디스크 메트릭: 디스크 I/O 작업, 디스크 지연, 파일시스템 이용률 (node_disk_io_time_seconds_total, node_disk_io_time_seconds)신뢰성에 영향을 미치는 스토리지 및 디스크 메트릭을 이해합니다. 디스크 I/O 작업, 지연, 파일시스템 이용률을 모니터링하여 중요한 노드에서 포화, 실패 장치, 용량 위험을 감지합니다.
Disk IOPS and throughput time seriesnode_disk_io_time_seconds interpretationRead and write latency percentilesFilesystem utilization and inode usageAlerting on disk saturation and failures수업 4Pod 및 노드 리소스 메트릭: CPU, 메모리, 파일시스템, 일시적 스토리지 (container_cpu_usage_seconds_total, container_memory_usage_bytes, node_filesystem_avail_bytes)가장 중요한 Pod 및 노드 리소스 메트릭을 학습합니다. CPU, 메모리, 파일시스템, 일시적 스토리지 사용을 모니터링하여 사용자에게 영향을 미치기 전에 스로틀링, OOM 킬, 디스크 압력을 감지합니다.
container_cpu_usage_seconds_total patternsMemory usage and working set metricsDetecting OOM kills and memory pressureFilesystem and ephemeral storage usageAlerting on CPU throttling and saturation수업 5데이터베이스 성능 메트릭: 쿼리 지속 시간 히스토그램, 캐시 적중 비율, 잠금 및 대기 쿼리 (pg_stat_statements 및 postgres_exporter 메트릭)Prometheus에 내보내진 데이터베이스 성능 메트릭을 검토합니다. 쿼리 지속 시간 히스토그램, 캐시 적중 비율, 잠금 메트릭을 사용하여 느린 쿼리, 경쟁 핫스팟, 비효율적 실행 계획을 찾습니다.
Query duration histograms and bucketspg_stat_statements latency and frequencyCache hit ratio and buffer usage metricsLock wait time and blocked query countsAlerting on regressions in query performance수업 6Kubernetes 컨트롤 플레인 및 Pod 상태: Pod 재시작, CrashLoop 수, Pod 준비 상태, kube_pod_status_phaseKubernetes 컨트롤 플레인 및 Pod 상태를 나타내는 메트릭을 학습합니다. Pod 재시작, CrashLoopBackOff 패턴, 준비 상태, 단계 전환을 모니터링하여 불안정한 워크로드 및 실패 노드를 빠르게 식별합니다.
Tracking pod restarts and crashloop countsUsing kube_pod_status_phase for pod lifecycleReadiness and liveness probe failure metricsCorrelating pod health with node conditionsAlerting on unstable or frequently restarting pods수업 7HTTP 서비스 메트릭: 요청 비율, 상태 코드, 클라이언트 지연 (http_requests_total, http_request_duration_seconds_bucket, http_request_duration_seconds_sum/count)트래픽 및 사용자 영향을 설명하는 HTTP 서비스 메트릭에 중점을 둡니다. 요청 비율, 상태 코드, 지연 분포를 추적하여 SLO를 구축하고, 인시던트를 감지하며, 애플리케이션 성능을 조정합니다.
http_requests_total labels and dimensionsRequest rate and concurrency estimationLatency histograms and summary metricsSeparating client and server error codesBuilding SLOs from HTTP latency metrics수업 8네트워크 및 로드: 서비스 요청 성공 비율, 네트워크 지연, service_endpoint 지연 (service:request_latency_bucket)서비스 상태를 설명하는 네트워크 및 로드 메트릭을 연구합니다. 요청 성공 비율, 네트워크 지연, 엔드포인트 레벨 히스토그램을 추적하여 부분 중단, 노이즈 이웃, 과부하 서비스를 감지합니다.
Service level request success rate metricsMeasuring network and TLS handshake latencyUsing service:request_latency_bucket histogramsDetecting partial regional or zone outagesAlerting on tail latency and saturation수업 9Kube-state-metrics 세부사항: 배포 원하는 대 사용 가능 복제본, daemonset/pod 중단 예산, PVC 용량 및 사용kube-state-metrics와 고급 Kubernetes 객체를 깊이 탐구합니다. 원하는 대 사용 가능 복제본, 중단 예산, 지속 볼륨 클레임을 모니터링하여 용량, 탄력성, 안전한 롤아웃을 보장합니다.
Deployment desired vs available replicasDaemonSet and StatefulSet readiness metricsPodDisruptionBudget allowed disruptionsPVC capacity, usage, and bound statusAlerting on under replicated workloads수업 10스케줄러 및 컨트롤러 메트릭: kube_scheduler_schedule_attempts_total, kube_controller_manager_workqueue_depthKubernetes 컨트롤 동작을 드러내는 스케줄러 및 컨트롤러 메트릭을 이해합니다. Prometheus를 사용하여 스케줄링 시도, 큐 깊이, 조정 루프를 추적하여 병목 및 컨트롤 플레인 스트레스를 감지합니다.
kube_scheduler_schedule_attempts_total usageInterpreting scheduling error and failure labelsWorkqueue depth and processing rate metricsDetecting controller backlogs and slow reconcilesAlerting on stuck or flapping controllers