클러스터 모니터링 및 문제 진단
Teleport v18.9Teleport는 정상 상태를 확인하고 트래픽을 처리할 준비가 되었는지 검증하기 위한 헬스 체크 메커니즘을 제공합니다. Teleport 인스턴스의 상태를 모니터링하는 방법입니다. Teleport의 진단 HTTP 엔드포인트는 기본적으로 비활성화되어 있습니다.
Teleport는 정상 상태를 확인하고 트래픽을 처리할 준비가 되었는지 검증하기 위한 헬스 체크 메커니즘을 제공합니다. 메트릭, 추적, 프로파일링은 클러스터 성능과 응답성을 추적하는 심층 데이터를 제공합니다.
헬스 모니터링 활성화#
Teleport 인스턴스의 상태를 모니터링하는 방법입니다.
Teleport의 진단 HTTP 엔드포인트는 기본적으로 비활성화되어 있습니다. 다음을 통해 활성화할 수 있습니다:
Command line
진단 엔드포인트가 수신 대기할 로컬 주소로 `--diag-addr` 플래그를 설정하여
`teleport` 인스턴스를 시작합니다:
```code
$ sudo teleport start --diag-addr=127.0.0.1:3000
```
Config file
`teleport` 인스턴스의 구성 파일(기본값 `/etc/teleport.yaml`)을 편집하여
다음을 포함시킵니다:
```yaml
teleport:
diag_addr: 127.0.0.1:3000
```
디버그 로그를 활성화하려면:
```yaml
log:
severity: DEBUG
```
진단 엔드포인트에 연결할 수 있는지 확인하세요
이제 Teleport가 진단 엔드포인트를 제공하고 있는지 확인합니다:
```code
$ curl http://127.0.0.1:3000/healthz
```
이제 여러 엔드포인트에서 모니터링 정보를 수집할 수 있습니다. Kubernetes 프로브 등에서 Teleport 프로세스의 상태를 모니터링하는 데 사용할 수 있습니다.
/healthz#
http://127.0.0.1:3000/healthz 엔드포인트는 프로세스가 실행 중이면 {"status":"ok"} 본문과 HTTP 200 OK 상태 코드로 응답합니다.
이는 Teleport 프로세스가 아직 실행 중인지 확인하는 데 적합한 간단한 체크입니다.
/readyz#
http://127.0.0.1:3000/readyz 엔드포인트는 /healthz와 유사하지만, 응답에 프로세스의 상태 정보가 포함됩니다.
응답 본문은 다음 형식의 JSON 객체입니다:
{ "status": "a status message here"}
/readyz와 하트비트#
Teleport 구성 요소가 하트비트 절차를 실행하지 못하면 저하 상태에 진입합니다. 하트비트가 성공적으로 완료되면 Teleport는 이 상태에서 회복을 시작합니다.
첫 번째 성공적인 하트비트는 Teleport를 회복 상태로 전환합니다. 두 번째 연속 성공적인 하트비트는 Teleport를 OK 상태로 전환합니다.
Teleport 하트비트는 정상 상태일 때 약 60초마다 실행되며, 실패한 하트비트는 약 5초마다 재시도됩니다. 이는 하트비트 타이밍에 따라 연결이 복구된 후 /readyz가 다시 정상 상태를 보고하기까지 60-70초가 걸릴 수 있음을 의미합니다.
상태 코드#
응답의 상태 코드는 다음 중 하나일 수 있습니다:
- HTTP 200 OK: Teleport가 정상적으로 작동 중입니다
- HTTP 503 Service Unavailable: Teleport에 연결 오류가 발생하여 저하 상태로 실행 중입니다. Teleport 하트비트가 실패할 때 발생합니다.
- HTTP 400 Bad Request: Teleport가 초기 시작 단계에 진입 중이거나 저하 상태에서 회복을 시작했습니다.
동일한 상태 정보는 /metrics 엔드포인트 아래의 process_state 메트릭을 통해서도 확인할 수 있습니다.
메트릭#
Teleport는 모든 구성 요소에 대한 메트릭을 노출하여 클러스터 상태에 대한 인사이트를 제공합니다. 이 가이드는 Teleport 클러스터에서 수집할 수 있는 메트릭을 설명합니다.
메트릭 활성화#
Teleport의 진단 HTTP 엔드포인트는 기본적으로 비활성화되어 있습니다. 다음을 통해 활성화할 수 있습니다:
Command line
진단 엔드포인트가 수신 대기할 로컬 주소로 `--diag-addr` 플래그를 설정하여
`teleport` 인스턴스를 시작합니다:
```code
$ sudo teleport start --diag-addr=127.0.0.1:3000
```
Config file
`teleport` 인스턴스의 구성 파일(기본값 `/etc/teleport.yaml`)을 편집하여
다음을 포함시킵니다:
```yaml
teleport:
diag_addr: 127.0.0.1:3000
```
디버그 로그를 활성화하려면:
```yaml
log:
severity: DEBUG
```
진단 엔드포인트에 연결할 수 있는지 확인하세요
이제 Teleport가 진단 엔드포인트를 제공하고 있는지 확인합니다:
```code
$ curl http://127.0.0.1:3000/healthz
```
이렇게 하면 http://127.0.0.1:3000/metrics 엔드포인트가 활성화되어 Teleport가 추적하는 메트릭을 제공합니다. Prometheus 수집기와 호환됩니다.
다음 메트릭을 사용할 수 있습니다:
Teleport Cloud는 Auth 서비스 및 Proxy 서비스에 대한 모니터링 엔드포인트를 노출하지 않습니다.
Auth Service 및 백엔드#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
audit_failed_disk_monitoring |
counter | Teleport Audit Log | 디스크 모니터링이 실패한 횟수입니다. |
audit_failed_emit_events |
counter | Teleport Audit Log | 감사 이벤트 발신이 실패한 횟수입니다. |
audit_percentage_disk_space_used |
gauge | Teleport Audit Log | 사용된 디스크 공간의 백분율입니다. |
audit_server_open_files |
gauge | Teleport Audit Log | 열려 있는 감사 파일의 수입니다. |
auth_generate_requests_throttled_total |
counter | Teleport Auth | 새 서버 키를 생성하기 위해 스로틀된 요청의 수입니다. |
auth_generate_requests_total |
counter | Teleport Auth | 새 서버 키를 생성하기 위한 요청의 수입니다. |
auth_generate_requests |
gauge | Teleport Auth | 현재 진행 중인 생성 요청의 수입니다. |
auth_generate_seconds |
histogram | Teleport Auth | 생성 요청의 지연 시간입니다. |
backend_batch_read_requests_total |
counter | cache | 백엔드에 대한 읽기 요청의 수입니다. |
backend_batch_read_seconds |
histogram | cache | 배치 읽기 작업의 지연 시간입니다. |
backend_batch_write_requests_total |
counter | cache | 백엔드에 대한 배치 쓰기 요청의 수입니다. |
backend_batch_write_seconds |
histogram | cache | 백엔드 배치 쓰기 작업의 지연 시간입니다. |
backend_read_requests_total |
counter | cache | 백엔드에 대한 읽기 요청의 수입니다. |
backend_read_seconds |
histogram | cache | 읽기 작업의 지연 시간입니다. |
backend_requests |
counter | cache | 백엔드에 대한 요청의 수입니다(읽기, 쓰기, keepalive). |
backend_write_requests_total |
counter | cache | 백엔드에 대한 쓰기 요청의 수입니다. |
backend_write_seconds |
histogram | cache | 백엔드 쓰기 작업의 지연 시간입니다. |
cluster_name_not_found_total |
counter | Teleport Auth | 클러스터를 찾지 못한 횟수입니다. |
dynamo_requests_total |
counter | DynamoDB | DynamoDB API에 대한 전체 요청 수입니다. |
dynamo_requests |
counter | DynamoDB | 결과별로 그룹화된 DynamoDB API에 대한 전체 요청 수입니다. |
dynamo_requests_seconds |
histogram | DynamoDB | DynamoDB API 요청의 지연 시간입니다. |
etcd_backend_batch_read_requests |
counter | etcd | etcd 데이터베이스에 대한 읽기 요청의 수입니다. |
etcd_backend_batch_read_seconds |
histogram | etcd | etcd 읽기 작업의 지연 시간입니다. |
etcd_backend_read_requests |
counter | etcd | etcd 데이터베이스에 대한 읽기 요청의 수입니다. |
etcd_backend_read_seconds |
histogram | etcd | etcd 읽기 작업의 지연 시간입니다. |
etcd_backend_tx_requests |
counter | etcd | 데이터베이스에 대한 트랜잭션 요청의 수입니다. |
etcd_backend_tx_seconds |
histogram | etcd | etcd 트랜잭션 작업의 지연 시간입니다. |
etcd_backend_write_requests |
counter | etcd | 데이터베이스에 대한 쓰기 요청의 수입니다. |
etcd_backend_write_seconds |
histogram | etcd | etcd 쓰기 작업의 지연 시간입니다. |
teleport_etcd_events |
counter | etcd | 처리된 etcd 이벤트의 전체 수입니다. |
teleport_etcd_event_backpressure |
counter | etcd | 이벤트 처리 중 백프레셔가 발생한 전체 횟수입니다. |
firestore_events_backend_batch_read_requests |
counter | GCP Cloud Firestore | Cloud Firestore 이벤트에 대한 배치 읽기 요청의 수입니다. |
firestore_events_backend_batch_read_seconds |
histogram | GCP Cloud Firestore | Cloud Firestore 이벤트 배치 읽기 작업의 지연 시간입니다. |
firestore_events_backend_batch_write_requests |
counter | GCP Cloud Firestore | Cloud Firestore 이벤트에 대한 배치 쓰기 요청의 수입니다. |
firestore_events_backend_batch_write_seconds |
histogram | GCP Cloud Firestore | Cloud Firestore 이벤트 배치 쓰기 작업의 지연 시간입니다. |
firestore_events_backend_write_requests |
counter | GCP Cloud Firestore | Cloud Firestore 이벤트에 대한 쓰기 요청의 수입니다. |
firestore_events_backend_write_seconds |
histogram | GCP Cloud Firestore | Cloud Firestore 이벤트 쓰기 작업의 지연 시간입니다. |
gcs_event_storage_downloads_seconds |
histogram | GCP GCS | GCS 다운로드 작업의 지연 시간입니다. |
gcs_event_storage_downloads |
counter | GCP GCS | GCS 백엔드로부터의 다운로드 수입니다. |
gcs_event_storage_uploads_seconds |
histogram | GCP GCS | GCS 업로드 작업의 지연 시간입니다. |
gcs_event_storage_uploads |
counter | GCP GCS | GCS 백엔드로의 업로드 수입니다. |
grpc_server_started_total |
counter | Teleport Auth | 서버에서 시작된 RPC의 전체 수입니다. |
grpc_server_handled_total |
counter | Teleport Auth | 성공 또는 실패와 무관하게 서버에서 완료된 RPC의 전체 수입니다. |
grpc_server_msg_received_total |
counter | Teleport Auth | 서버에서 수신된 RPC 스트림 메시지의 전체 수입니다. |
grpc_server_msg_sent_total |
counter | Teleport Auth | 서버가 전송한 gRPC 스트림 메시지의 전체 수입니다. |
heartbeat_connections_received_total |
counter | Teleport Auth | Auth Service가 하트비트 연결을 수신한 횟수로, 하트비트를 보내는 전체 Agent 수를 나타냅니다. |
s3_requests_total |
counter | Amazon S3 | S3 API에 대한 전체 요청 수입니다. |
s3_requests |
counter | Amazon S3 | 결과별로 그룹화된 S3 API에 대한 전체 요청 수입니다. |
s3_requests_seconds |
histogram | Amazon S3 | S3 API 요청의 지연 시간입니다. |
teleport_audit_emit_events |
counter | Teleport Audit Log | 발신된 감사 이벤트의 수입니다. |
teleport_audit_parquetlog_batch_processing_seconds |
histogram | Teleport Audit Log | Parquet 형식 감사 로그에서 단일 이벤트 배치를 처리하는 데 걸린 시간입니다. |
teleport_audit_parquetlog_s3_flush_seconds |
histogram | Teleport Audit Log | Parquet 형식 감사 로그에서 parquet 파일을 S3로 플러시하는 데 걸린 시간입니다. |
teleport_audit_parquetlog_delete_events_seconds |
histogram | Teleport Audit Log | Parquet 형식 감사 로그에서 SQS로부터 이벤트를 삭제하는 데 걸린 시간입니다. |
teleport_audit_parquetlog_batch_size |
histogram | Teleport Audit Log | Parquet 형식 감사 로그에서 단일 배치에 포함된 이벤트의 전체 크기입니다. |
teleport_audit_parquetlog_batch_count |
counter | Teleport Audit Log | Parquet 형식 감사 로그에서 단일 배치에 포함된 이벤트의 전체 수입니다. |
teleport_audit_parquetlog_last_processed_timestamp |
gauge | Teleport Audit Log | Parquet 형식 감사 로그에서 마지막 처리 시간입니다. |
teleport_audit_parquetlog_age_oldest_processed_message |
gauge | Teleport Audit Log | Parquet 형식 감사 로그에서 가장 오래된 이벤트의 경과 시간입니다. |
teleport_audit_parquetlog_errors_from_collect_count |
counter | Teleport Audit Log | Parquet 형식 감사 로그에서 수집 실패 횟수입니다. |
teleport_connected_resources |
gauge | Teleport Auth | keepalive를 통해 연결된 리소스의 수와 유형입니다. |
teleport_postgres_events_backend_write_requests |
counter | Postgres (Events) | postgres 이벤트에 대한 쓰기 요청의 수이며, 요청 status(성공 또는 실패)로 레이블이 지정됩니다. |
teleport_postgres_events_backend_batch_read_requests |
counter | Postgres (Events) | postgres 이벤트에 대한 배치 읽기 요청의 수이며, 요청 status(성공 또는 실패)로 레이블이 지정됩니다. |
teleport_postgres_events_backend_batch_delete_requests |
counter | Postgres (Events) | postgres 이벤트에 대한 배치 삭제 요청의 수이며, 요청 status(성공 또는 실패)로 레이블이 지정됩니다. |
teleport_postgres_events_backend_write_seconds |
histogram | Postgres (Events) | postgres 이벤트 쓰기 작업의 지연 시간(초)입니다. |
teleport_postgres_events_backend_batch_read_seconds |
histogram | Postgres (Events) | postgres 이벤트 배치 읽기 작업의 지연 시간(초)입니다. |
teleport_postgres_events_backend_batch_delete_seconds |
histogram | Postgres (Events) | postgres 이벤트 배치 삭제 작업의 지연 시간(초)입니다. |
teleport_registered_servers |
gauge | Teleport Auth | 버전별로 그룹화된, Auth Service 인스턴스에 연결된 Teleport 서비스의 수입니다. |
teleport_registered_servers_by_install_methods |
gauge | Teleport Auth | 설치 방법별로 그룹화된, Auth Service 인스턴스에 연결된 Teleport 서비스의 수입니다. |
teleport_roles_total |
gauge | Teleport Auth | 클러스터에 존재하는 role의 수입니다. |
teleport_migrations |
gauge | Teleport Auth | 각 마이그레이션이 활성(1)인지 아닌지(0)를 추적합니다. |
teleport_bot_instances |
gauge | Teleport Auth | 버전별로 그룹화된, 전체 클러스터에 걸친 봇 인스턴스의 수입니다. |
user_login_total |
counter | Teleport Auth | 사용자 로그인 수입니다. |
watcher_event_sizes |
histogram | cache | 발신된 이벤트의 전체 크기입니다. |
watcher_events |
histogram | cache | 발신된 이벤트의 리소스별 크기입니다. |
세션 녹화 요약기#
이 메트릭은 Auth Service에 의해 익스포트됩니다. 모든 메트릭에는
inference_model_name 레이블이 지정되며, 이는 해당 inference_model 리소스의
metadata.name 필드입니다.
일반 메트릭#
이 메트릭은 모든 추론(inference) 제공자에 적용됩니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_summarizer_summarizations_total |
counter | Teleport Auth | 시작된 요약 작업의 전체 수 |
teleport_summarizer_summarization_errors |
counter | Teleport Auth | 실패한 요약 작업의 수 |
teleport_summarizer_summarization_jobs_pending |
gauge | Teleport Auth | 현재 실행을 대기 중인 요약 작업의 수 |
teleport_summarizer_summarization_jobs_running |
gauge | Teleport Auth | 현재 실행 중인 요약 작업의 수 |
OpenAI 전용 메트릭#
이 메트릭은 OpenAI 호환 프록시를 포함하여 OpenAI 추론 제공자를 사용해 실행된 작업에 적용됩니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_summarizer_openai_api_requests |
counter | Teleport Auth | OpenAI API 요청의 전체 수 |
teleport_summarizer_openai_api_errors |
counter | Teleport Auth | OpenAI API가 반환한 오류의 수입니다. 추가로 OpenAI API 오류 코드를 나타내는 api_error_code 레이블이 지정됩니다. |
teleport_summarizer_openai_api_requests_in_flight |
gauge | Teleport Auth | 현재 응답을 대기 중인 OpenAI 요청의 수 |
향상된 세션 녹화 / BPF#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
bpf_lost_command_events |
counter | BPF | 손실된 command 이벤트의 수입니다. |
bpf_lost_disk_events |
counter | BPF | 손실된 disk 이벤트의 수입니다. |
bpf_lost_network_events |
counter | BPF | 손실된 network 이벤트의 수입니다. |
Proxy Service#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
failed_connect_to_node_attempts_total |
counter | Teleport Proxy | SSH Service에 대한 실패한 SSH 연결 시도의 수입니다. 실패율을 구하려면 teleport_connect_to_node_attempts_total과 함께 사용하십시오. |
failed_login_attempts_total |
counter | Teleport Proxy | 실패한 tsh login 또는 tsh ssh 로그인의 수입니다. |
grpc_client_started_total |
counter | Teleport Proxy | 클라이언트에서 시작된 RPC의 전체 수입니다. |
grpc_client_handled_total |
counter | Teleport Proxy | 성공 또는 실패와 무관하게 클라이언트에서 완료된 RPC의 전체 수입니다. |
grpc_client_msg_received_total |
counter | Teleport Proxy | 클라이언트에서 수신된 RPC 스트림 메시지의 전체 수입니다. |
grpc_client_msg_sent_total |
counter | Teleport Proxy | 클라이언트가 전송한 gRPC 스트림 메시지의 전체 수입니다. |
proxy_connection_limit_exceeded_total |
counter | Teleport Proxy | Proxy Service 연결 제한을 초과한 연결의 수입니다. |
proxy_peer_client_dial_error_total |
counter | Teleport Proxy | 피어 Proxy Service 인스턴스에 다이얼하는 중 발생한 오류의 전체 수입니다. |
proxy_peer_client_connections |
gauge | Teleport Proxy | 프록시 Proxy Service 인스턴스에 현재 열려 있는 연결의 수입니다. |
proxy_peer_client_rpc |
gauge | Teleport Proxy | 현재 클라이언트 RPC 요청의 수입니다. |
proxy_peer_client_rpc_total |
counter | Teleport Proxy | 클라이언트 RPC 요청의 전체 수입니다. |
proxy_peer_client_rpc_duration_seconds |
histogram | Teleport Proxy | 클라이언트가 전송한 RPC의 소요 시간(초)입니다. |
proxy_peer_client_message_sent_size |
histogram | Teleport Proxy | 클라이언트가 전송한 메시지의 크기입니다. |
proxy_peer_client_message_received_size |
histogram | Teleport Proxy | 클라이언트가 수신한 메시지의 크기입니다. |
proxy_peer_server_connections |
gauge | Teleport Proxy | 피어 Proxy Service 클라이언트에 현재 열려 있는 연결의 수입니다. |
proxy_peer_server_rpc |
gauge | Teleport Proxy | 현재 서버 RPC 요청의 수입니다. |
proxy_peer_server_rpc_total |
counter | Teleport Proxy | 서버 RPC 요청의 전체 수입니다. |
proxy_peer_server_rpc_duration_seconds |
histogram | Teleport Proxy | 서버가 전송한 RPC의 소요 시간(초)입니다. |
proxy_peer_server_message_sent_size |
histogram | Teleport Proxy | 서버가 전송한 메시지의 크기입니다. |
proxy_peer_server_message_received_size |
histogram | Teleport Proxy | 서버가 수신한 메시지의 크기입니다. |
proxy_ssh_sessions_total |
gauge | Teleport Proxy | 이 Proxy Service 인스턴스를 통한 활성 세션의 수입니다. |
proxy_missing_ssh_tunnels |
gauge | Teleport Proxy | 누락된 SSH 터널의 수입니다. Teleport 인스턴스가 모든 Proxy Service 인스턴스를 검색했는지 디버깅하는 데 사용됩니다. |
remote_clusters |
gauge | Teleport Proxy | 리프 클러스터로부터의 인바운드 연결의 수입니다. |
teleport_connect_to_node_attempts_total |
counter | Teleport Proxy | SSH Service에 대한 SSH 연결 시도의 수입니다. 실패율을 구하려면 failed_connect_to_node_attempts_total과 함께 사용하십시오. |
teleport_reverse_tunnels_connected |
gauge | Teleport Proxy | Teleport 인스턴스가 Teleport Proxy Service에 연결한 역방향 SSH 터널의 수입니다. |
teleport_proxy_db_connection_setup_time_seconds |
histogram | Teleport Proxy | Proxy 서비스에서 DB 서비스로 연결을 설정하는 데 걸린 시간입니다. |
teleport_proxy_db_connection_dial_attempts_total |
counter | Teleport Proxy | Proxy에서 DB 서비스로 수행한 다이얼 시도의 수입니다. |
teleport_proxy_db_connection_dial_failures_total |
counter | Teleport Proxy | Proxy에서 DB 서비스로 수행한 실패한 다이얼 시도의 수입니다. |
teleport_proxy_db_attempted_servers_total |
histogram | Teleport Proxy | Proxy 서비스에서 DB 서비스로 연결을 시도하는 중 처리된 서버의 수입니다. |
teleport_proxy_db_connection_tls_config_time_seconds |
histogram | Teleport Proxy | Proxy 서비스에서 DB 서비스로의 연결에 대한 TLS 구성을 가져오는 데 걸린 시간입니다. |
teleport_proxy_db_active_connections_total |
gauge | Teleport Proxy | Proxy 서비스에서 DB 서비스로 현재 활성인 연결의 수입니다. |
trusted_clusters |
gauge | Teleport Proxy | 리프 클러스터로의 아웃바운드 연결의 수입니다. |
Database Service#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_db_messages_from_client_total |
counter | Teleport Database Service | DB 클라이언트로부터 수신된 메시지(패킷)의 수입니다. |
teleport_db_messages_from_server_total |
counter | Teleport Database Service | DB 서버로부터 수신된 메시지(패킷)의 수입니다. |
teleport_db_method_call_count_total |
counter | Teleport Database Service | DB 메서드가 호출된 횟수입니다. |
teleport_db_method_call_latency_seconds |
histogram | Teleport Database Service | DB 메서드 호출의 지연 시간입니다. |
teleport_db_initialized_connections_total |
counter | Teleport Database Service | 초기화된 DB 연결의 수입니다. |
teleport_db_active_connections_total |
gauge | Teleport Database Service | 활성 DB 연결의 수입니다. |
teleport_db_connection_durations_seconds |
histogram | Teleport Database Service | DB 연결의 지속 시간입니다. |
teleport_db_connection_setup_time_seconds |
histogram | Teleport Database Service | 요청이 처리되기 전, DB 연결을 설정하는 초기 시간입니다. |
teleport_db_errors_total |
counter | Teleport Database Service | 클라이언트로 전송된 합성 DB 오류의 수입니다. |
Kubernetes 액세스#
다음 표는 Teleport 클러스터에 하나 이상의 Kubernetes 클러스터가 등록된 경우 Teleport Proxy Service에서 사용할 수 있는 모든 메트릭을 나타냅니다.
클라이언트#
다음 표는 서비스가 업스트림 서버에 연결할 때 사용할 수 있는 모든 메트릭을
나타냅니다. proxy의 경우, 레거시 모드로 실행 중이라면 업스트림 서버는
kubernetes_service 또는 Kubernetes Cluster일 수 있습니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_kubernetes_client_in_flight_requests |
gauge | Teleport Kubernetes Proxy | 업스트림 응답을 기다리는 진행 중(in-flight) 요청입니다. |
teleport_kubernetes_client_requests_total |
counter | Teleport Kubernetes Proxy | 업스트림 Teleport proxy, kube_service 또는 Kubernetes Cluster 서버로 전송된 요청의 전체 수입니다. |
teleport_kubernetes_client_tls_duration_seconds |
histogram | Teleport Kubernetes Proxy | TLS 핸드셰이크의 지연 시간 분포입니다. |
teleport_kubernetes_client_got_conn_duration_seconds |
histogram | Teleport Kubernetes Proxy | 업스트림 서버에 다이얼하는 데 걸린 시간의 지연 시간 분포입니다 - 역방향 터널 또는 직접 다이얼러 사용. |
teleport_kubernetes_client_first_byte_response_duration_seconds |
histogram | Teleport Kubernetes Proxy | 업스트림 서버로부터 첫 응답 바이트를 수신하는 데 걸린 시간의 지연 시간 분포입니다. |
teleport_kubernetes_client_request_duration_seconds |
histogram | Teleport Kubernetes Proxy | 업스트림 요청 시간의 지연 시간 분포입니다. |
서버#
다음 표는 수신(incoming) 연결에 대해 사용할 수 있는 모든 메트릭을 나타냅니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_kubernetes_server_in_flight_requests |
gauge | Teleport Kubernetes Proxy | 서버가 현재 처리 중인 진행 중(in-flight) 요청입니다. |
teleport_kubernetes_server_api_requests_total |
counter | Teleport Kubernetes Proxy | 서버가 처리한 요청의 전체 수입니다. |
teleport_kubernetes_server_request_duration_seconds |
histogram | Teleport Kubernetes Proxy | 전체 요청 시간의 지연 시간 분포입니다. |
teleport_kubernetes_server_response_size_bytes |
histogram | Teleport Kubernetes Proxy | 응답 크기의 분포입니다. |
teleport_kubernetes_server_exec_in_flight_sessions |
gauge | Teleport Kubernetes Proxy | 활성 kubectl exec 세션의 수입니다. |
teleport_kubernetes_server_exec_sessions_total |
counter | Teleport Kubernetes Proxy | kubectl exec 세션의 전체 수입니다. |
teleport_kubernetes_server_portforward_in_flight_sessions |
gauge | Teleport Kubernetes Proxy | 활성 kubectl portforward 세션의 수입니다. |
teleport_kubernetes_server_portforward_sessions_total |
counter | Teleport Kubernetes Proxy | 활성 kubectl portforward 세션의 수입니다. |
teleport_kubernetes_server_join_in_flight_sessions |
gauge | Teleport Kubernetes Proxy | 활성 조인(joining) 세션의 수입니다, |
teleport_kubernetes_server_join_sessions_total |
counter | Teleport Kubernetes Proxy | 조인(joining) 세션의 전체 수입니다. |
Teleport SSH Service#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
user_max_concurrent_sessions_hit_total |
counter | Teleport SSH | 사용자가 동시 세션 제한을 초과한 횟수입니다. |
Teleport Kubernetes Service#
다음 표는 서비스가 업스트림 서버에 연결할 때 사용할 수 있는 모든 메트릭을
나타냅니다. kubernetes_service의 경우, 업스트림 서버는 항상 Kubernetes
클러스터입니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_kubernetes_client_in_flight_requests |
gauge | Teleport Kubernetes Service | 업스트림 응답을 기다리는 진행 중(in-flight) 요청입니다. |
teleport_kubernetes_client_requests_total |
counter | Teleport Kubernetes Service | 업스트림 teleport proxy, kube_service 또는 Kubernetes Cluster 서버로 전송된 요청의 전체 수입니다. |
teleport_kubernetes_client_tls_duration_seconds |
histogram | Teleport Kubernetes Service | TLS 핸드셰이크의 지연 시간 분포입니다. |
teleport_kubernetes_client_got_conn_duration_seconds |
histogram | Teleport Kubernetes Service | 업스트림 서버에 다이얼하는 데 걸린 시간의 지연 시간 분포입니다 - 역방향 터널(reversetunnel) 또는 직접 다이얼러 사용. |
teleport_kubernetes_client_first_byte_response_duration_seconds |
histogram | Teleport Kubernetes Service | 업스트림 서버로부터 첫 응답 바이트를 수신하는 데 걸린 시간의 지연 시간 분포입니다. |
teleport_kubernetes_client_request_duration_seconds |
histogram | Teleport Kubernetes Service | 업스트림 요청 시간의 지연 시간 분포입니다. |
다음 표는 수신(incoming) 연결에 대해 사용할 수 있는 모든 메트릭을 나타냅니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_kubernetes_server_in_flight_requests |
gauge | Teleport Kubernetes Service | 서버가 현재 처리 중인 진행 중(in-flight) 요청입니다. |
teleport_kubernetes_server_api_requests_total |
counter | Teleport Kubernetes Service | 서버가 처리한 요청의 전체 수입니다. |
teleport_kubernetes_server_request_duration_seconds |
histogram | Teleport Kubernetes Service | 전체 요청 시간의 지연 시간 분포입니다. |
teleport_kubernetes_server_response_size_bytes |
histogram | Teleport Kubernetes Service | 응답 크기의 분포입니다. |
teleport_kubernetes_server_exec_in_flight_sessions |
gauge | Teleport Kubernetes Service | 활성 kubectl exec 세션의 수입니다. |
teleport_kubernetes_server_exec_sessions_total |
counter | Teleport Kubernetes Service | kubectl exec 세션의 전체 수입니다. |
teleport_kubernetes_server_portforward_in_flight_sessions |
gauge | Teleport Kubernetes Service | 활성 kubectl portforward 세션의 수입니다. |
teleport_kubernetes_server_portforward_sessions_total |
counter | Teleport Kubernetes Service | 활성 kubectl portforward 세션의 수입니다. |
teleport_kubernetes_server_join_in_flight_sessions |
gauge | Teleport Kubernetes Service | 활성 조인(joining) 세션의 수입니다, |
teleport_kubernetes_server_join_sessions_total |
counter | Teleport Kubernetes Service | 조인(joining) 세션의 전체 수입니다. |
모든 Teleport 인스턴스#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
process_state |
gauge | Teleport | teleport 프로세스의 상태입니다: 0 - 정상, 1 - 복구 중, 2 - 성능 저하, 3 - 시작 중. |
certificate_mismatch_total |
counter | Teleport | 인증서 불일치로 인한 SSH 서버 로그인 실패의 수입니다. |
rx |
counter | Teleport | SSH 연결 중 수신된 바이트 수입니다. |
server_interactive_sessions_total |
gauge | Teleport | 활성 세션의 수입니다. |
teleport_build_info |
gauge | Teleport | gitref(git describe --long --tags), Go 버전, Teleport 버전을 포함한 Teleport의 빌드 정보를 제공합니다. 이 게이지의 값은 항상 1입니다. |
teleport_breaker_connector_executions_total |
counter | Teleport | Teleport 서비스가 회로 차단기(circuit breaker)를 통해 수행한 Teleport Auth Service API에 대한 요청의 수이며, 커넥터의 role(거의 항상 Instance), 연관된 회로 차단기의 state, 그리고 차단기가 해석한 success로 레이블이 지정됩니다. |
teleport_cache_events |
counter | Teleport | Teleport 서비스 캐시가 수신한 이벤트의 수입니다. Teleport의 Auth Service, Proxy Service 및 기타 서비스는 자신의 서비스와 관련된 수신 이벤트를 캐싱합니다. |
teleport_cache_stale_events |
counter | Teleport | Teleport 서비스 캐시가 수신한 오래된(stale) 이벤트의 수입니다. 오래된 이벤트의 비율이 높으면 백엔드 성능 저하를 나타낼 수 있습니다. |
tx |
counter | Teleport | SSH 연결 중 전송된 바이트 수입니다. |
Teleport 상태 점검#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
teleport_resources_health_status_healthy |
gauge | Teleport Health Check | 정상(healthy) 리소스의 수입니다. |
teleport_resources_health_status_unhealthy |
gauge | Teleport Health Check | 비정상(unhealthy) 리소스의 수입니다. |
teleport_resources_health_status_unknown |
gauge | Teleport Health Check | 상태를 알 수 없는(unknown) 리소스의 수입니다. |
Go 런타임 메트릭#
이 메트릭은 Go 런타임에 의해 노출되며 Teleport에 국한되지 않습니다.
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
go_gc_duration_seconds |
summary | Internal Go | GC 호출 지속 시간의 요약입니다. |
go_goroutines |
gauge | Internal Go | 현재 존재하는 고루틴의 수입니다. |
go_info |
gauge | Internal Go | Go 환경에 대한 정보입니다. |
go_memstats_alloc_bytes_total |
counter | Internal Go | 해제된 것을 포함하여 할당된 전체 바이트 수입니다. |
go_memstats_alloc_bytes |
gauge | Internal Go | 할당되어 아직 사용 중인 바이트 수입니다. |
go_memstats_buck_hash_sys_bytes |
gauge | Internal Go | 프로파일링 버킷 해시 테이블에 사용된 바이트 수입니다. |
go_memstats_frees_total |
counter | Internal Go | 전체 해제(free) 횟수입니다. |
go_memstats_gc_cpu_fraction |
gauge | Internal Go | 프로그램 시작 이후 GC가 사용한, 이 프로그램의 가용 CPU 시간의 비율입니다. |
go_memstats_gc_sys_bytes |
gauge | Internal Go | 가비지 컬렉션 시스템 메타데이터에 사용된 바이트 수입니다. |
go_memstats_heap_alloc_bytes |
gauge | Internal Go | 할당되어 아직 사용 중인 힙 바이트 수입니다. |
go_memstats_heap_idle_bytes |
gauge | Internal Go | 사용 대기 중인 힙 바이트 수입니다. |
go_memstats_heap_inuse_bytes |
gauge | Internal Go | 사용 중인 힙 바이트 수입니다. |
go_memstats_heap_objects |
gauge | Internal Go | 할당된 객체의 수입니다. |
go_memstats_heap_released_bytes |
gauge | Internal Go | OS로 반환된 힙 바이트 수입니다. |
go_memstats_heap_sys_bytes |
gauge | Internal Go | 시스템으로부터 획득한 힙 바이트 수입니다. |
go_memstats_last_gc_time_seconds |
gauge | Internal Go | 마지막 가비지 컬렉션의 Unix epoch 이후 경과 초입니다. |
go_memstats_lookups_total |
counter | Internal Go | 전체 포인터 조회 횟수입니다. |
go_memstats_mallocs_total |
counter | Internal Go | 전체 malloc 횟수입니다. |
go_memstats_mcache_inuse_bytes |
gauge | Internal Go | mcache 구조체가 사용 중인 바이트 수입니다. |
go_memstats_mcache_sys_bytes |
gauge | Internal Go | 시스템으로부터 획득한 mcache 구조체에 사용된 바이트 수입니다. |
go_memstats_mspan_inuse_bytes |
gauge | Internal Go | mspan 구조체가 사용 중인 바이트 수입니다. |
go_memstats_mspan_sys_bytes |
gauge | Internal Go | 시스템으로부터 획득한 mspan 구조체에 사용된 바이트 수입니다. |
go_memstats_next_gc_bytes |
gauge | Internal Go | 다음 가비지 컬렉션이 수행될 시점의 힙 바이트 수입니다. |
go_memstats_other_sys_bytes |
gauge | Internal Go | 기타 시스템 할당에 사용된 바이트 수입니다. |
go_memstats_stack_inuse_bytes |
gauge | Internal Go | 스택 할당자가 사용 중인 바이트 수입니다. |
go_memstats_stack_sys_bytes |
gauge | Internal Go | 스택 할당자를 위해 시스템으로부터 획득한 바이트 수입니다. |
go_memstats_sys_bytes |
gauge | Internal Go | 시스템으로부터 획득한 바이트 수입니다. |
go_threads |
gauge | Internal Go | 생성된 OS 스레드의 수입니다. |
process_cpu_seconds_total |
counter | Internal Go | 사용된 전체 사용자 및 시스템 CPU 시간(초)입니다. |
process_max_fds |
gauge | Internal Go | 열 수 있는 파일 디스크립터의 최대 수입니다. |
process_open_fds |
gauge | Internal Go | 열려 있는 파일 디스크립터의 수입니다. |
process_resident_memory_bytes |
gauge | Internal Go | 상주 메모리 크기(바이트)입니다. |
process_start_time_seconds |
gauge | Internal Go | Unix epoch 이후 프로세스의 시작 시간(초)입니다. |
process_virtual_memory_bytes |
gauge | Internal Go | 가상 메모리 크기(바이트)입니다. |
process_virtual_memory_max_bytes |
gauge | Internal Go | 사용 가능한 가상 메모리의 최대량(바이트)입니다. |
Prometheus#
| 이름 | 유형 | 구성 요소 | 설명 |
|---|---|---|---|
promhttp_metric_handler_requests_in_flight |
gauge | prometheus | 현재 처리 중인 스크레이프의 수입니다. |
promhttp_metric_handler_requests_total |
counter | prometheus | HTTP 상태 코드별 스크레이프의 전체 수입니다. |
분산 추적#
Teleport 인스턴스에 대한 분산 추적을 활성화하는 방법입니다.
Teleport는 OpenTelemetry를 활용하여 추적을 생성하고 OpenTelemetry Protocol (OTLP) 호환 내보내기로 내보냅니다. 텔레메트리 백엔드가 OTLP 추적 수신을 지원하지 않는 경우, OpenTelemetry Collector를 활용하여 OTLP에서 텔레메트리 백엔드가 허용하는 형식으로 추적을 프록시할 수 있습니다.
Teleport 구성#
teleport 인스턴스에 대한 추적을 활성화하려면 해당 인스턴스의 구성 파일(/etc/teleport.yaml)에 다음 섹션을 추가합니다. 이러한 구성 필드에 대한 자세한 설명은 구성 참조 페이지를 참조하세요.
tracing_service:
enabled: true
exporter_url: grpc://collector.example.com:4317
sampling_rate_per_million: 1000000
샘플링 속도#
샘플링 속도를 신중하게 선택하는 것이 중요합니다. 100% 속도로 샘플링하면 클러스터 성능에 부정적인 영향을 줄 수 있습니다. Teleport는 들어오는 요청에 포함된 샘플링 속도를 준수합니다. 즉, tracing_service가 활성화되고 샘플링 속도가 0이더라도, Teleport가 샘플링된 스팬이 있는 요청을 수신하면 Teleport는 해당 요청에 대응하여 생성된 모든 스팬을 샘플링하고 내보냅니다.
내보내기 URL#
exporter_url 설정은 Teleport가 스팬을 전송할 위치를 나타냅니다. 지원되는 스킴은 grpc://, http://, https://, file://입니다(스킴이 제공되지 않으면 grpc://가 사용됩니다).
file://을 사용할 때, URL은 Teleport에 쓰기 권한이 있는 디렉터리 경로여야 합니다. 스팬은 제공된 디렉터리 내의 파일에 저장되며, 각 파일에는 줄당 하나의 proto 인코딩된 스팬이 포함됩니다. 파일이 100MB를 초과하면 교체됩니다. 기본 제한을 재정의하려면 exporter_url에 ?limit=<desired_file_size_in_bytes>를 추가합니다(예: file:///var/lib/teleport/traces?limit=100).
기본적으로 내보내기에 대한 연결은 안전하지 않습니다. TLS를 지원하려면 tracing_service 구성에 다음을 추가합니다:
# 선택 사항: 내보내기 유효성 검사에 사용되는 CA 인증서 경로
ca_certs:
- /var/lib/teleport/exporter_ca.pem
# 선택 사항: 내보내기에 대한 mTLS를 활성화하는 TLS 인증서 경로
https_keypairs:
- key_file: /var/lib/teleport/exporter_key.pem
cert_file: /var/lib/teleport/exporter_cert.pem
teleport.yaml을 업데이트한 후 새 구성을 적용하려면 teleport 인스턴스를 시작합니다.
tsh#
tsh에서 추적을 캡처하려면 명령에 --trace 플래그를 추가합니다. tsh --trace로 생성된 모든 추적은 명령이 실행 중인 클러스터의 Auth 서비스에 정의된 exporter_url로 프록시됩니다.
$ tsh --trace ssh root@myserver
$ tsh --trace ls
Auth 서비스 구성에 정의된 것과 다른 내보내기로 tsh에서 추적을 내보내는 것도 --trace-exporter 플래그를 통해 가능합니다. tracing_service의 exporter_url과 동일한 형식을 따르는 URL을 제공해야 합니다.
$ tsh --trace --trace-exporter=grpc://collector.example.com:4317 ssh root@myserver
$ tsh --trace --trace-exporter=file:///var/lib/teleport/traces ls
프로파일 수집#
Teleport 인스턴스에서 런타임 프로파일링 데이터를 수집하는 방법입니다.
Teleport는 Go의 진단 기능을 활용하여 프로파일링 데이터를 수집하고 내보냅니다. 프로파일은 CPU 급증의 원인, 메모리 누수의 출처 또는 교착 상태의 이유를 식별하는 데 도움이 됩니다.
Debug 서비스 사용#
Teleport Debug 서비스를 사용하면 관리자가 시작 시 pprof 엔드포인트를 활성화하지 않고도 진단 프로파일을 수집할 수 있습니다. 기본적으로 활성화된 서비스는 로컬 전용 접근을 보장하며 동일한 인스턴스 내에서만 사용해야 합니다.
teleport debug profile은 pprof 프로파일 목록을 수집합니다. STDOUT으로 압축된 tarball(.tar.gz)을 출력합니다. tar를 사용하여 압축을 풀거나 결과를 파일로 보내면 됩니다.
기본적으로 goroutine, heap, profile 프로파일을 수집합니다.
수집된 각 프로파일은 tarball 내의 해당 파일을 가집니다. 예를 들어, goroutine,trace,heap을 수집하면 goroutine.pprof, trace.pprof, heap.pprof 파일이 생성됩니다.
# 기본 프로파일을 수집하여 파일에 저장합니다.
$ teleport debug profile > pprof.tar.gz
$ tar xvf pprof.tar.gz
# 기본 프로파일을 수집하고 압축을 풉니다.
$ teleport debug profile | tar xzv -C ./
# "trace" 및 "mutex" 프로파일을 수집하여 파일에 저장합니다.
$ teleport debug profile trace,mutex > pprof.tar.gz
# 프로파일링 시간을 초 단위로 설정하여 프로파일을 수집합니다
$ teleport debug profile -s 20 trace > pprof.tar.gz
Teleport 구성이 기본 경로(/etc/teleport.yaml)에 위치하지 않은 경우,
-c/--config 플래그를 사용하여 CLI 명령에 해당 위치를 지정해야 합니다.
Kubernetes 클러스터에서 Teleport를 실행 중인 경우 인터랙티브 세션 없이 로컬 디렉터리로 직접 프로파일을 수집할 수 있습니다:
$ kubectl -n teleport exec my-pod -- teleport debug profile > pprof.tar.gz
내용을 추출한 후 go tool 명령을 사용하여 탐색하고 시각화할 수 있습니다:
# 터미널 인터랙티브 탐색기를 엽니다
$ go tool pprof heap.pprof
# 웹 시각화 도구를 엽니다
$ go tool pprof -http : heap.pprof
# 추적 프로파일을 시각화합니다
$ go tool trace trace.pprof
진단 엔드포인트 사용#
프로파일링 엔드포인트는 --debug 플래그가 제공된 경우에만 활성화됩니다.
Teleport의 진단 HTTP 엔드포인트는 기본적으로 비활성화되어 있습니다. 다음을 통해 활성화할 수 있습니다:
Command line
진단 엔드포인트가 수신 대기할 로컬 주소로 `--diag-addr` 플래그를 설정하여
`teleport` 인스턴스를 시작합니다:
```code
$ sudo teleport start --debug --diag-addr=127.0.0.1:3000
```
Config file
`teleport` 인스턴스의 구성 파일(기본값 `/etc/teleport.yaml`)을 편집하여
다음을 포함시킵니다:
```yaml
teleport:
diag_addr: 127.0.0.1:3000
```
디버그 로그를 활성화하려면:
```yaml
log:
severity: DEBUG
```
진단 엔드포인트에 연결할 수 있는지 확인하세요
이제 Teleport가 진단 엔드포인트를 제공하고 있는지 확인합니다:
```code
$ curl http://127.0.0.1:3000/healthz
```
프로파일 수집#
Go의 표준 프로파일링 엔드포인트는 http://127.0.0.1:3000/debug/pprof/에서 제공됩니다.
프로파일을 검색하려면 원하는 프로파일 유형에 해당하는 엔드포인트에 요청을 보내야 합니다. 문제를 디버깅할 때 일정 기간 동안 일련의 프로파일을 수집하는 것이 유용합니다.
CPU#
CPU 프로파일은 사용자가 지정한 기간 동안 수집된 실행 통계를 보여줍니다:
# 프로파일을 파일로 다운로드합니다:
$ curl -o cpu.profile http://127.0.0.1:3000/debug/pprof/profile?seconds=30
# 프로파일을 시각화합니다
$ go tool pprof -http : cpu.profile
Goroutine#
Goroutine 프로파일은 시스템에서 실행 중인 모든 goroutine의 스택 추적을 보여줍니다:
# 프로파일을 파일로 다운로드합니다:
$ curl -o goroutine.profile http://127.0.0.1:3000/debug/pprof/goroutine
# 프로파일을 시각화합니다
$ go tool pprof -http : goroutine.profile
Heap#
Heap 프로파일은 시스템에 할당된 객체를 보여줍니다:
# 프로파일을 파일로 다운로드합니다:
$ curl -o heap.profile http://127.0.0.1:3000/debug/pprof/heap
# 프로파일을 시각화합니다
$ go tool pprof -http : heap.profile
Trace#
Trace 프로파일은 사용자가 지정한 기간 동안 Go 런타임이 수집하는 스케줄링, 시스템 호출, 가비지 컬렉션, 힙 크기 및 기타 이벤트를 캡처합니다:
# 프로파일을 파일로 다운로드합니다:
$ curl -o trace.out http://127.0.0.1:3000/debug/pprof/trace?seconds=5
# 프로파일을 시각화합니다
$ go tool trace trace.out
추가 읽기#
- Go 에코시스템의 진단에 대한 자세한 정보: https://go.dev/doc/diagnostics
- Go의 프로파일링 엔드포인트: https://golang.org/pkg/net/http/pprof/
- Go 프로그램 프로파일링에 대한 심층 가이드: https://go.dev/blog/pprof