Outline 서버 성능 측정항목에 액세스
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Outline에서는 Prometheus를 통해 자세한 성능 측정항목을 제공하므로 서버의 사용과 상태에 관한 상세하고 유용한 정보를 확인할 수 있습니다. 이 가이드에서는 이러한 측정항목을 검색해 확인하는 과정을 안내합니다.
중요 참고사항: 이 가이드에서는 Prometheus와 PromQL을 기본적으로 알고 있다고 가정합니다. Prometheus를 모른다면 문서와 튜토리얼을 살펴본 후 Outline의 측정항목을 살펴보는 것이 좋습니다.
기본 요건
안내
Prometheus 포트 전달
SSH를 사용하여 서버에 연결하고 포트 9090을 전달합니다.
ssh root@your_server_ip -L 9090:localhost:9090
Prometheus 웹 인터페이스 액세스
웹브라우저를 열고 http://localhost:9090/graph Query Prometheus Metrics로 이동합니다.
PromQL 쿼리를 사용하여 관심 있는 특정 측정항목 검색
PromQL 쿼리 예
사용
데이터 바이트(액세스 키, 프로토콜, 방향별):
increase(shadowsocks_data_bytes[1d])
데이터 바이트(액세스 키별로 집계):
sum(increase(shadowsocks_data_bytes[1d])) by (access_key)
데이터 바이트(데이터 한도 계산용):
sum(increase(shadowsocks_data_bytes{dir=~"c<p|p>t"}[30d])) by (access_key)
데이터 바이트(위치, 프로토콜, 방향별):
increase(shadowsocks_data_bytes_per_location[1d])
활성 액세스 키
sum(max(max_over_time(shadowsocks_data_bytes{access_key!=""} [1h])) by (access_key) > bool 0)
TCP 연결
UDP
Prometheus:
prometheus_build_info
outline-ss-server:
shadowsocks_build_info
Node.js:
nodejs_version_info
사용 가능한 측정항목 전체 목록은 outline-ss-server
소스 코드에서 확인할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eOutline provides detailed performance metrics via Prometheus, offering insights into server usage and health.\u003c/p\u003e\n"],["\u003cp\u003eAccessing these metrics requires an Outline server with Prometheus enabled and SSH access to forward port 9090.\u003c/p\u003e\n"],["\u003cp\u003eYou can use PromQL queries to retrieve specific metrics, such as data bytes, active access keys, TCP connections, and UDP packets.\u003c/p\u003e\n"],["\u003cp\u003ePerformance metrics are also available for CPU usage and memory by process.\u003c/p\u003e\n"],["\u003cp\u003eBuild information for Prometheus, outline-ss-server, and Node.js are available as well, providing software versioning.\u003c/p\u003e\n"]]],["Performance metrics are accessed via Prometheus, requiring an Outline server with Prometheus enabled and SSH access. Port 9090 is forwarded via SSH to view metrics in a web browser at `http://localhost:9090/graph`. PromQL queries retrieve metrics like data bytes, active access keys, TCP connections, UDP packets/associations, and CPU/memory usage. Build information for Prometheus, `outline-ss-server`, and Node.js are also available. The source code provides a complete metrics list.\n"],null,["# Accessing Outline Server Performance Metrics\n\nOutline provides detailed performance metrics through\n[Prometheus](https://prometheus.io/), allowing you to gain deeper insights into\nyour server's usage and health. This guide will walk you through the process of\nretrieving and viewing these metrics.\n\n**Important Note:** This guide assumes you have a basic understanding of\nPrometheus and PromQL. If you're new to Prometheus, consider exploring its\ndocumentation and tutorials before diving into Outline's metrics.\n\nPrerequisites\n-------------\n\n- **Outline server with Prometheus enabled**: Ensure that your Outline server\n has Prometheus metrics enabled. (This is usually the default configuration).\n\n- **SSH access to your server**: You'll need SSH access to forward the\n Prometheus port.\n\nInstructions\n------------\n\n1. **Forward Prometheus Port**\n\n Connect to your server using SSH and forward port 9090: \n\n ssh root@your_server_ip -L 9090:localhost:9090\n\n2. **Access Prometheus Web Interface**\n\n Open your web browser and navigate to: \u003chttp://localhost:9090/graph\u003e\n Query Prometheus Metrics\n3. **Use PromQL queries to retrieve the specific metrics you're interested in.**\n\n### Example PromQL Queries\n\n#### Usage\n\n- **Data Bytes (by access key, protocol, and direction):**\n\n `increase(shadowsocks_data_bytes[1d])`\n- **Data Bytes (aggregated by access key):**\n\n `sum(increase(shadowsocks_data_bytes[1d])) by (access_key)`\n- **Data Bytes (for data limits calculation):**\n\n `sum(increase(shadowsocks_data_bytes{dir=~\"c\u003cp|p\u003et\"}[30d])) by (access_key)`\n- **Data Bytes (by location, protocol, and direction):**\n\n `increase(shadowsocks_data_bytes_per_location[1d])`\n\n#### Active Access Keys\n\n`sum(max(max_over_time(shadowsocks_data_bytes{access_key!=\"\"} [1h])) by (access_key) \u003e bool 0)`\n\n#### TCP Connections\n\n- **TCP Connections (by access key, location, and status):**\n\n `increase(shadowsocks_tcp_connections_closed[1d])`\n- **TCP Connections (by location):**\n\n `increase(shadowsocks_tcp_connections_opened[1d])`\n\n#### UDP\n\n- **UDP Packets (by location and status):**\n\n `increase(shadowsocks_udp_packets_from_client_per_location[1d])`\n- **UDP Associations (no breakdown):**\n\n `increase(shadowsocks_udp_nat_entries_added[1d])`\n\n#### Performance\n\n- **CPU Usage (by process):**\n\n `rate(process_cpu_seconds_total[10m])`\n- **Memory (by process):**\n\n `process_virtual_memory_bytes`\n\n#### Build Information\n\n- **Prometheus:**\n\n `prometheus_build_info`\n- **outline-ss-server:**\n\n `shadowsocks_build_info`\n- **Node.js:**\n\n `nodejs_version_info`\n\nThe complete list of available metrics can be found in the `outline-ss-server`\n[source code](https://github.com/Jigsaw-Code/outline-ss-server/blob/master/cmd/outline-ss-server/metrics.go)."]]