공통 레이블
| Label | Description |
|---|---|
clickhouse_org | 조직 ID |
postgres_service | Postgres 서비스 ID |
postgres_service_name | Postgres 서비스 이름 |
mode, 연결의 state, 데이터베이스 크기의 database).
이러한 레이블은 각 메트릭과 함께 나열됩니다.
정보 메트릭
PostgresServiceInfo는 값이 항상 1인 게이지로, 레이블에
서비스의 현재 상태와 버전이 포함됩니다. 이를 사용해
다른 메트릭에 상태를 조인하거나, 서비스가
running 상태를 벗어날 때 알림을 설정할 수 있습니다.
| 메트릭 | 유형 | 추가 레이블 | 설명 |
|---|---|---|---|
PostgresServiceInfo | gauge | postgres_status, postgres_version | 서비스마다 하나의 series가 있으며 값은 항상 1입니다. |
postgres_status는 서비스의 현재 수명 주기 상태를 나타냅니다
(예: running, creating, stopped). postgres_version은
Postgres의 메이저 버전(예: 17, 18)을 나타냅니다.
용량
| 메트릭 | 유형 | 단위 | 설명 |
|---|---|---|---|
PostgresServer_CPUCores | gauge | cores | 서비스에 할당된 CPU 코어 수입니다. |
PostgresServer_MemoryLimitBytes | gauge | bytes | 서비스에 할당된 메모리입니다. |
PostgresServer_StorageLimitBytes | gauge | bytes | 서비스에 할당된 스토리지입니다. |
리소스 사용률
| 메트릭 | 유형 | 추가 레이블 | 설명 |
|---|---|---|---|
PostgresServer_CPUSeconds_Total | counter | mode | 사용된 CPU 시간이며, 모드별로 구분됩니다: user, system, iowait, softirq, steal, irq, nice, idle. |
PostgresServer_MemoryUsedPercent | gauge | 사용 중인 메모리로, PostgresServer_MemoryLimitBytes 대비 백분율입니다. | |
PostgresServer_MemoryCachePercent | gauge | 캐시와 버퍼가 사용하는 메모리로, 전체 메모리 대비 백분율입니다. | |
PostgresServer_FilesystemUsedPercent | gauge | 사용된 파일 시스템 공간으로, 전체 스토리지 대비 백분율입니다. |
PostgresServer_CPUSeconds_Total의 rate를 구한 다음
PostgresServer_CPUCores로 나누십시오.
디스크 및 네트워크 I/O
| 메트릭 | 유형 | 단위 | 설명 |
|---|---|---|---|
PostgresServer_DiskReads_Total | counter | ops | 완료된 디스크 읽기 작업 수 |
PostgresServer_DiskWrites_Total | counter | ops | 완료된 디스크 쓰기 작업 수 |
PostgresServer_NetworkReceiveBytes_Total | counter | bytes | 네트워크를 통해 수신한 바이트 수 |
PostgresServer_NetworkTransmitBytes_Total | counter | bytes | 네트워크를 통해 전송한 바이트 수 |
데이터베이스 활동
rate() 또는 irate()를 사용해
초당 값으로 변환합니다.
| 메트릭 | 유형 | 설명 |
|---|---|---|
PostgresServer_TuplesFetched_Total | counter | 쿼리가 가져온 행 수입니다. |
PostgresServer_TuplesInserted_Total | counter | 삽입된 행 수입니다. |
PostgresServer_TuplesUpdated_Total | counter | 업데이트된 행 수입니다. |
PostgresServer_TuplesDeleted_Total | counter | 삭제된 행 수입니다. |
PostgresServer_TransactionsCommitted_Total | counter | 커밋된 트랜잭션 수입니다. |
PostgresServer_TransactionsRolledBack_Total | counter | 롤백된 트랜잭션 수입니다. |
PostgresServer_Deadlocks_Total | counter | 감지된 데드락 수입니다. |
연결, 캐시, 데이터베이스 크기
| 메트릭 | 유형 | 추가 레이블 | 설명 |
|---|---|---|---|
PostgresServer_ActiveConnections | gauge | state | 상태별 연결 수입니다(예: active, idle). |
PostgresServer_CacheHitRatio | gauge | 버퍼 캐시 적중률입니다. 전체 접근 블록 수 대비 캐시에서 제공된 블록 수의 비율을 백분율로 나타냅니다. | |
PostgresServer_DatabaseSizeBytes | gauge | database | 각 데이터베이스의 디스크 크기(바이트)입니다. postgres 기본 데이터베이스와 사용자가 생성한 모든 데이터베이스를 포함합니다. |
- Prometheus 엔드포인트 — 설정, 인증 및 스크레이핑
- 대시보드 — Cloud Console에 기본 제공되는 차트
- OpenAPI 가이드 — API Key 생성 및 조직과 서비스 ID 조회