{"id":43647,"date":"2023-05-21T23:11:28","date_gmt":"2023-06-29T01:55:11","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/"},"modified":"2025-07-30T03:20:39","modified_gmt":"2025-07-29T19:20:39","slug":"%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/","title":{"rendered":"\u5f00\u59cb\u4f7f\u7528PromQL"},"content":{"rendered":"<h1>\u9996\u5148<\/h1>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u662f\u6839\u636e Prometheus \u7684 &#8220;QUERING PROMETHEUS&#8221; \u4e00\u7ae0\u8fdb\u884c\u7684\u65e5\u672c\u8bed\u7ffb\u8bd1\uff0c\u5e76\u7ed3\u5408\u4e86 Prometheus \u5165\u95e8\u7684\u5185\u5bb9\u4ee5\u53ca\u5b9e\u9645\u5c1d\u8bd5\u7684\u5185\u5bb9\u8fdb\u884c\u4e86\u8865\u5145\u3002<\/p>\n<p>\u66f4\u5177\u5b9e\u9645\u5e94\u7528\u4ef7\u503c\u7684\u4f8b\u5b50\u53ef\u4ee5\u5728\u300aKubernetes\uff08GKE\uff09\u5b9e\u7528\u5c0f\u6280\u5de7\uff1a\u4fbf\u6377\u7684Prometheus\u6280\u5de7\u96c6\u300b\u4e00\u4e66\u4e2d\u627e\u5230\u3002<\/p>\n<h1>PromQL \u662f\u4e00\u79cd\u67e5\u8be2\u8bed\u8a00\u3002<\/h1>\n<p>PromQL\uff08Prometheus Query Language\uff09\u662f\u7528\u4e8e\u83b7\u53d6\u548c\u805a\u5408Prometheus\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u7684\u67e5\u8be2\u8bed\u8a00\u3002<\/p>\n<p>\u67e5\u8be2\u7ed3\u679c\u53ef\u4ee5\u5728Prometheus\u7684\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e2d\u4ee5\u8868\u683c\u5f62\u5f0f\u6216\u56fe\u8868\u5f62\u5f0f\u8fdb\u884c\u663e\u793a\u3002<\/p>\n<p>\u5f53\u4f7f\u7528\u50cfGrafana\u8fd9\u6837\u7684\u56fe\u8868\u7ed8\u5236\u5de5\u5177\u8fdb\u884c\u56fe\u8868\u663e\u793a\u65f6\uff0c\u6211\u4eec\u4f1a\u4f7f\u7528\u67e5\u8be2\u8bed\u8a00\u6765\u5411Prometheus\u53d1\u9001\u67e5\u8be2\u8bf7\u6c42\u3002<\/p>\n<h1>\u4ee5\u4e0b\u662f\u4e2d\u6587\u7684\u540c\u4e49\u77ed\u8bed\uff1a<\/h1>\n<p>\u5ea6\u91cf\u8861<\/p>\n<p>Prometheus\u6240\u53c2\u8003\u7684\u65f6\u5e8f\u6570\u636e\u79f0\u4e3a\u6307\u6807\uff08metric\uff09\u3002<br \/>\n\u4f8b\u5982\uff0c\u8868\u5f81\u5185\u5b58\u4f7f\u7528\u91cf\u7684 process_resident_memory_bytes \u5c31\u662f\u4e00\u4e2a\u6307\u6807\u3002<\/p>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5bf9\u4e8e\u67d0\u4e2a\u5ea6\u91cf\u6307\u6807\uff0c\u5b58\u5728\u591a\u4e2a\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002\u4f8b\u5982\uff0c\u5ea6\u91cf\u6307\u6807 process_resident_memory_bytes \u53ef\u80fd\u4f1a\u6709 Prometheus \u7684\u5185\u5b58\u4f7f\u7528\u91cf\u548c\u4e3b\u673a\u7684\u5185\u5b58\u4f7f\u7528\u91cf\u8fd9\u4e24\u4e2a\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002<\/p>\n<h1>\u6570\u636e\u7c7b\u578b<\/h1>\n<p>PromQL \u53ef\u5904\u7406\u7684\u6570\u636e\u7c7b\u578b\u5305\u62ec\u4ee5\u4e0b\u51e0\u79cd\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Instant vector<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Range vector<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Scalar<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">String<\/ul>\n<p>\u5373\u65f6\u5411\u91cf\u662f\u4e00\u79cd\u7c7b\u4f3c\u4e8e\u5185\u5b58\u4f7f\u7528\u91cf\u7684\u65f6\u5e8f\u6570\u636e\u3002<br \/>\n\u8303\u56f4\u5411\u91cf\u662f\u8fc7\u53bb\u4e00\u6bb5\u65f6\u95f4\u5185\u5373\u65f6\u5411\u91cf\u503c\u7684\u805a\u5408\u6570\u636e\uff0c\u4ece\u67d0\u4e2a\u65f6\u95f4\u70b9\u5f00\u59cb\u8ba1\u7b97\u3002<br \/>\n\u6807\u91cf\u548c\u5b57\u7b26\u4e32\u6307\u7684\u662f\u4e0d\u662f\u65f6\u5e8f\u7684\u7b80\u5355\u503c\uff0c\u6bd4\u59821\u548c&#8221;string&#8221;\u3002<\/p>\n<p>\u53ef\u4ee5\u5728\u56fe\u8868\u4e2d\u663e\u793a\u7684\u662f\u5373\u65f6\u5411\u91cf\uff0c\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u5219\u7528\u4e8e\u5728\u8ba1\u7b97\u503c\u6216\u5728\u7279\u5b9a\u65f6\u95f4\u6bb5\u5185\u6c47\u603b\u503c\u65f6\u4f7f\u7528\u3002<\/p>\n<h1>\u6642\u7cfb\u5217\u6570\u636e\u9009\u62e9\u5668<\/h1>\n<h2>\u516c\u5f0f<\/h2>\n<p>\u6700\u7b80\u5355\u7684\u9009\u62e9\u5668\u5f62\u5f0f\u662f\u4f7f\u7528\u6307\u6807\u540d\u79f0\u3002<\/p>\n<p>\u4f8b\u5982\uff0cprocess_resident_memory_bytes\u5c06\u9009\u62e9\u6240\u6709\u5177\u6709&#8221;\u8fdb\u7a0b\u9a7b\u7559\u5185\u5b58\u5b57\u8282&#8221;\u6307\u6807\u7684\u5373\u65f6\u5411\u91cf\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d53b837434c4406cd06c2\/19-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4e0a\u9762\u7684\u662f\u5728 Prometheus \u7684 Grafana \u6d4f\u89c8\u5668\u4e2d\u5c55\u793a process_resident_memory_bytes \u7684\u56fe\u5f62\u7ed3\u679c\u3002\u53ef\u4ee5\u770b\u5230\u9009\u62e9\u4e86\u5177\u6709\u4e24\u4e2a\u6807\u7b7e\u7684 instant vector\uff1a{instance=&#8221;localhost:9100&#8243;, job=&#8221;node&#8221;} \u548c {instance=&#8221;localhost:9090&#8243;, job=&#8221;prometheus&#8221;}\u3002<\/p>\n<h2>\u6807\u7b7e\u5339\u914d\u5668\uff08\u57fa\u672c\u7248\uff09<\/h2>\n<p>\u7528\u6807\u7b7e\u6765\u8fc7\u6ee4\u6307\u6807\u7684\u90e8\u5206\u88ab\u79f0\u4e3a\u6807\u7b7e\u5339\u914d\u5668\u3002<\/p>\n<p>\u5982\u679c\u6211\u4eec\u6b63\u5728\u63d0\u53d6 Prometheus \u8fdb\u7a0b\uff08job=&#8221;prometheus&#8221;\uff09\u548c\u4e3b\u673a\uff08job=&#8221;node&#8221;\uff09\u7684\u4e24\u4e2a\u5185\u5b58\u4f7f\u7528\u91cf\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528 process_resident_memory_bytes{job=&#8221;node&#8221;} \u6765\u83b7\u53d6\u4ec5\u4e3b\u673a\u7684\u5185\u5b58\u4f7f\u7528\u91cf\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d53b837434c4406cd06c2\/24-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c{job=&#8221;node&#8221;} \u662f\u4e00\u4e2a\u6807\u7b7e\u5339\u914d\u5668\u3002<br \/>\n\u53ea\u6709\u6807\u7b7e\u7684 job \u5b8c\u5168\u5339\u914d &#8220;node&#8221; \u7684\u6570\u636e\u624d\u80fd\u88ab\u8fc7\u6ee4\u51fa\u6765\u3002<\/p>\n<p>\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d &#8220;n&#8221; \u5f00\u5934\u7684\u4efb\u4f55\u5de5\u4f5c\u3002<\/p>\n<div>\n<div class=\"post-table\">\u30aa\u30da\u30ec\u30fc\u30bf\u8aac\u660e=\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3068\u5b8c\u5168\u4e00\u81f4\u3059\u308b\u30e9\u30d9\u30eb\u3092\u9078\u629e\u3059\u308b!=\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u3068\u7570\u306a\u308b\u30e9\u30d9\u30eb\u3092\u9078\u629e\u3059\u308b=~\u6307\u5b9a\u3057\u305f\u6b63\u898f\u8868\u73fe\u306b\u5408\u81f4\u3059\u308b\u30e9\u30d9\u30eb\u3092\u9078\u629e\u3059\u308b!~\u6307\u5b9a\u3057\u305f\u6b63\u898f\u8868\u73fe\u306b\u5408\u81f4\u3057\u306a\u3044\u30e9\u30d9\u30eb\u3092\u9078\u629e\u3059\u308b<\/div>\n<\/div>\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6bd4\u5982\u6307\u5b9a\u4e86 hoge=&#8221;&#8221; \uff0c\u5c06\u4f1a\u9009\u62e9\u6240\u6709\u4e0d\u5b58\u5728\u6807\u7b7e hoge \u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002<\/p>\n<h2>\u6807\u7b7e\u5339\u914d\u5668\uff08\u5e94\u7528\uff09<\/h2>\n<p>\u6807\u7b7e\u5339\u914d\u5668\u53ef\u4ee5\u5e94\u7528\u4e8e\u6307\u6807\u540d\u79f0\u3002<\/p>\n<p>\u7531\u4e8e metric \u540d\u79f0\u5185\u90e8\u9644\u6709 __name__ \u6807\u7b7e\uff0c\u56e0\u6b64\u53ef\u4ee5\u4e3a\u8be5\u6807\u7b7e\u6307\u5b9a\u5339\u914d\u5668\u4ee5\u9009\u62e9\u591a\u4e2a metric\u3002\u4f8b\u5982\uff0c\u4f7f\u7528 {__name__=~&#8221;.*_count&#8221;}\uff0c\u53ef\u4ee5\u9009\u62e9\u4ee5 _count \u7ed3\u5c3e\u7684\u591a\u4e2a metric\u3002<\/p>\n<h2>\u65e0\u6548\u7684\u9009\u62e9\u5668<\/h2>\n<p>\u5728\u9009\u62e9\u65f6\u5e8f\u6570\u636e\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u6307\u6807\u540d\u79f0\u6216\u65e0\u6807\u7b7e\u5339\u914d\u7684\u6807\u7b7e\u9009\u62e9\u5668\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5982\u679c\u672a\u6307\u5b9a\u6307\u6807\u540d\u79f0\u4e3a {job=~&#8221;.*&#8221;} \u6216\u8005 {hoge=&#8221;&#8221;}\uff0c\u5219\u5728\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e2d\u4f1a\u663e\u793a\u9519\u8bef\u3002<\/p>\n<p>\u6267\u884c\u67e5\u8be2\u65f6\u51fa\u9519\uff1aY:X\uff1a\u89e3\u6790\u9519\u8bef\uff1a\u5411\u91cf\u9009\u62e9\u5668\u5fc5\u987b\u5305\u542b\u81f3\u5c11\u4e00\u4e2a\u975e\u7a7a\u5339\u914d\u5668\u3002<\/p>\n<h1>\u8303\u56f4\u5411\u91cf\u9009\u62e9\u5668<\/h1>\n<p>\u533a\u95f4\u5411\u91cf\u662f\u5728\u67d0\u4e2a\u65f6\u95f4\u70b9\u5230\u8fc7\u53bb\u4e00\u6bb5\u65f6\u95f4\u5185\u7684\u5b9e\u4f8b\u5411\u91cf\u503c\u805a\u96c6\u7684\u6570\u636e\u3002<\/p>\n<p>\u5728\u8fd9\u6bb5\u65f6\u95f4\u5185 [1m] \u8868\u793a\u4e3a\u7c7b\u4f3c\u7684\u65b9\u5f0f\uff0c\u5e76\u4e14\u8fd9\u662f\u4e00\u4e2a\u8303\u56f4\u5411\u91cf\u9009\u62e9\u5668\u3002<br \/>\n\u53ef\u7528\u7684\u5355\u4f4d\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<p>s &#8211; seconds<\/p>\n<p>m &#8211; minutes<\/p>\n<p>h &#8211; hours<\/p>\n<p>d &#8211; days<\/p>\n<p>w &#8211; weeks<\/p>\n<p>y &#8211; years<\/p>\n<p>\u5982\u679c\u5728\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e2d\u663e\u793a process_resident_memory_bytes[1m]\uff0c\u5c06\u663e\u793a\u4ee5\u4e0b\u6570\u636e\u3002<br \/>\n\uff08\u7531\u4e8e\u8303\u56f4\u5411\u91cf\u65e0\u6cd5\u5728\u56fe\u8868\u4e2d\u663e\u793a\uff0c\u56e0\u6b64\u9700\u8981\u5728\u63a7\u5236\u53f0\u9009\u9879\u5361\u4e2d\u67e5\u770b\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d53b837434c4406cd06c2\/41-0.png\" alt=\"image.png\" \/><\/div>\n<div>\n<div class=\"post-table\">ElementValueprocess_resident_memory_bytes{instance=&#8221;localhost:9090&#8243;,job=&#8221;prometheus&#8221;}117702656 @1595670216.99<br \/>\n117702656 @1595670231.989<br \/>\n117702656 @1595670246.991<br \/>\n117702656 @1595670261.991process_resident_memory_bytes{instance=&#8221;localhost:9100&#8243;,job=&#8221;node&#8221;}22122496 @1595670213.37<br \/>\n22122496 @1595670228.369<br \/>\n22122496 @1595670243.368<br \/>\n22122496 @1595670258.368<\/div>\n<\/div>\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u8be5\u503c\u88ab\u8d4b\u4e88\u4e86\u4e00\u4e2a\u65f6\u95f4\u6233\u4e3a\uff5e@1595670216.99\u7684\u503c\u3002<br \/>\n\u5728\u4e00\u4e2aRange vector\u4e2d\uff0c\u6570\u503c\u7684\u5f62\u5f0f\u662fValue @ Value\u88ab\u6293\u53d6\u7684\u65f6\u95f4\u3002<br \/>\n\u8fd9\u91cc\u67094\u4e2a\u6570\u503c\u662f\u56e0\u4e3a\u6293\u53d6\u95f4\u9694\u88ab\u8bbe\u7f6e\u4e3a15\u79d2\uff0c\u6240\u4ee5\u57281\u5206\u949f\u5185\u83b7\u53d6\u4e864\u6b21\u503c\u3002<\/p>\n<p>Range vector \u7684\u7528\u9014\u5305\u62ec\u4e86\u4f8b\u5982\u4e86\u89e3\u6bcf\u5c0f\u65f6\u7684\u5e73\u5747\u5185\u5b58\u4f7f\u7528\u91cf\u7b49\u3002<br \/>\n\u203b \u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 Range vector \u7684\u805a\u5408\u51fd\u6570\u3002<\/p>\n<h1>\u504f\u79fb\u4fee\u9970\u7b26 zh\u011b)<\/h1>\n<p>\u504f\u79fb\u4fee\u9970\u7b26\u662f\u6307\u5c06Instant vector\u6216Range vector\u7684\u65f6\u95f4\u5411\u8fc7\u53bb\u63a8\u79fb\u6307\u5b9a\u7684\u65f6\u95f4\u91cf\u7684\u4fee\u9970\u7b26\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;instant_query \/ sub_query&gt; offset &lt;duration&gt;\r\n<\/code><\/pre>\n<p>\u5982\u679c\u4f7f\u7528 `process_resident_memory_bytes offset 1m`\uff0c\u90a3\u4e48\u524d1\u5206\u949f\u7684`process_resident_memory_bytes`\u7684\u503c\u5c06\u4f1a\u663e\u793a\u4e3a\u5f53\u524d\u65f6\u95f4\u3002<br \/>\n\u4ece\u56fe\u8868\u4e0a\u770b\uff0c\u5982\u679c\u6ca1\u6709\u6307\u5b9aoffset\uff0c\u6307\u5b9aoffset\u540e\u4f1a\u5c06\u5176\u5411\u53f3\u504f\u79fb1\u5206\u949f\u3002<br \/>\n\u6362\u53e5\u8bdd\u8bf4\uff0c\u5bf9\u4e8e\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u6bcf\u4e2a\u65f6\u95f4\u70b9\u4e0a\u90fd\u4f1a\u52a0\u4e0a\u7531offset\u6307\u5b9a\u7684\u503c\u7684\u5f71\u50cf\u3002<\/p>\n<p>\u4f7f\u7528\u504f\u79fb\u4fee\u9970\u7b26\u7684\u60c5\u51b5\u5305\u62ec\u5728\u9700\u8981\u786e\u5b9a\u8fdb\u7a0b\u662f\u5426\u91cd\u65b0\u542f\u52a8\u65f6\uff0c\u6bd4\u8f83\u8fc7\u53bb\u548c\u73b0\u5728\u7684\u8fdb\u7a0b\u542f\u52a8\u65f6\u95f4\u7b49\u3002\u8be6\u7ec6\u8bf7\u53c2\u8003\u793a\u4f8b\u3002<\/p>\n<h1>\u5b50\u67e5\u8be2<\/h1>\n<p>\u901a\u8fc7\u5728\u8fd4\u56de\u5373\u65f6\u5411\u91cf\u7684\u67e5\u8be2\u4e2d\u6dfb\u52a0\u5b50\u67e5\u8be2\uff0c\u53ef\u4ee5\u5c06\u67e5\u8be2\u8f6c\u6362\u4e3a\u6307\u5b9a\u65f6\u95f4\u8303\u56f4\u548c\u6307\u5b9a\u5206\u8fa8\u7387\u7684\u8303\u56f4\u5411\u91cf\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;instant_query&gt; '[' &lt;range&gt; ':' [&lt;resolution&gt;] ']' [ offset &lt;duration&gt; ]\r\n<\/code><\/pre>\n<p>\u5728\u4ee5\u4e0b\u573a\u666f\u4e2d\u53ef\u4ee5\u4f7f\u7528\u5b50\u67e5\u8be2\uff1a\u5f53\u9700\u8981\u77e5\u9053\u5728\u8fc7\u53bb1\u5929\u5185\u8fdb\u7a0b\u91cd\u65b0\u542f\u52a8\u4e86\u591a\u5c11\u6b21\u65f6\u3002<br \/>\n\u203b\u8be6\u7ec6\u4fe1\u606f\u8bf7\u53c2\u8003\u793a\u4f8b\u3002<\/p>\n<h1>\u8bc4\u8bba (Paraphrase: \u8bc4\u8bba)<\/h1>\n<p>PromQL \u652f\u6301\u6ce8\u91ca\u529f\u80fd\u3002<\/p>\n<pre class=\"post-pre\"><code># This is a comment\r\n<\/code><\/pre>\n<h1>\u64cd\u4f5c\u5458<\/h1>\n<h2>\u6570\u5b66\u8fd0\u7b97\u7b26<\/h2>\n<p>+ (addition)<\/p>\n<p>&#8211; (subtraction)<\/p>\n<p>* (multiplication)<\/p>\n<p>\/ (division)<\/p>\n<p>% (modulo)<\/p>\n<p>^ (power\/exponentiation)<\/p>\n<p>\u8fd9\u4e9b\u8fd0\u7b97\u7b26\u7684\u884c\u4e3a\u53d6\u51b3\u4e8e\u5de6\u4fa7\u548c\u53f3\u4fa7\u7684\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u53ea\u9700\u4e00\u4e2a\u9009\u9879\uff0c\u4ee5\u4e0b\u662f\u4e2d\u6587\u7684\u539f\u751f\u89e3\u91ca\uff1a<\/ol>\n<\/li>\n<\/ol>\n<p>\u5f53\u4e24\u4e2a\u64cd\u4f5c\u6570\u90fd\u662f\u6807\u91cf (` `) \u65f6\uff0c\u5b83\u7684\u884c\u4e3a\u662f\u5982\u4f55\u7684\u3002<br \/>\n\u5f53\u4e00\u4e2a\u64cd\u4f5c\u6570\u662f\u77ac\u65f6\u5411\u91cf\uff0c\u53e6\u4e00\u4e2a\u64cd\u4f5c\u6570\u662f\u6807\u91cf (` `) \u65f6\uff0c\u5b83\u7684\u884c\u4e3a\u662f\u5982\u4f55\u7684\u3002<br \/>\n\u5f53\u4e24\u4e2a\u64cd\u4f5c\u6570\u90fd\u662f\u77ac\u65f6\u5411\u91cf (` `) \u65f6\uff0c\u5b83\u7684\u884c\u4e3a\u662f\u5982\u4f55\u7684\u3002<\/p>\n<h3>\u5f53\u4e24\u4fa7\u4e3a\u6807\u91cf\u7684\u60c5\u51b5\u4e0b\u7684\u884c\u4e3a<\/h3>\n<p>\u5bf9\u4e8e\u4e24\u4e2a\u6807\u91cf\u503c\uff0c\u5c06\u8fdb\u884c\u7b97\u672f\u8fd0\u7b97\u3002<\/p>\n<p>\u4e3e\u4f8b\u6765\u8bf4\uff0c1\u52a01\u7b49\u4e8e2\u3002<\/p>\n<h3>\u5f53\u4e00\u4e2a\u8fb9\u662f\u77ac\u65f6\u5411\u91cf\uff0c\u53e6\u4e00\u4e2a\u8fb9\u662f\u6807\u91cf\u65f6\u7684\u884c\u4e3a\u3002<\/h3>\n<p>\u5373\u65f6\u5411\u91cf\u7684\u6240\u6709\u65f6\u95f4\u70b9\u7684\u503c\u90fd\u4e0e\u6807\u91cf\u503c\u8fdb\u884c\u7b97\u672f\u8fd0\u7b97\u3002<\/p>\n<p>\u5982\u679c\u4ee5 process_resident_memory_bytes \/ 1000 \u4f5c\u4e3a\u4f8b\uff0c\u90a3\u4e48\u5185\u5b58\u4f7f\u7528\u91cf\u5c06\u4ee5 KB \u800c\u975e\u5b57\u8282\u4f5c\u4e3a\u5355\u4f4d\u3002<\/p>\n<h3>\u5f53\u5de6\u53f3\u4e24\u8fb9\u4e3a\u77ac\u65f6\u5411\u91cf\u65f6\u7684\u884c\u4e3a\u3002<\/h3>\n<p>\u5bf9\u4e8e\u5de6\u4fa7\u6bcf\u4e2a\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u5c06\u5bf9\u4e0e\u53f3\u4fa7\u5339\u914d\u7684\u5143\u7d20\u6267\u884c\u7b97\u672f\u64cd\u4f5c\u3002<\/p>\n<p>\u4ece\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u4e2d\u5f97\u51fa\u7684\u7ed3\u679c\u5c06\u5220\u9664\u6307\u6807\u540d\u79f0\uff0c\u5e76\u4e3a\u7528\u4e8e\u7b97\u672f\u5206\u7ec4\u7684\u6807\u7b7e\u6dfb\u52a0\u5230\u7ed3\u679c\u4e2d\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5047\u8bbe\u4ee5 node_filesystem_avail_bytes \u4e58\u4ee5 100 \u518d\u9664\u4ee5 node_filesystem_size_bytes \uff0c\u53ef\u4ee5\u8ba1\u7b97\u51fa\u78c1\u76d8\u4f7f\u7528\u7387\u3002<\/p>\n<h2>\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/h2>\n<p>== (equal)<\/p>\n<p>!= (not-equal)<\/p>\n<p>&gt; (greater-than)<\/p>\n<p>&lt; (less-than) &gt;= (greater-or-equal)<\/p>\n<p>&lt;= (less-or-equal)<\/p>\n<p>\u8fd9\u4e9b\u8fd0\u7b97\u7b26\u7684\u884c\u4e3a\u53d6\u51b3\u4e8e\u5de6\u4fa7\u548c\u53f3\u4fa7\u7684\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5f53\u4e24\u8fb9\u90fd\u662f\u6807\u91cf\u65f6\u7684\u884c\u4e3a\uff08&lt;\u6807\u91cf&gt; &lt;\u7b97\u672f\u4e8c\u5143\u8fd0\u7b97\u7b26&gt; &lt;\u6807\u91cf&gt;\uff09<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5f53\u4e00\u8fb9\u662f\u77ac\u65f6\u5411\u91cf\uff0c\u53e6\u4e00\u8fb9\u662f\u6807\u91cf\u65f6\u7684\u884c\u4e3a\uff08&lt;\u77ac\u65f6\u5411\u91cf&gt; &lt;\u7b97\u672f\u4e8c\u5143\u8fd0\u7b97\u7b26&gt; &lt;\u6807\u91cf&gt;\uff09<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u5f53\u4e24\u8fb9\u90fd\u662f\u77ac\u65f6\u5411\u91cf\u65f6\u7684\u884c\u4e3a\uff08&lt;\u77ac\u65f6\u5411\u91cf&gt; &lt;\u7b97\u672f\u4e8c\u5143\u8fd0\u7b97\u7b26&gt; &lt;\u77ac\u65f6\u5411\u91cf&gt;\uff09<\/ol>\n<p>\u65e0\u8bba\u54ea\u79cd\u60c5\u51b5\uff0c\u57fa\u672c\u884c\u4e3a\u90fd\u662f\u8fc7\u6ee4\uff0c\u4f46\u662f\u901a\u8fc7\u5728\u6bd4\u8f83\u8fd0\u7b97\u7b26\u540e\u52a0\u4e0a bool \u53ef\u4ee5\u5c06\u503c\u53d8\u4e3a0\u62161\u3002<br \/>\n\uff08\u5982\u679c\u6bd4\u8f83\u7ed3\u679c\u4e3a\u5047\uff0c\u5219\u4e3a0\uff1b\u5982\u679c\u4e3a\u771f\uff0c\u5219\u4e3a1\uff09<\/p>\n<pre class=\"post-pre\"><code>&lt;comparison_binary_operator&gt; [bool]\r\n<\/code><\/pre>\n<h3>\u5f53\u4e24\u8fb9\u4e3a\u6807\u91cf\u65f6\u7684\u884c\u4e3a<\/h3>\n<p>\u5fc5\u987b\u6dfb\u52a0bool\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5f531 == \u5e03\u5c14\u503c1\u65f6\uff0c\u7ed3\u679c\u4e3a1\uff1b\u5f531 != \u5e03\u5c14\u503c1\u65f6\uff0c\u7ed3\u679c\u4e3a0\u3002<\/p>\n<h3>\u5f53\u4e00\u4e2a\u8fb9\u662f\u77ac\u65f6\u5411\u91cf\uff0c\u53e6\u4e00\u8fb9\u662f\u6807\u91cf\u65f6\u7684\u884c\u4e3a\u3002<\/h3>\n<p>\u6bd4\u8f83\u5c06\u5728\u5373\u65f6\u5411\u91cf\u7684\u6240\u6709\u65f6\u95f4\u70b9\u4e0a\u8fdb\u884c\uff0c\u53ea\u6709\u771f\u503c\u4fdd\u7559\u4e0b\u6765\uff0c\u5047\u503c\u5c06\u88ab\u5220\u9664\u3002<\/p>\n<p>\u5982\u679c\u628a process_resident_memory_bytes \u8bbe\u5b9a\u4e3a 89.1MB\uff08\u537389.1 * 1000 * 1000\uff09\uff0c\u53ea\u6709\u5185\u5b58\u4f7f\u7528\u91cf\u5927\u4e8e89.1MB\u7684\u65f6\u5019\u624d\u4f1a\u88ab\u8fc7\u6ee4\u6389\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d53b837434c4406cd06c2\/84-0.png\" alt=\"image.png\" \/><\/div>\n<h3>\u5f53\u4e24\u8fb9\u90fd\u662f\u201c\u5373\u65f6\u5411\u91cf\u201d\u65f6\u7684\u884c\u4e3a<\/h3>\n<p>\u5728\u5411\u91cf\u5339\u914d\u4e2d\uff0c\u5bf9\u4e8e\u8fdb\u884c\u5339\u914d\u7684\u5143\u7d20\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n<h2>\u903b\u8f91\u8fd0\u7b97\u7b26 \/ \u96c6\u5408\u8fd0\u7b97\u7b26<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">and (intersection)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">or (union)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">unless (complement)<\/ul>\n<p>\u8fd9\u4e9b\u8fd0\u7b97\u7b26\u53ea\u80fd\u5728\u77ac\u65f6\u5411\u91cf\u4e4b\u95f4\u4f7f\u7528\u3002<\/p>\n<p>\u5728instant_vector1\u548cinstant_vector2\u7684\u7ed3\u679c\u4e2d\uff0c\u53ea\u6709\u4e0einstant_vector1\u7684\u5143\u7d20\u5b8c\u5168\u5339\u914d\u4ee5\u53ca\u4e0einstant_vector2\u7684\u5143\u7d20\u7684\u6807\u7b7e\u96c6\u5b8c\u5168\u5339\u914d\u7684\u5143\u7d20\u4f1a\u88ab\u4fdd\u7559\u4e0b\u6765\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6307\u6807\u540d\u79f0\u548c\u503c\u5c06\u4fdd\u7559\u4e3ainstant_vector1\u7684\u3002<\/p>\n<p>\u6216\u8005 \u7684\u7ed3\u679c\u7531 \u7684\u6240\u6709\u5143\u7d20\u4ee5\u53ca \u7684\u5143\u7d20\u4e2d\u4e0d\u5177\u6709\u4e0e \u5339\u914d\u7684\u6807\u7b7e\u96c6\u7684\u5143\u7d20\u7ec4\u6210\u3002<\/p>\n<p>\u9664\u975e \u7684\u7ed3\u679c\u662f\u4ece \u7684\u5143\u7d20\u4e2d\u5220\u9664\u4e86\u4e0e \u5143\u7d20\u548c\u6807\u7b7e\u96c6\u5339\u914d\u7684\u90e8\u5206\u3002<\/p>\n<p>\u5728\u77e2\u91cf\u5339\u914d\u4e2d\uff0c\u5c06\u5bf9\u5339\u914d\u7684\u5143\u7d20\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n<h1>\u5411\u91cf\u5339\u914d<\/h1>\n<p>\u5bf9\u4e8e\u4e24\u4e2a\u5411\u91cf\u7684\u64cd\u4f5c\uff0c\u4f1a\u67e5\u627e\u5339\u914d\u53f3\u4fa7\u5143\u7d20\u7684\u5de6\u4fa7\u5143\u7d20\u3002<br \/>\n\u5339\u914d\u64cd\u4f5c\u6709\u4e24\u79cd\u884c\u4e3a\uff1a\u4e00\u5bf9\u4e00\u5339\u914d\u548c\u4e00\u5bf9\u591a\uff0f\u591a\u5bf9\u4e00\u5339\u914d\u3002<\/p>\n<h2>\u4e00\u5bf9\u4e00 (y\u012b du\u00ec y\u012b)<\/h2>\n<p>\u4e00\u5bf9\u4e00\u7684\u60c5\u51b5\u4e0b\uff0c\u5bf9\u6bcf\u4e2a\u6807\u7b7e\u8fdb\u884c\u6807\u7b7e\u5339\u914d\uff0c\u5339\u914d\u6210\u529f\u7684\u6807\u7b7e\u5c06\u88ab\u5339\u914d\u3002<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5728on\u4e0a\u5bf9\u6807\u7b7e\u5217\u8868\u8fdb\u884c\u9650\u5236\u6765\u5ffd\u7565\u5728ignoring\u4e0a\u7684\u6807\u7b7e\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;vector expr&gt; &lt;bin-op&gt; ignoring(&lt;label list&gt;) &lt;vector expr&gt;\r\n&lt;vector expr&gt; &lt;bin-op&gt; on(&lt;label list&gt;) &lt;vector expr&gt;\r\n<\/code><\/pre>\n<p>\u8bf7\u53c2\u8003 Examples \u6765\u4e86\u89e3\u8be6\u60c5\u3002<\/p>\n<h2>N\u5bf91 \/ 1\u5bf9N<\/h2>\n<p>\u5728N\u5bf91\/1\u5bf9N\u4e2d\uff0c\u5c06\u67d0\u4e2a\u6807\u7b7e\u8fdb\u884c\u5206\u7ec4\uff0c\u5bf9\u5176\u4ed6\u6240\u6709\u6807\u7b7e\u8fdb\u884c\u6807\u7b7e\u5339\u914d\uff0c\u627e\u51fa\u5339\u914d\u7684\u6807\u7b7e\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;vector expr&gt; &lt;bin-op&gt; ignoring(&lt;label list&gt;) group_left(&lt;label list&gt;) &lt;vector expr&gt;\r\n&lt;vector expr&gt; &lt;bin-op&gt; ignoring(&lt;label list&gt;) group_right(&lt;label list&gt;) &lt;vector expr&gt;\r\n&lt;vector expr&gt; &lt;bin-op&gt; on(&lt;label list&gt;) group_left(&lt;label list&gt;) &lt;vector expr&gt;\r\n&lt;vector expr&gt; &lt;bin-op&gt; on(&lt;label list&gt;) group_right(&lt;label list&gt;) &lt;vector expr&gt;\r\n<\/code><\/pre>\n<p>\u8bf7\u53c2\u8003 Examples \u6765\u83b7\u53d6\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<h1>\u96c6\u7d04\u4fee\u98fe\u5b50 means &#8220;intensive modifier&#8221; in Chinese.<\/h1>\n<p>sum (calculate sum over dimensions)<\/p>\n<p>min (select minimum over dimensions)<\/p>\n<p>max (select maximum over dimensions)<\/p>\n<p>avg (calculate the average over dimensions)<\/p>\n<p>group (all values in the resulting vector are 1)<\/p>\n<p>stddev (calculate population standard deviation over dimensions)<\/p>\n<p>stdvar (calculate population standard variance over dimensions)<\/p>\n<p>count (count number of elements in the vector)<\/p>\n<p>count_values (count number of elements with the same value)<\/p>\n<p>bottomk (smallest k elements by sample value)<\/p>\n<p>topk (largest k elements by sample value)<\/p>\n<p>quantile (calculate \u03c6-quantile (0 \u2264 \u03c6 \u2264 1) over dimensions)<\/p>\n<p>\u8fd9\u4e9b\u4fee\u9970\u7b26\u4ec5\u9002\u7528\u4e8e\u5373\u65f6\u5411\u91cf\u3002<\/p>\n<p>\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u300cby\u300d\uff0c\u7ed3\u679c\u4e2d\u7684\u6240\u6709\u6807\u7b7e\u90fd\u4f1a\u88ab\u4e22\u5931\u3002<br \/>\n\u5bf9\u4e8e\u901a\u8fc7\u6307\u5b9a\u6807\u7b7e\u8fdb\u884c\u8fc7\u6ee4\u7684\u5143\u7d20\uff0c\u300cby\u300d\u4f1a\u5bf9\u5b83\u4eec\u5206\u522b\u8fdb\u884c\u805a\u5408\u3002<br \/>\n\u5bf9\u4e8e\u901a\u8fc7\u6307\u5b9a\u9664\u4e86\u67d0\u4e2a\u6807\u7b7e\u4ee5\u5916\u7684\u5176\u4ed6\u6807\u7b7e\u8fdb\u884c\u8fc7\u6ee4\u7684\u5143\u7d20\uff0c\u300cwithout\u300d\u4f1a\u5bf9\u5b83\u4eec\u5206\u522b\u8fdb\u884c\u805a\u5408\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;aggr-op&gt; [without|by (&lt;label list&gt;)] ([parameter,] &lt;vector expression&gt;)\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>&lt;aggr-op&gt;([parameter,] &lt;vector expression&gt;) [without|by (&lt;label list&gt;)]\r\n<\/code><\/pre>\n<h1>\u51fd\u6570<\/h1>\n<p>\u5728\u4e2d\u6587\u4e2d\uff0c\u6709\u5b9a\u4e49\u4e86\u9488\u5bf9\u5373\u65f6\u5411\u91cf\uff08instant vector\uff09\u3001\u8303\u56f4\u5411\u91cf\uff08range vector\uff09\u548c\u6807\u91cf\u6267\u884c\u5904\u7406\u7684\u51fd\u6570\u3002<\/p>\n<p>\u8bf7\u53c2\u8003\u6b64\u5904\u7684\u51fd\u6570\u5217\u8868\u3002<\/p>\n<h2>\u6570\u5b66\u51fd\u6570<\/h2>\n<div>\n<div class=\"post-table\">\u95a2\u6570\u540d\u66f8\u5f0f\u8aac\u660eabs()abs(v instant-vector)\u5168\u3066\u306e\u5024\u3092\u7d76\u5bfe\u5024\u306b\u5909\u3048\u308bceil()ceil(v instant-vector)\u5168\u3066\u306e\u5024\u3092\u3001\u3088\u308a\u5927\u304d\u304f\u6700\u3082\u8fd1\u3044\u6574\u6570\u306b\u5909\u3048\u308bfloor()floor(v instant-vector)\u5168\u3066\u306e\u5024\u3092\u3001\u3088\u308a\u5c0f\u3055\u304f\u6700\u3082\u8fd1\u3044\u6574\u6570\u306b\u5909\u3048\u308bround()round(v instant-vector, to_nearest=1 scalar)\u5168\u3066\u306e\u5024\u3092\u6700\u3082\u8fd1\u3044\u6570\u5024\u306b\u5909\u3048\u308b\u3002\u8fd1\u3055\u304c\u7b49\u3057\u3044\u5834\u5408\u306f\u5927\u304d\u3044\u65b9\u306b\u306a\u308b\u3002to_nearest\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u305d\u306e\u5024\u306e\u500d\u6570\u3067\u4e38\u3081\u3089\u308c\u308b\u3002clamp_max()clamp_max(v instant-vector, max scalar)max \u3088\u308a\u5927\u304d\u3044\u5024\u3092\u524a\u9664\u3059\u308bclamp_min()clamp_min(v instant-vector, min scalar)min \u3088\u308a\u5c0f\u3055\u3044\u5024\u3092\u524a\u9664\u3059\u308bln()ln(v instant-vector)\u5168\u3066\u306e\u5024\u306e\u81ea\u7136\u5bfe\u6570\u3092\u8a08\u7b97\u3059\u308blog2()log2(v instant-vector)\u5168\u3066\u306e\u5024\u306e 2 \u9032\u5bfe\u6570\u3092\u8a08\u7b97\u3059\u308blog10()log10(v instant-vector)\u5168\u3066\u306e\u5024\u306e 10 \u9032\u5bfe\u6570\u3092\u8a08\u7b97\u3059\u308bexp()exp(v instant-vector)\u5168\u3066\u306e\u5024\u306e\u6307\u6570\u95a2\u6570\u3092\u8a08\u7b97\u3059\u308bsqrt()sqrt(v instant-vector)\u5168\u3066\u306e\u5024\u306e\u5e73\u65b9\u6839\u3092\u8a08\u7b97\u3059\u308b<\/div>\n<\/div>\n<h2>\u89e3\u6790\u51fd\u6570<\/h2>\n<div>\n<div class=\"post-table\">\u95a2\u6570\u540d\u66f8\u5f0f\u8aac\u660edelta()delta(v range-vector)\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u306e\u6700\u521d\u3068\u6700\u5f8c\u306e\u5024\u306e\u5dee\u3092\u3082\u3064 instant vector \u3092\u8fd4\u3059idelta()idelta(v range-vector)\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u306e\u6700\u5f8c\u306e2\u3064\u306e\u5024\u306e\u5dee\u3092\u3082\u3064 instant vector \u3092\u8fd4\u3059increase()increase(v range-vector)\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u306e\u5897\u52a0\u91cf\u3092\u3082\u3064 instant vector \u3092\u8fd4\u3059rate()rate(v range-vector)\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u306e1\u79d2\u5f53\u305f\u308a\u306e\u5897\u52a0\u7387\u3092\u3082\u3064 instant vector \u3092\u8fd4\u3059irate()irate(v range-vector)\u6307\u5b9a\u3057\u305f\u7bc4\u56f2\u306e\u672b\u5c3e2\u3064\u306e\u5024\u306b\u57fa\u3065\u304d\u30011\u79d2\u5f53\u305f\u308a\u306e\u5897\u52a0\u7387\u3092\u3082\u3064 instant vector \u3092\u8fd4\u3059deriv()deriv(v range-vector)<a href=\"https:\/\/en.wikipedia.org\/wiki\/Simple_linear_regression\" target=\"_blank\" rel=\"nofollow noopener\">\u7dda\u5f62\u56de\u5e30<\/a>\u3092\u7528\u3044\u3066\u79d2\u5358\u4f4d\u3067\u306e\u5fae\u5206\u3092\u8fd4\u3059predict_linear()predict_linear(v range-vector, t scalar)<a href=\"https:\/\/en.wikipedia.org\/wiki\/Simple_linear_regression\" target=\"_blank\" rel=\"nofollow noopener\">\u7dda\u5f62\u56de\u5e30<\/a>\u3092\u7528\u3044\u3066 t \u79d2\u5f8c\u306e\u4e88\u6e2c\u5024\u3092\u8fd4\u3059histogram_quantile()histogram_quantile(\u03c6 float, b instant-vector)\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u30d0\u30b1\u30c3\u30c8b\u304b\u3089\u03c6-\u56db\u5206\u4f4d\uff080 \u2264 \u03c6 \u2264 1\uff09\u3092\u8a08\u7b97\u3059\u308bholt_winters()holt_winters(v range-vector, sf scalar, tf scalar)Holt-Winters \u6cd5\u306b\u3088\u308b\u5e73\u6ed1\u5316\u5024\u3092\u751f\u6210\u3059\u308b<\/div>\n<\/div>\n<h2>\u96c6\u5408\u5411\u91cf\u7684\u805a\u5408\u51fd\u6570<\/h2>\n<p>avg_over_time(range-vector): the average value of all points in the specified interval.<\/p>\n<p>min_over_time(range-vector): the minimum value of all points in the specified interval.<\/p>\n<p>max_over_time(range-vector): the maximum value of all points in the specified interval.<\/p>\n<p>sum_over_time(range-vector): the sum of all values in the specified interval.<\/p>\n<p>count_over_time(range-vector): the count of all values in the specified interval.<\/p>\n<p>quantile_over_time(scalar, range-vector): the \u03c6-quantile (0 \u2264 \u03c6 \u2264 1) of the values in the specified interval.<\/p>\n<p>stddev_over_time(range-vector): the population standard deviation of the values in the specified interval.<\/p>\n<p>stdvar_over_time(range-vector): the population standard variance of the values in the specified interval.<\/p>\n<h2>\u6392\u5e8f\u51fd\u6570<\/h2>\n<div>\n<div class=\"post-table\">\u95a2\u6570\u540d\u66f8\u5f0f\u8aac\u660esort()sort(v instant-vector)\u8981\u7d20\u3092\u5024\u3067\u6607\u9806\u30bd\u30fc\u30c8\u3059\u308bsort_desc()sort_desc(v instant-vector)\u8981\u7d20\u3092\u5024\u3067\u964d\u9806\u30bd\u30fc\u30c8\u3059\u308b<\/div>\n<\/div>\n<h2>\u5224\u65ad\u51fd\u6570<\/h2>\n<div>\n<div class=\"post-table\">\u95a2\u6570\u540d\u66f8\u5f0f\u8aac\u660eabsent()absent(v instant-vector)\u3082\u30571\u3064\u3067\u3082\u8981\u7d20\u304c\u3042\u308c\u3070\u7a7a\u3092\u8fd4\u3057\u3001\u4f55\u3082\u8981\u7d20\u304c\u306a\u3051\u308c\u3070\u5024\u304c1\u306e\u8981\u7d20\u3092\u8fd4\u3059\u3002\u3053\u308c\u306f\u6307\u5b9a\u3055\u308c\u305f\u6761\u4ef6\u306e\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u304c\u306a\u3044\u3053\u3068\u3092\u691c\u77e5\u3059\u308b\u5834\u5408\u306b\u4f7f\u3046\u3002absent_over_time()absent_over_time(v range-vector)\u3082\u30571\u3064\u3067\u3082\u8981\u7d20\u304c\u3042\u308c\u3070\u7a7a\u3092\u8fd4\u3057\u3001\u4f55\u3082\u8981\u7d20\u304c\u306a\u3051\u308c\u3070\u5024\u304c1\u306e\u8981\u7d20\u3092\u8fd4\u3059\u3002\u3053\u308c\u306f\u6307\u5b9a\u3055\u308c\u305f\u6761\u4ef6\u306e\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u304c\u306a\u3044\u3053\u3068\u3092\u691c\u77e5\u3059\u308b\u5834\u5408\u306b\u4f7f\u3046\u3002changes()changes(v range-vector)\u5024\u306e\u5909\u5316\u304c\u8d77\u3053\u3063\u305f\u56de\u6570\u3092\u8fd4\u3059resets()resets(v range-vector)\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u5185\u3067\u306e\u30ab\u30a6\u30f3\u30bf\u30ea\u30bb\u30c3\u30c8\u56de\u6570\u3092instant vector\u3068\u3057\u3066\u8fd4\u3059<\/div>\n<\/div>\n<h2>\u8865\u52a9\u7cfb\u7edf\u51fd\u6570<\/h2>\n<div>\n<div class=\"post-table\">\u95a2\u6570\u540d\u66f8\u5f0f\u8aac\u660edays_in_month()days_in_month(v=vector(time()) instant-vector)\u5024\u3092UTC\u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u6708\u304c\u4f55\u65e5\u3042\u308b\u304b(28-31 \u306e\u5024)\u3092\u8fd4\u3059minute()minute(v=vector(time()) instant-vector)\u5024\u3092UTC\u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u6642\u70b9\u304c\u4f55\u5206\u3067\u3042\u308b\u304b(0-59 \u306e\u5024)\u3092\u8fd4\u3059hour()hour(v=vector(time()) instant-vector)\u5024\u3092UTC\u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u6642\u70b9\u304c\u4f55\u6642\u3067\u3042\u308b\u304b(0-23 \u306e\u5024)\u3092\u8fd4\u3059month()month(v=vector(time()) instant-vector)\u5024\u3092UTC\u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u6642\u70b9\u304c\u4f55\u6708\u3067\u3042\u308b\u304b(1-12 \u306e\u5024)\u3092\u8fd4\u3059day_of_week()day_of_week(v=vector(time()) instant-vector)\u5024\u3092 UTC \u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u9031\u306e\u66dc\u65e5(0-6 \u306e\u5024)\u3092\u8fd4\u3059day_of_month()day_of_month(v=vector(time()) instant-vector)\u5024\u3092 UTC \u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u65e5\u306e\u65e5\u4ed8(1-31 \u306e\u5024)\u3092\u8fd4\u3059year()year(v=vector(time()) instant-vector)\u5024\u3092 UTC \u6642\u523b\u3068\u307f\u306a\u3057\u3001\u305d\u306e\u6642\u70b9\u304c\u4f55\u5e74\u3067\u3042\u308b\u304b\u3092\u8fd4\u3059time()time()UNIX time \u3092\u8fd4\u3059timestamp()timestamp(v instant-vector)timestamp \u3092\u8fd4\u3059label_join()label_join(v instant-vector, dst_label string, separator string, src_label_1 string, src_label_2 string, &#8230;)src_label_X \u306e\u5404\u5024\u3092 separator \u3067\u7d50\u5408\u3057\u305f\u65b0\u3057\u3044\u30e9\u30d9\u30eb dst_label \u3092\u8ffd\u52a0\u3059\u308blabel_replace()label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string)src_label \u306e\u5024\u306b\u5bfe\u3057\u3066\u6b63\u898f\u8868\u73fe regex \u306b\u3088\u308b\u30de\u30c3\u30c1\u30f3\u30b0\u3092\u884c\u3044\u3001replacement \u3067\u8a55\u4fa1\u3057\u305f\u5024\u3092\u3082\u3064 dst_label \u3092\u8ffd\u52a0\u3059\u308bscalar()scalar(v instant-vector)1\u3064\u306e\u8981\u7d20\u3092\u4e0e\u3048\u305f\u5834\u5408\u3001\u305d\u306e\u5024\u306e Scalar \u3092\u8fd4\u3059\u3002\u8907\u6570\u306e\u8981\u7d20\u304c\u4e0e\u3048\u3089\u308c\u305f\u5834\u5408\u306f NaN \u3092\u8fd4\u3059\u3002vector()vector(s scalar)Scalar \u306e\u5024\u3092\u3082\u3064 instant vector \u3092\u8fd4\u3059<\/div>\n<\/div>\n<h1>\u4f8b\u5b50<\/h1>\n<p>\u5728\u53ef\u5b9e\u65bd\u7684\u4f8b\u5b50\u4e2d\uff0cKubernetes\uff08GKE\uff09\u548c\u4fbf\u5229\u7684Prometheus\u5c0f\u6280\u5de7\u96c6\u88ab\u4ecb\u7ecd\u3002<\/p>\n<h2>\u5185\u5b58\u4f7f\u7528\u91cf<\/h2>\n<pre class=\"post-pre\"><code>process_resident_memory_bytes\r\n<\/code><\/pre>\n<h2>\u8282\u70b9\u91cd\u65b0\u542f\u52a8\u7684\u53d1\u751f\u4e0e\u5426<\/h2>\n<pre class=\"post-pre\"><code>changes(node_boot_time_seconds[1m])\r\n<\/code><\/pre>\n<h2>\u78c1\u76d8\u53ef\u7528\u7a7a\u95f4\u7684\u6bd4\u4f8b<\/h2>\n<pre class=\"post-pre\"><code>node_filesystem_avail_bytes * 100 \/ node_filesystem_size_bytes\r\n<\/code><\/pre>\n<h2>\u6c14\u6e29<\/h2>\n<pre class=\"post-pre\"><code>node_hwmon_temp_celsius * ignoring(label) group_left(label) node_hwmon_sensor_label\r\n<\/code><\/pre>\n<h2>CPU\u7684I\/O\u7b49\u5f85\u6bd4\u7387<\/h2>\n<pre class=\"post-pre\"><code>sum without(cpu)(rate(node_cpu_seconds_total{mode=\"iowait\"}[5m])) # 1\r\n\/ ignoring(mode)                                                  # 2\r\nsum without(mode, cpu)(rate(node_cpu_seconds_total[5m]))          # 3\r\n<\/code><\/pre>\n<p>1\u7684\u7ed3\u679c\u4e2d\u5305\u542b\u4e86\u6807\u7b7emode.<\/p>\n<p>{\u5b9e\u4f8b=&#8221;localhost:9100&#8243;\uff0c\u4f5c\u4e1a=&#8221;node&#8221;\uff0c\u6a21\u5f0f=&#8221;iowait&#8221;}\uff1a1.9954526794454766<\/p>\n<p>\u7b2c\u4e09\u4e2a\u7ed3\u679c\u4e2d\u4e0d\u5305\u542b\u6807\u7b7e\u201cmode\u201d\u3002<\/p>\n<p>{\u5b9e\u4f8b=&#8221;localhost:9100&#8243;,\u4efb\u52a1=&#8221;\u8282\u70b9&#8221;}\uff1a1.998273690267743<\/p>\n<p>\u56e0\u6b64\uff0c\u5728\u4f7f\u7528\u300c\u305d\u306e\u305f\u3081\u300d\u9032\u884c\u8ba1\u7b97\u65f6\uff0c\u9700\u8981\u4f7f\u7528\u300cignoring\u300d\u6765\u6392\u9664mode\u6807\u7b7e\u3002<\/p>\n<p>\u7ed3\u679c\u4e0d\u5305\u62ec\u6a21\u5f0f\u6807\u7b7e\u3002<\/p>\n<h2>\u5728\u4e00\u4e2a\u5c0f\u65f6\u5185, \u5e73\u5747\u8d1f\u8f7d\u8d85\u8fc71\u7684\u6b21\u6570\u3002<\/h2>\n<pre class=\"post-pre\"><code>count_over_time((node_load1 &gt; 1)[1h:])\r\n<\/code><\/pre>\n<h1>\u8003\u8bd5\u51c6\u5907<\/h1>\n<h2>\u4f60\u600e\u4e48\u6837\u68c0\u67e5\u5ea6\u91cf\u6807\u51c6\uff1f<\/h2>\n<p>\u8ba9\u6211\u4eec\u6765\u7814\u7a76\u4e00\u4e0b\u51fa\u53e3\u5546\u7684\u89c4\u683c\u8981\u6c42\u3002<\/p>\n<p>\u5982\u679c\u5df2\u7ecf\u6709\u4e00\u4e2a\u6784\u5efa\u597d\u7684Prometheus\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u67e5\u770bTargets\u6765\u786e\u5b9a\u4f7f\u7528\u4e86\u54ea\u4e2aExporter\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u662f\u6839\u636e Prometheus \u7684 &#8220;QUERING PROMETHEUS&#038;#8221 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[123,122,125,129,128,12,4,38,34,127,78,11,40,47,124,126,88,48,49],"class_list":["post-43647","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-beginners-guide","tag-data-analysis","tag-data-types","tag-examples","tag-functions","tag-grafana","tag-kubernetes","tag-metrics","tag-monitoring","tag-operators","tag-performance-analysis","tag-prometheus","tag-promql","tag-query-language","tag-query-syntax","tag-selectors","tag-system-monitoring","tag-time-series","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PromQL Tutorial: Getting Started with Prometheus Query Language - Complete Guide<\/title>\n<meta name=\"description\" content=\"Learn how to get started with PromQL, Prometheus&#039;s powerful query language for time-series data. This comprehensive tutorial covers query syntax, data types, selectors, operators, functions, and practical examples for effective monitoring and analysis of your metrics.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5f00\u59cb\u4f7f\u7528promql\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5f00\u59cb\u4f7f\u7528PromQL\" \/>\n<meta property=\"og:description\" content=\"Learn how to get started with PromQL, Prometheus&#039;s powerful query language for time-series data. This comprehensive tutorial covers query syntax, data types, selectors, operators, functions, and practical examples for effective monitoring and analysis of your metrics.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5f00\u59cb\u4f7f\u7528promql\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-29T01:55:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-29T19:20:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d53b837434c4406cd06c2\/19-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/\",\"name\":\"PromQL Tutorial: Getting Started with Prometheus Query Language - Complete Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-29T01:55:11+00:00\",\"dateModified\":\"2025-07-29T19:20:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"description\":\"Learn how to get started with PromQL, Prometheus's powerful query language for time-series data. This comprehensive tutorial covers query syntax, data types, selectors, operators, functions, and practical examples for effective monitoring and analysis of your metrics.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5f00\u59cb\u4f7f\u7528PromQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PromQL Tutorial: Getting Started with Prometheus Query Language - Complete Guide","description":"Learn how to get started with PromQL, Prometheus's powerful query language for time-series data. This comprehensive tutorial covers query syntax, data types, selectors, operators, functions, and practical examples for effective monitoring and analysis of your metrics.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5f00\u59cb\u4f7f\u7528promql\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5f00\u59cb\u4f7f\u7528PromQL","og_description":"Learn how to get started with PromQL, Prometheus's powerful query language for time-series data. This comprehensive tutorial covers query syntax, data types, selectors, operators, functions, and practical examples for effective monitoring and analysis of your metrics.","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5f00\u59cb\u4f7f\u7528promql\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-29T01:55:11+00:00","article_modified_time":"2025-07-29T19:20:39+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d53b837434c4406cd06c2\/19-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/","name":"PromQL Tutorial: Getting Started with Prometheus Query Language - Complete Guide","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-29T01:55:11+00:00","dateModified":"2025-07-29T19:20:39+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"description":"Learn how to get started with PromQL, Prometheus's powerful query language for time-series data. This comprehensive tutorial covers query syntax, data types, selectors, operators, functions, and practical examples for effective monitoring and analysis of your metrics.","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5f00\u59cb\u4f7f\u7528PromQL"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8promql\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=43647"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43647\/revisions"}],"predecessor-version":[{"id":89925,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43647\/revisions\/89925"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=43647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=43647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=43647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}