Outline सर्वर की परफ़ॉर्मेंस मेट्रिक ऐक्सेस करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Outline, Prometheus की मदद से परफ़ॉर्मेंस की ज़्यादा जानकारी देने वाली मेट्रिक उपलब्ध कराता है. इससे आपको अपने सर्वर के इस्तेमाल और परफ़ॉर्मेंस के बारे में ज़्यादा जानकारी मिलती है. इस गाइड में, इन मेट्रिक को हासिल करने और देखने का तरीका बताया गया है.
अहम जानकारी: इस गाइड में यह माना गया है कि आपके पास Prometheus और PromQL के बारे में बुनियादी जानकारी है. अगर आपने प्रोमेथस का इस्तेमाल पहले कभी नहीं किया है, तो Outline की मेट्रिक के बारे में ज़्यादा जानने से पहले, इसके दस्तावेज़ों और ट्यूटोरियल को एक्सप्लोर करें.
ज़रूरी शर्तें
Outline सर्वर, जिसमें Prometheus चालू है: पक्का करें कि आपके Outline सर्वर
में Prometheus मेट्रिक चालू हो. (आम तौर पर, यह डिफ़ॉल्ट कॉन्फ़िगरेशन होता है).
आपके सर्वर का एसएसएच ऐक्सेस: आपको Prometheus पोर्ट को फ़ॉरवर्ड करने के लिए, एसएसएच ऐक्सेस की ज़रूरत होगी.
निर्देश
फ़ॉरवर्ड प्रोमेथियस पोर्ट
एसएसएच का इस्तेमाल करके अपने सर्वर से कनेक्ट करें और पोर्ट 9090 को फ़ॉरवर्ड करें:
ssh root@your_server_ip -L 9090:localhost:9090
Prometheus वेब इंटरफ़ेस ऐक्सेस करना
अपना वेब ब्राउज़र खोलें और http://localhost:9090/graph
क्वेरी Prometheus मेट्रिक पर जाएं
अपनी पसंदीदा मेट्रिक को वापस पाने के लिए, 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)
टीसीपी कनेक्शन
टीसीपी कनेक्शन (ऐक्सेस कुंजी, जगह, और स्थिति के हिसाब से):
increase(shadowsocks_tcp_connections_closed[1d])
जगह के हिसाब से टीसीपी कनेक्शन:
increase(shadowsocks_tcp_connections_opened[1d])
यूडीपी
यूडीपी पैकेट (जगह और स्थिति के हिसाब से):
increase(shadowsocks_udp_packets_from_client_per_location[1d])
यूडीपी असोसिएशन (कोई ब्रेकडाउन नहीं):
increase(shadowsocks_udp_nat_entries_added[1d])
सीपीयू का इस्तेमाल (प्रोसेस के हिसाब से):
rate(process_cpu_seconds_total[10m])
मेमोरी (प्रोसेस के हिसाब से):
process_virtual_memory_bytes
प्रोमेथियस:
prometheus_build_info
outline-ss-server:
shadowsocks_build_info
Node.js:
nodejs_version_info
उपलब्ध मेट्रिक की पूरी सूची, outline-ss-server
सोर्स कोड में देखी जा सकती है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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)."]]