{"id":11101,"date":"2022-11-11T15:23:02","date_gmt":"2022-11-11T07:23:02","guid":{"rendered":"https:\/\/www.lwops.cn\/?p=11101"},"modified":"2022-11-11T15:23:03","modified_gmt":"2022-11-11T07:23:03","slug":"prometheus%e6%8a%80%e6%9c%af%e5%88%86%e4%ba%ab-prometheus%e7%89%b9%e7%82%b9%ef%bc%8c%e7%bb%84%e4%bb%b6%ef%bc%8c%e5%b1%80%e9%99%90%e6%8e%a2%e8%ae%a8","status":"publish","type":"post","link":"https:\/\/www.lwops.cn\/index.php\/prometheus\/prometheus-artisan\/11101","title":{"rendered":"Prometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8"},"content":{"rendered":"\n
\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix<\/a> \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002<\/p>\n\n\n\nPrometheus\u7684\u7279\u70b9<\/h3>\n\n\n\nPrometheus\u5b98\u7f51\u4e0a\u7684\u81ea\u8ff0\u662f\uff1a\u201cFrom metrics to insight.Power your metrics and alerting with a leading open-source monitoring solution.\u201d\u7ffb\u8bd1\u8fc7\u6765\u5c31\u662f\uff1a\u4ece\u6307\u6807\u5230\u6d1e\u5bdf\u529b\uff0cPrometheus\u901a\u8fc7\u9886\u5148\u7684\u5f00\u6e90\u76d1\u63a7\u89e3\u51b3\u65b9\u6848\u4e3a\u7528\u6237\u7684\u6307\u6807\u548c\u544a\u8b66\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\u3002\u901a\u8fc7PromQL\u5b9e\u73b0\u591a\u7ef4\u5ea6\u6570\u636e\u6a21\u578b\u7684\u7075\u6d3b\u67e5\u8be2\u3002 \u5b9a\u4e49\u4e86\u5f00\u653e\u6307\u6807\u6570\u636e\u7684\u6807\u51c6\uff0c\u81ea\u5b9a\u4e49\u63a2\u9488\uff08\u5982Exporter\u7b49\uff09\uff0c\u7f16\u5199\u7b80\u5355\u65b9\u4fbf\u3002 PushGateway\u7ec4\u4ef6\u8ba9\u8fd9\u6b3e\u76d1\u63a7\u7cfb\u7edf\u53ef\u4ee5\u63a5\u6536\u76d1\u63a7\u6570\u636e\u3002 \u63d0\u4f9b\u4e86VM\u548c\u5bb9\u5668\u5316\u7684\u7248\u672c\u3002 \u5c24\u5176\u662f\u7b2c\u4e00\u70b9\uff0c\u8fd9\u662f\u5f88\u591a\u76d1\u63a7\u7cfb\u7edf\u671b\u5c18\u83ab\u53ca\u7684\u3002\u591a\u7ef4\u5ea6\u7684\u6570\u636e\u6a21\u578b\u548c\u7075\u6d3b\u7684\u67e5\u8be2\u65b9\u5f0f\uff0c\u4f7f\u76d1\u63a7\u6307\u6807\u53ef\u4ee5\u5173\u8054\u5230\u591a\u4e2a\u6807\u7b7e\uff0c\u5e76\u5bf9\u65f6\u95f4\u5e8f\u5217\u8fdb\u884c\u5207\u7247\u548c\u5207\u5757\uff0c\u4ee5\u652f\u6301\u5404\u79cd\u56fe\u5f62\u3001\u8868\u683c\u548c\u544a\u8b66\u573a\u666f\u3002<\/p>\n\n\n\nPrometheus\u7684\u67b6\u6784<\/h3>\n\n\n\n<\/figure>\n\n\n\nPrometheus\u4e3b\u8981\u7531Prometheus Server\u3001Pushgateway\u3001Job\/Exporter\u3001Service Discovery\u3001Alertmanager\u3001Dashboard\u8fd96\u4e2a\u6838\u5fc3\u6a21\u5757\u6784\u6210\u3002Prometheus\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u673a\u5236\u53d1\u73b0target\uff0c\u8fd9\u4e9b\u76ee\u6807\u53ef\u4ee5\u662f\u957f\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u4e5f\u53ef\u4ee5\u662f\u77ed\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u8fd8\u53ef\u4ee5\u662f\u901a\u8fc7Exporter\u76d1\u63a7\u7684\u7b2c\u4e09\u65b9\u5e94\u7528\u7a0b\u5e8f\u3002\u88ab\u6293\u53d6\u7684\u6570\u636e\u4f1a\u5b58\u50a8\u8d77\u6765\uff0c\u901a\u8fc7PromQL\u8bed\u53e5\u5728\u4eea\u8868\u76d8\u7b49\u53ef\u89c6\u5316\u7cfb\u7edf\u4e2d\u4f9b\u67e5\u8be2\uff0c\u6216\u8005\u5411Alertmanager\u53d1\u9001\u544a\u8b66\u4fe1\u606f\uff0c\u544a\u8b66\u4f1a\u901a\u8fc7\u9875\u9762\u3001\u7535\u5b50\u90ae\u4ef6\u3001\u9489\u9489\u4fe1\u606f\u6216\u8005\u5176\u4ed6\u5f62\u5f0f\u5448\u73b0\u3002<\/p>\n\n\n\n\u4ece\u4e0a\u8ff0\u67b6\u6784\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230\uff0cPrometheus\u4e0d\u4ec5\u662f\u4e00\u6b3e\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u5e93\uff0c\u5728\u6574\u4e2a\u751f\u6001\u4e0a\u8fd8\u662f\u4e00\u5957\u5b8c\u6574\u7684\u76d1\u63a7\u7cfb\u7edf\u3002\u5bf9\u4e8e\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u5e93\uff0c\u5728\u8fdb\u884c\u6280\u672f\u9009\u578b\u7684\u65f6\u5019\uff0c\u5f80\u5f80\u9700\u8981\u4ece\u5bbd\u5217\u6a21\u578b\u5b58\u50a8\u3001\u7c7bSQL\u67e5\u8be2\u652f\u6301\u3001\u6c34\u5e73\u6269\u5bb9\u3001\u8bfb\u5199\u5206\u79bb\u3001\u9ad8\u6027\u80fd\u7b49\u89d2\u5ea6\u8fdb\u884c\u5206\u6790\u3002\u800c\u76d1\u63a7\u7cfb\u7edf\u7684\u67b6\u6784\uff0c\u5f80\u5f80\u8fd8\u9700\u8981\u8003\u8651\u901a\u8fc7\u51cf\u5c11\u7ec4\u4ef6\u3001\u670d\u52a1\u6765\u964d\u4f4e\u6210\u672c\u548c\u590d\u6742\u6027\u4ee5\u53ca\u6c34\u5e73\u6269\u5bb9\u7b49\u56e0\u7d20\u3002<\/p>\n\n\n\n\u76d1\u63a7\u7cfb\u7edf\u4f7f\u7528MQ\u901a\u4fe1\u7684\u95ee\u9898<\/h3>\n\n\n\n\u5f88\u591a\u4f01\u4e1a\u81ea\u5df1\u7814\u53d1\u7684\u76d1\u63a7\u7cfb\u7edf\u4e2d\u5f80\u5f80\u4f1a\u4f7f\u7528\u6d88\u606f\u961f\u5217Kafka\u548cMetrics parser\u3001Metrics process server\u7b49Metrics\u89e3\u6790\u5904\u7406\u6a21\u5757\uff0c\u518d\u8f85\u4ee5Spark\u7b49\u6d41\u5f0f\u5904\u7406\u65b9\u5f0f\u3002\u5e94\u7528\u7a0b\u5e8f\u5c06Metric\u63a8\u5230\u6d88\u606f\u961f\u5217\uff08\u5982Kafaka\uff09\uff0c\u7136\u540e\u7ecf\u8fc7Exposer\u4e2d\u8f6c\uff0c\u518d\u88abPrometheus\u62c9\u53d6\u3002\u4e4b\u6240\u4ee5\u4f1a\u4ea7\u751f\u8fd9\u79cd\u65b9\u6848\uff0c\u662f\u56e0\u4e3a\u8003\u8651\u5230\u6709\u5386\u53f2\u5305\u88b1\u3001\u590d\u7528\u73b0\u6709\u7ec4\u4ef6\u3001\u901a\u8fc7MQ\uff08\u6d88\u606f\u961f\u5217\uff09\u6765\u63d0\u9ad8\u6269\u5c55\u6027\u7b49\u56e0\u7d20\u3002\u8fd9\u4e2a\u65b9\u6848\u4f1a\u6709\u5982\u4e0b\u51e0\u4e2a\u95ee\u9898\u3002<\/p>\n\n\n\n \u589e\u52a0\u4e86\u67e5\u8be2\u7ec4\u4ef6\uff0c\u6bd4\u5982\u57fa\u7840\u7684sum\u3001count\u3001average\u51fd\u6570\u90fd\u9700\u8981\u989d\u5916\u8fdb\u884c\u8ba1\u7b97\u3002\u8fd9\u4e00\u65b9\u9762\u591a\u4e86\u4e00\u5c42\u4f9d\u8d56\uff0c\u5728\u67e5\u8be2\u6a21\u5757\u8fde\u63a5\u5931\u8d25\u7684\u60c5\u51b5\u4e0b\u4f1a\u591a\u63d0\u4f9b\u4e00\u5c42\u6545\u969c\u98ce\u9669\uff1b\u53e6\u4e00\u65b9\u9762\uff0c\u5f88\u591a\u57fa\u672c\u7684\u67e5\u8be2\u529f\u80fd\u7684\u5b9e\u73b0\u90fd\u9700\u8981\u6d88\u8017\u8d44\u6e90\u3002\u800c\u5728Prometheus\u7684\u67b6\u6784\u91cc\uff0c\u4e0a\u8ff0\u8fd9\u4e9b\u529f\u80fd\u90fd\u662f\u5f97\u5230\u652f\u6301\u7684\u3002 \u6293\u53d6\u65f6\u95f4\u53ef\u80fd\u4f1a\u4e0d\u540c\u6b65\uff0c\u5ef6\u8fdf\u7684\u6570\u636e\u5c06\u4f1a\u88ab\u6807\u8bb0\u4e3a\u9648\u65e7\u6570\u636e\u3002\u5982\u679c\u901a\u8fc7\u6dfb\u52a0\u65f6\u95f4\u6233\u6765\u6807\u8bc6\u6570\u636e\uff0c\u5c31\u4f1a\u5931\u53bb\u5bf9\u9648\u65e7\u6570\u636e\u7684\u5904\u7406\u903b\u8f91\u3002<\/p>\n\n\n\n Prometheus\u9002\u7528\u4e8e\u76d1\u63a7\u5927\u91cf\u5c0f\u76ee\u6807\u7684\u573a\u666f\uff0c\u800c\u4e0d\u662f\u76d1\u63a7\u4e00\u4e2a\u5927\u76ee\u6807\uff0c\u5982\u679c\u5c06\u6240\u6709\u6570\u636e\u90fd\u653e\u5728Exposer\u4e2d\uff0c\u90a3\u4e48Prometheus\u7684\u5355\u4e2aJob\u62c9\u53d6\u5c31\u4f1a\u6210\u4e3aCPU\u7684\u74f6\u9888\u3002\u8fd9\u4e2a\u67b6\u6784\u8bbe\u8ba1\u548cPushgateway\u7c7b\u4f3c\uff0c\u56e0\u6b64\u5982\u679c\u4e0d\u662f\u7279\u522b\u5fc5\u8981\u7684\u573a\u666f\uff0c\u5b98\u65b9\u90fd\u4e0d\u5efa\u8bae\u4f7f\u7528\u3002 \u7f3a\u5c11\u670d\u52a1\u53d1\u73b0\u548c\u62c9\u53d6\u63a7\u5236\u673a\u5236\uff0cPrometheus\u53ea\u80fd\u8bc6\u522bExposer\u6a21\u5757\uff0c\u4e0d\u77e5\u9053\u5177\u4f53\u662f\u54ea\u4e9btarget\uff0c\u4e5f\u4e0d\u77e5\u9053\u6bcf\u4e2atarget\u7684UP\u65f6\u95f4\uff0c\u6240\u4ee5\u65e0\u6cd5\u4f7f\u7528Scrape_*\u7b49\u6307\u6807\u505a\u67e5\u8be2\uff0c\u4e5f\u65e0\u6cd5\u7528scrape_limit\u505a\u9650\u5236\u3002<\/p>\n\n\n\n \u5bf9\u4e8e\u4e0a\u8ff0\u8fd9\u4e9b\u91cd\u5ea6\u4f9d\u8d56\uff0c\u53ef\u4ee5\u8003\u8651\u5c06\u5176\u4f18\u5316\u6389\uff0c\u800cPrometheus\u8fd9\u79cd\u91c7\u7528\u4ee5\u62c9\u6a21\u5f0f\u4e3a\u4e3b\u7684\u67b6\u6784\uff0c\u5728\u8fd9\u65b9\u9762\u7684\u5b9e\u73b0\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u53c2\u8003\u65b9\u5411\u3002\u540c\u7406\uff0c\u5f88\u591a\u4f01\u4e1a\u7684\u76d1\u63a7\u7cfb\u7edf\u5bf9\u4e8ecmdb\u5177\u6709\u5f3a\u4f9d\u8d56\uff0c\u901a\u8fc7Prometheus\u8fd9\u79cd\u67b6\u6784\u4e5f\u53ef\u4ee5\u6d88\u9664\u6807\u7b7e\u5bf9cmdb\u7684\u4f9d\u8d56\u3002<\/p>\n\n\n\nPrometheus\u7ec4\u4ef6<\/h3>\n\n\n\nJob\/Exporter<\/h2>\n\n\n\nJob\/Exporter\u5c5e\u4e8ePrometheus target\uff0c\u662fPrometheus\u76d1\u63a7\u7684\u5bf9\u8c61\u3002<\/p>\n\n\n\nJob\u5206\u4e3a\u957f\u65f6\u95f4\u6267\u884c\u548c\u77ed\u65f6\u95f4\u6267\u884c\u4e24\u79cd\u3002\u5bf9\u4e8e\u957f\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u53ef\u4ee5\u4f7f\u7528Prometheus Client\u96c6\u6210\u8fdb\u884c\u76d1\u63a7\uff1b\u5bf9\u4e8e\u77ed\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u53ef\u4ee5\u5c06\u76d1\u63a7\u6570\u636e\u63a8\u9001\u5230Pushgateway\u4e2d\u7f13\u5b58\u3002<\/p>\n\n\n\nPrometheus\u6536\u5f55\u7684Exporter\u6709\u4e0a\u5343\u79cd\uff0c\u5b83\u53ef\u4ee5\u7528\u4e8e\u7b2c\u4e09\u65b9\u7cfb\u7edf\u7684\u76d1\u63a7\u3002Exporter\u7684\u673a\u5236\u662f\u5c06\u7b2c\u4e09\u65b9\u7cfb\u7edf\u7684\u76d1\u63a7\u6570\u636e\u6309\u7167Prometheus\u7684\u683c\u5f0f\u66b4\u9732\u51fa\u6765\uff0c\u6ca1\u6709Exporter\u7684\u7b2c\u4e09\u65b9\u7cfb\u7edf\u53ef\u4ee5\u81ea\u5df1\u5b9a\u5236Exporter\u3002<\/p>\n\n\n\nExporter\u7684\u7ba1\u7406<\/h2>\n\n\n\nExporter\u79cd\u7c7b\u7e41\u591a\uff0c\u6bcf\u4e2aExporter\u53c8\u90fd\u662f\u72ec\u7acb\u7684\uff0c\u6bcf\u4e2a\u7ec4\u4ef6\u5404\u53f8\u5176\u804c\u3002\u4f46\u662fExporter\u8d8a\u591a\uff0c\u7ef4\u62a4\u538b\u529b\u8d8a\u5927\uff0c\u5c24\u5176\u662f\u5185\u90e8\u81ea\u884c\u5f00\u53d1\u7684Agent\u7b49\u5de5\u5177\u9700\u8981\u5927\u91cf\u7684\u4eba\u529b\u6765\u5b8c\u6210\u8d44\u6e90\u63a7\u5236\u3001\u7279\u6027\u6dfb\u52a0\u3001\u7248\u672c\u5347\u7ea7\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n\u9488\u5bf9\u4ee5\u4e0a\u95ee\u9898\uff0c\u53ef\u4ee5\u8003\u8651\u7528Influx Data\u516c\u53f8\u5f00\u6e90\u7684Telegra\u7edf\u4e00\u8fdb\u884c\u7ba1\u7406\u3002Telegraf\u662f\u4e00\u4e2a\u7528Golang\u7f16\u5199\u7684\u7528\u4e8e\u6570\u636e\u6536\u96c6\u7684\u5f00\u6e90Agent\uff0c\u5176\u57fa\u4e8e\u63d2\u4ef6\u9a71\u52a8\u3002Telegraf\u63d0\u4f9b\u7684\u8f93\u5165\u548c\u8f93\u51fa\u63d2\u4ef6\u975e\u5e38\u4e30\u5bcc\uff0c\u5f53\u7528\u6237\u6709\u7279\u6b8a\u9700\u6c42\u65f6\uff0c\u4e5f\u53ef\u4ee5\u81ea\u884c\u7f16\u5199\u63d2\u4ef6\uff08\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\uff09\u3002<\/p>\n\n\n\nTelegraf\u4ecb\u7ecd<\/h2>\n\n\n\nTelegraf\u5c31\u662fInflux Data\u516c\u53f8\u7684\u65f6\u95f4\u5e8f\u5217\u5e73\u53f0TICK\uff08\u4e00\u79cd\u9ad8\u6027\u80fd\u65f6\u5e8f\u4e2d\u53f0\uff09\u6280\u672f\u6808\u4e2d\u7684\u201cT\u201d\uff0c\u4e3b\u8981\u7528\u4e8e\u6536\u96c6\u65f6\u95f4\u5e8f\u5217\u578b\u6570\u636e\uff0c\u6bd4\u5982\u670d\u52a1\u5668CPU\u6307\u6807\u3001\u5185\u5b58\u6307\u6807\u3001\u5404\u79cdIoT\u8bbe\u5907\u4ea7\u751f\u7684\u6570\u636e\u7b49\u3002Telegraf\u652f\u6301\u5404\u79cd\u7c7b\u578bExporter\u7684\u96c6\u6210\uff0c\u53ef\u4ee5\u5b9e\u73b0Exporter\u7684\u591a\u5408\u4e00\u3002\u8fd8\u6709\u4e00\u79cd\u601d\u8def\u5c31\u662f\u901a\u8fc7\u4e3b\u8fdb\u7a0b\u62c9\u8d77\u591a\u4e2aExporter\u8fdb\u7a0b\uff0c\u4ecd\u7136\u53ef\u4ee5\u8ddf\u7740\u793e\u533a\u7248\u672c\u8fdb\u884c\u66f4\u65b0\u3002<\/p>\n\n\n\nTelegraf\u7684\u4f18\u70b9<\/h2>\n\n\n\nTelegraf\u7684CPU\u548c\u5185\u5b58\u4f7f\u7528\u7387\u6781\u4f4e\uff0c\u652f\u6301\u51e0\u4e4e\u6240\u6709\u7684\u96c6\u6210\u76d1\u63a7\u548c\u4e30\u5bcc\u7684\u793e\u533a\u96c6\u6210\u53ef\u89c6\u5316\uff0c\u5982Linux\u3001Redis\u3001Apache\u3001StatsD\u3001Java\/Jolokia\u3001Cassandra\u3001MySQL\u7b49\u3002\u7531\u4e8ePrometheus\u548cInfluxDB\u90fd\u662f\u65f6\u95f4\u5e8f\u5217\u5b58\u50a8\u76d1\u63a7\u7cfb\u7edf\uff0c\u53ef\u4ee5\u53d8\u901a\u5730\u5c06Telegraf\u5bf9\u63a5\u5230Prometheus\u4e2d\u3002\u5728\u5b9e\u9645POC\u73af\u5883\u9a8c\u8bc1\u4e2d\uff0c\u4f7f\u7528Telegraf\u96c6\u6210Prometheus\u6bd4\u5355\u72ec\u4f7f\u7528Prometheus\u4f1a\u62e5\u6709\u66f4\u4f4e\u7684\u5185\u5b58\u4f7f\u7528\u7387\u548cCPU\u4f7f\u7528\u7387\u3002<\/p>\n\n\n\nPushgateway\u4ecb\u7ecd<\/h2>\n\n\n\nPrometheus\u662f\u62c9\u6a21\u5f0f\u4e3a\u4e3b\u7684\u76d1\u63a7\u7cfb\u7edf\uff0c\u5b83\u7684\u63a8\u6a21\u5f0f\u5c31\u662f\u901a\u8fc7Pushgateway\u7ec4\u4ef6\u5b9e\u73b0\u7684\u3002Pushgateway\u662f\u652f\u6301\u4e34\u65f6\u6027Job\u4e3b\u52a8\u63a8\u9001\u6307\u6807\u7684\u4e2d\u95f4\u7f51\u5173\uff0c\u5b83\u672c\u8d28\u4e0a\u662f\u4e00\u79cd\u7528\u4e8e\u76d1\u63a7Prometheus\u670d\u52a1\u5668\u65e0\u6cd5\u6293\u53d6\u7684\u8d44\u6e90\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5b83\u4e5f\u662f\u7528Go\u8bed\u8a00\u7f16\u5199\u7684\uff0c\u5728Apache 2.0\u8bb8\u53ef\u8bc1\u4e0b\u5f00\u6e90\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nPushgateway\u4f5c\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7684\u670d\u52a1\uff0c\u4f4d\u4e8e\u88ab\u91c7\u96c6\u76d1\u63a7\u6307\u6807\u7684\u5e94\u7528\u7a0b\u5e8f\u548cPrometheus\u670d\u52a1\u5668\u4e4b\u95f4\u3002\u5e94\u7528\u7a0b\u5e8f\u4e3b\u52a8\u63a8\u9001\u6307\u6807\u5230Pushgateway\uff0cPushgateway\u63a5\u6536\u6307\u6807\uff0c\u7136\u540ePushgateway\u4e5f\u4f5c\u4e3atarget\u88abPrometheus\u670d\u52a1\u5668\u6293\u53d6\u3002\u5b83\u7684\u4f7f\u7528\u573a\u666f\u4e3b\u8981\u6709\u5982\u4e0b\u51e0\u79cd: \u4e34\u65f6\/\u77ed\u4f5c\u4e1a\u3002 \u6279\u5904\u7406\u4f5c\u4e1a\u3002 \u5e94\u7528\u7a0b\u5e8f\u4e0ePrometheus\u670d\u52a1\u5668\u4e4b\u95f4\u6709\u7f51\u7edc\u9694\u79bb\uff0c\u5982\u5b89\u5168\u6027\uff08\u9632\u706b\u5899\uff09\u3001\u8fde\u63a5\u6027\uff08\u4e0d\u5728\u4e00\u4e2a\u7f51\u6bb5\uff0c\u670d\u52a1\u5668\u6216\u5e94\u7528\u7a0b\u5e8f\u4ec5\u5141\u8bb8\u7279\u5b9a\u7aef\u53e3\u6216\u8def\u5f84\u8bbf\u95ee\uff09\u3002 Pushgateway\u4e0e\u7f51\u5173\u7c7b\u4f3c\uff0c\u5728Prometheus\u4e2d\u88ab\u5efa\u8bae\u4f5c\u4e3a\u4e34\u65f6\u6027\u89e3\u51b3\u65b9\u6848\uff0c\u4e3b\u8981\u7528\u4e8e\u76d1\u63a7\u4e0d\u592a\u65b9\u4fbf\u8bbf\u95ee\u5230\u7684\u8d44\u6e90\u3002\u5b83\u4f1a\u4e22\u5931\u5f88\u591aPrometheus\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u529f\u80fd\uff0c\u6bd4\u5982UP\u6307\u6807\u548c\u6307\u6807\u8fc7\u671f\u65f6\u8fdb\u884c\u5b9e\u4f8b\u72b6\u6001\u76d1\u63a7\u3002<\/p>\n\n\n\n\u670d\u52a1\u53d1\u73b0\uff08Service Discovery\uff09<\/h2>\n\n\n\nPrometheus\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u673a\u5236\u5bf9\u4e91\u4ee5\u53ca\u5bb9\u5668\u73af\u5883\u4e0b\u7684\u76d1\u63a7\u573a\u666f\u63d0\u4f9b\u4e86\u5b8c\u5584\u7684\u652f\u6301\u3002<\/p>\n\n\n\n\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\nPrometheus\u4f1a\u5468\u671f\u6027\u5730\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6700\u65b0\u7684target\u4fe1\u606f\u3002<\/p>\n\n\n\n\u5bf9\u4e8e\u652f\u6301\u6587\u4ef6\u7684\u670d\u52a1\u53d1\u73b0\uff0c\u5b9e\u8df5\u573a\u666f\u4e0b\u53ef\u4ee5\u884d\u751f\u4e3a\u4e0e\u81ea\u52a8\u5316\u914d\u7f6e\u7ba1\u7406\u5de5\u5177\uff08Ansible\u3001Cron Job\u3001Puppet\u3001SaltStack\u7b49\uff09\u7ed3\u5408\u4f7f\u7528\u3002<\/p>\n\n\n\n\u901a\u8fc7\u670d\u52a1\u52a8\u6001\u611f\u77e5<\/h2>\n\n\n\nPrometheus\u8fd8\u652f\u6301\u591a\u79cd\u5e38\u89c1\u7684\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5982Kubernetes\u3001DNS\u3001Zookeeper\u3001Azure\u3001EC2\u548cGCE\u7b49\u3002\u4f8b\u5982\uff0cPrometheus\u53ef\u4ee5\u4f7f\u7528Kubernetes\u7684API\u83b7\u53d6\u5bb9\u5668\u4fe1\u606f\u7684\u53d8\u5316\uff08\u5982\u5bb9\u5668\u7684\u521b\u5efa\u548c\u5220\u9664\uff09\u6765\u52a8\u6001\u66f4\u65b0\u76d1\u63a7\u5bf9\u8c61\u3002<\/p>\n\n\n\n\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u65b9\u5f0f\uff0c\u7ba1\u7406\u5458\u53ef\u4ee5\u5728\u4e0d\u91cd\u542fPrometheus\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u52a8\u6001\u53d1\u73b0\u9700\u8981\u76d1\u63a7\u7684target\u5b9e\u4f8b\u4fe1\u606f\u3002<\/p>\n\n\n\nRelabeling<\/h2>\n\n\n\n\u670d\u52a1\u53d1\u73b0\u4e2d\u6709\u4e00\u4e2a\u9ad8\u7ea7\u64cd\u4f5c\uff0c\u5c31\u662fRelabeling\u673a\u5236\u3002Relabeling\u673a\u5236\u4f1a\u4ecePrometheus\u5305\u542b\u7684target\u5b9e\u4f8b\u4e2d\u83b7\u53d6\u9ed8\u8ba4\u7684\u5143\u6807\u7b7e\u4fe1\u606f\uff0c\u4ece\u800c\u5bf9\u4e0d\u540c\u5f00\u53d1\u73af\u5883\uff08\u6d4b\u8bd5\u3001\u9884\u53d1\u5e03\u3001\u7ebf\u4e0a\uff09\u3001\u4e0d\u540c\u4e1a\u52a1\u56e2\u961f\u3001\u4e0d\u540c\u7ec4\u7ec7\u7b49\u6309\u7167\u67d0\u4e9b\u89c4\u5219\uff08\u6bd4\u5982\u6807\u7b7e\uff09\u4ece\u670d\u52a1\u53d1\u73b0\u6ce8\u518c\u4e2d\u5fc3\u8fd4\u56de\u7684target\u5b9e\u4f8b\u4e2d\u6709\u9009\u62e9\u6027\u5730\u91c7\u96c6\u67d0\u4e9bExporter\u5b9e\u4f8b\u7684\u76d1\u63a7\u6570\u636e\u3002<\/p>\n\n\n\n\u8fd9\u53e5\u8bdd\u7684\u610f\u601d\u5c31\u662fRelabeling\u673a\u5236\u53ef\u4ee5\u8ba9prometheus\u6309\u7167\u52a8\u6001\u7684\u6309\u7167\u67d0\u4e9b\u89c4\u5219\u91c7\u96c6\u6307\u5b9a\u76d1\u63a7\u6570\u636e\u3002<\/p>\n\n\n\nPrometheus\u670d\u52a1\u5668\uff08Prometheus Server\uff09<\/h2>\n\n\n\n<\/figure>\n\n\n\nPrometheus\u670d\u52a1\u5668\u662fPrometheus\u6700\u6838\u5fc3\u7684\u6a21\u5757\u3002\u5b83\u4e3b\u8981\u5305\u542b\u6293\u53d6<\/strong>\u3001\u5b58\u50a8<\/strong>\u548c\u67e5\u8be2<\/strong>\u8fd93\u4e2a\u529f\u80fd<\/p>\n\n\n\n\u6293\u53d6<\/h2>\n\n\n\nPrometheus Server\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5468\u671f\u6027\u5730\u4ece\u4e0a\u9762\u4ecb\u7ecd\u7684Job\u3001Exporter\u3001Pushgateway\u8fd93\u4e2a\u7ec4\u4ef6\u4e2d\u901a\u8fc7HTTP\u8f6e\u8be2\u7684\u5f62\u5f0f\u62c9\u53d6\u76d1\u63a7\u6307\u6807\u6570\u636e\u3002<\/p>\n\n\n\n\u5b58\u50a8<\/h2>\n\n\n\n\u6293\u53d6\u5230\u7684\u76d1\u63a7\u6570\u636e\u901a\u8fc7\u4e00\u5b9a\u7684\u89c4\u5219\u6e05\u7406<\/strong>\u548c\u6570\u636e<\/strong>\u6574\u7406\uff08\u6293\u53d6\u524d\u4f7f\u7528\u670d\u52a1\u53d1\u73b0\u63d0\u4f9b\u7684relabel_configs\u65b9\u6cd5\uff0c\u6293\u53d6\u540e\u4f7f\u7528\u4f5c\u4e1a\u5185\u7684metrics_relabel_configs\u65b9\u6cd5\uff09\uff0c\u4f1a\u628a\u5f97\u5230\u7684\u7ed3\u679c\u5b58\u50a8\u5230\u65b0\u7684\u65f6\u95f4\u5e8f\u5217\u4e2d\u8fdb\u884c\u6301\u4e45\u5316<\/strong>\u3002\u591a\u5e74\u6765\uff0c\u5b58\u50a8\u6a21\u5757\u7ecf\u5386\u4e86\u591a\u6b21\u91cd\u65b0\u8bbe\u8ba1\uff0cPrometheus 2.0\u7248\u7684\u5b58\u50a8\u7cfb\u7edf\u662f\u7b2c\u4e09\u6b21\u8fed\u4ee3\u3002\u8be5\u5b58\u50a8\u7cfb\u7edf\u6bcf\u79d2\u53ef\u4ee5\u5904\u7406\u6570\u767e\u4e07\u4e2a\u6837\u54c1\u7684\u6444\u5165\uff0c\u4f7f\u5f97\u4f7f\u7528\u4e00\u53f0Prometheus\u670d\u52a1\u5668\u76d1\u63a7\u6570\u5343\u53f0\u673a\u5668\u6210\u4e3a\u53ef\u80fd\u3002\u4f7f\u7528\u7684\u538b\u7f29\u7b97\u6cd5\u53ef\u4ee5\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u5b9e\u73b0\u6bcf\u4e2a\u6837\u672c1.3B\u3002\u5efa\u8bae\u4f7f\u7528SSD\uff0c\u4f46\u4e0d\u662f\u4e25\u683c\u8981\u6c42\u3002<\/p>\n\n\n\nPrometheus\u7684\u5b58\u50a8\u5206\u4e3a\u672c\u5730\u5b58\u50a8\u548c\u8fdc\u7a0b\u5b58\u50a8<\/strong><\/h2>\n\n\n\n\u672c\u5730\u5b58\u50a8\uff1a\u4f1a\u76f4\u63a5\u4fdd\u7559\u5230\u672c\u5730\u78c1\u76d8\uff0c\u6027\u80fd\u4e0a\u5efa\u8bae\u4f7f\u7528SSD\u4e14\u4e0d\u8981\u4fdd\u5b58\u8d85\u8fc7\u4e00\u4e2a\u6708\u7684\u6570\u636e\u3002\u8bb0\u4f4f\uff0c\u4efb\u4f55\u7248\u672c\u7684Prometheus\u90fd\u4e0d\u652f\u6301NFS\u3002\u4e00\u4e9b\u5b9e\u9645\u751f\u4ea7\u6848\u4f8b\u544a\u8bc9\u6211\u4eec\uff0cPrometheus\u5b58\u50a8\u6587\u4ef6\u5982\u679c\u4f7f\u7528NFS\uff0c\u5219\u6709\u635f\u574f\u6216\u4e22\u5931\u5386\u53f2\u6570\u636e\u7684\u53ef\u80fd\u3002 \u8fdc\u7a0b\u5b58\u50a8\uff1a\u9002\u7528\u4e8e\u5b58\u50a8\u5927\u91cf\u7684\u76d1\u63a7\u6570\u636e\u3002Prometheus\u652f\u6301\u7684\u8fdc\u7a0b\u5b58\u50a8\u5305\u62ecOpenTSDB\u3001InfluxDB\u3001Elasticsearch\u3001Graphite\u3001CrateDB\u3001Kakfa\u3001PostgreSQL\u3001TimescaleDB\u3001TiKV\u7b49\u3002\u8fdc\u7a0b\u5b58\u50a8\u9700\u8981\u914d\u5408\u4e2d\u95f4\u5c42\u7684\u9002\u914d\u5668\u8fdb\u884c\u8f6c\u6362\uff0c\u4e3b\u8981\u6d89\u53caPrometheus\u4e2d\u7684remote_write\u548cremote_read\u63a5\u53e3\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u4e2d\uff0c\u8fdc\u7a0b\u5b58\u50a8\u4f1a\u51fa\u73b0\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u9700\u8981\u4e0d\u65ad\u5730\u8fdb\u884c\u4f18\u5316\u3001\u538b\u6d4b\u3001\u67b6\u6784\u6539\u9020\u751a\u81f3\u91cd\u5199\u4e0a\u4f20\u6570\u636e\u903b\u8f91\u7684\u6a21\u5757\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n\u67e5\u8be2<\/h2>\n\n\n\nPrometheus\u6301\u4e45\u5316\u6570\u636e\u4ee5\u540e\uff0c\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u901a\u8fc7PromQL\u8bed\u53e5\u5bf9\u6570\u636e\u8fdb\u884c\u67e5\u8be2\u4e86\u3002<\/p>\n\n\n\nDashboard<\/h2>\n\n\n\n\u5728Prometheus\u67b6\u6784\u56fe\u4e2d\u63d0\u5230\uff0cWeb UI\u3001Grafana\u3001API client\u53ef\u4ee5\u7edf\u4e00\u7406\u89e3\u4e3aPrometheus\u7684Dashboard\u3002Prometheus\u670d\u52a1\u5668\u9664\u4e86\u5185\u7f6e\u67e5\u8be2\u8bed\u8a00PromQL\u4ee5\u5916\uff0c\u8fd8\u652f\u6301\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u53ca\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e0a\u7684\u6570\u636e\u56fe\u5f62\u754c\u9762\u3002\u5b9e\u9645\u5de5\u4f5c\u4e2d\u4f7f\u7528Grafana\u7b49\u4f5c\u4e3a\u524d\u7aef\u5c55\u793a\u754c\u9762\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Client\u5411Prometheus Server\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u6570\u636e\u3002<\/p>\n\n\n\nAlertmanager<\/h2>\n\n\n\nAlertmanager\u662f\u72ec\u7acb\u4e8ePrometheus\u7684\u4e00\u4e2a\u544a\u8b66\u7ec4\u4ef6\uff0c\u9700\u8981\u5355\u72ec\u5b89\u88c5\u90e8\u7f72\u3002Prometheus\u53ef\u4ee5\u5c06\u591a\u4e2aAlertmanager\u914d\u7f6e\u4e3a\u4e00\u4e2a\u96c6\u7fa4\uff0c\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u52a8\u6001\u53d1\u73b0\u544a\u8b66\u96c6\u7fa4\u4e2d\u8282\u70b9\u7684\u4e0a\u4e0b\u7ebf\u4ece\u800c\u907f\u514d\u5355\u70b9\u95ee\u9898\uff0cAlertmanager\u4e5f\u652f\u6301\u96c6\u7fa4\u5185\u591a\u4e2a\u5b9e\u4f8b\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nAlertmanager\u63a5\u6536Prometheus\u63a8\u9001\u8fc7\u6765\u7684\u544a\u8b66\uff0c\u7528\u4e8e\u7ba1\u7406\u3001\u6574\u5408\u548c\u5206\u53d1\u544a\u8b66\u5230\u4e0d\u540c\u7684\u76ee\u7684\u5730\u3002Alertmanager\u63d0\u4f9b\u4e86\u591a\u79cd\u5185\u7f6e\u7684\u7b2c\u4e09\u65b9\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u5bf9Webhook\u901a\u77e5\u7684\u652f\u6301\uff0c\u901a\u8fc7Webhook\u7528\u6237\u53ef\u4ee5\u5b8c\u6210\u5bf9\u544a\u8b66\u7684\u66f4\u591a\u4e2a\u6027\u5316\u7684\u6269\u5c55\u3002Alertmanager\u9664\u4e86\u63d0\u4f9b\u57fa\u672c\u7684\u544a\u8b66\u901a\u77e5\u80fd\u529b\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5982\u5206\u7ec4\u3001\u6291\u5236\u4ee5\u53ca\u9759\u9ed8\u7b49\u544a\u8b66\u7279\u6027\u3002<\/p>\n\n\n\nPrometheus\u76843\u5927\u5c40\u9650\u6027<\/h3>\n\n\n\nPrometheus\u56fa\u7136\u5f3a\u5927\uff0c\u4f46\u5b83\u8fd8\u662f\u5177\u6709\u4e00\u5b9a\u5c40\u9650\u6027\u7684\u3002<\/p>\n\n\n\n1.\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7<\/h2>\n\n\n\nPrometheus\u4f5c\u4e3a\u4e00\u4e2a\u57fa\u4e8e\u5ea6\u91cf\u7684\u7cfb\u7edf\uff0c\u4e0d\u9002\u5408\u5b58\u50a8\u4e8b\u4ef6\u6216\u8005\u65e5\u5fd7\u7b49\uff0c\u5b83\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7\u3002\u5982\u679c\u7528\u6237\u9700\u8981\u6570\u636e\u7684\u7cbe\u51c6\u6027\uff0c\u53ef\u4ee5\u8003\u8651ELK\u6216\u5176\u4ed6\u65e5\u5fd7\u67b6\u6784\u3002\u53e6\u5916\uff0cAPM\u66f4\u9002\u7528\u4e8e\u94fe\u8def\u8ffd\u8e2a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n2.Prometheus\u672c\u5730\u5b58\u50a8\u4e0d\u9002\u5408\u5927\u91cf\u5386\u53f2\u6570\u636e\u5b58\u50a8<\/h2>\n\n\n\nPrometheus\u8ba4\u4e3a\u53ea\u6709\u6700\u8fd1\u7684\u76d1\u63a7\u6570\u636e\u624d\u6709\u67e5\u8be2\u7684\u9700\u8981\uff0c\u6240\u6709Prometheus\u672c\u5730\u5b58\u50a8\u7684\u8bbe\u8ba1\u521d\u8877\u53ea\u662f\u4fdd\u5b58\u77ed\u671f\uff08\u5982\u4e00\u4e2a\u6708\uff09\u7684\u6570\u636e\uff0c\u4e0d\u4f1a\u9488\u5bf9\u5927\u91cf\u7684\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5b58\u50a8\u3002\u5982\u679c\u9700\u8981\u5386\u53f2\u6570\u636e\uff0c\u5219\u5efa\u8bae\u4f7f\u7528Prometheus\u7684\u8fdc\u7aef\u5b58\u50a8\uff0c\u5982OpenTSDB\u3001M3DB\u7b49\u3002<\/p>\n\n\n\n3.\u6210\u719f\u5ea6\u6ca1\u6709InfluxDB\u9ad8<\/h2>\n\n\n\nPrometheus\u5728\u96c6\u7fa4\u4e0a\u4e0d\u8bba\u662f\u91c7\u7528\u8054\u90a6\u96c6\u7fa4\u8fd8\u662f\u91c7\u7528Improbable\u5f00\u6e90\u7684Thanos\u7b49\u65b9\u6848\uff0c\u90fd\u6ca1\u6709InfluxDB\u6210\u719f\u5ea6\u9ad8\uff0c\u9700\u8981\u89e3\u51b3\u5f88\u591a\u7ec6\u8282\u4e0a\u7684\u6280\u672f\u95ee\u9898\uff08\u5982\u8017\u5c3dCPU\u3001\u6d88\u8017\u673a\u5668\u8d44\u6e90\u7b49\u95ee\u9898\uff09\uff0c\u8fd9\u4e5f\u662f\u672c\u7ae0\u5f00\u5934\u63d0\u5230\u7684InfluxDB\u5728\u65f6\u5e8f\u6570\u636e\u5e93\u4e2d\u6392\u540d\u7b2c\u4e00\u7684\u539f\u56e0\u4e4b\u4e00\u3002\u90e8\u5206\u4e92\u8054\u7f51\u516c\u53f8\u62e5\u6709\u6d77\u91cf\u4e1a\u52a1\uff0c\u51fa\u4e8e\u96c6\u7fa4\u7684\u539f\u56e0\u4f1a\u8003\u8651\u5bf9\u5355\u673a\u514d\u8d39\u4f46\u662f\u96c6\u7fa4\u6536\u8d39\u7684InfluxDB\u8fdb\u884c\u81ea\u4e3b\u7814\u53d1\u3002<\/p>\n\n\n\n\u603b\u4e4b\uff0c\u4f7f\u7528Prometheus\u4e00\u5b9a\u8981\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a\u5b83\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3\u5927\u5bb9\u91cf\u5b58\u50a8\u95ee\u9898\uff0cTB\u7ea7\u4ee5\u4e0a\u6570\u636e\u5efa\u8bae\u4fdd\u5b58\u5230\u8fdc\u7aefTSDB\u4e2d<\/strong>\uff1b\u5b83\u662f\u4e3a\u8fd0\u884c\u65f6\u6b63\u786e\u7684\u76d1\u63a7\u6570\u636e\u51c6\u5907\u7684\uff0c\u65e0\u6cd5\u505a\u5230100%\u7cbe\u51c6\uff0c\u5b58\u5728\u7531\u5185\u6838\u6545\u969c\u3001\u522e\u64e6\u6545\u969c\u7b49\u56e0\u7d20\u9020\u6210\u7684\u5fae\u5c0f\u8bef\u5dee<\/p>\n\n\n\n\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
Prometheus\u5b98\u7f51\u4e0a\u7684\u81ea\u8ff0\u662f\uff1a\u201cFrom metrics to insight.Power your metrics and alerting with a leading open-source monitoring solution.\u201d\u7ffb\u8bd1\u8fc7\u6765\u5c31\u662f\uff1a\u4ece\u6307\u6807\u5230\u6d1e\u5bdf\u529b\uff0cPrometheus\u901a\u8fc7\u9886\u5148\u7684\u5f00\u6e90\u76d1\u63a7\u89e3\u51b3\u65b9\u6848\u4e3a\u7528\u6237\u7684\u6307\u6807\u548c\u544a\u8b66\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\u3002\u901a\u8fc7PromQL\u5b9e\u73b0\u591a\u7ef4\u5ea6\u6570\u636e\u6a21\u578b\u7684\u7075\u6d3b\u67e5\u8be2\u3002 \u5b9a\u4e49\u4e86\u5f00\u653e\u6307\u6807\u6570\u636e\u7684\u6807\u51c6\uff0c\u81ea\u5b9a\u4e49\u63a2\u9488\uff08\u5982Exporter\u7b49\uff09\uff0c\u7f16\u5199\u7b80\u5355\u65b9\u4fbf\u3002 PushGateway\u7ec4\u4ef6\u8ba9\u8fd9\u6b3e\u76d1\u63a7\u7cfb\u7edf\u53ef\u4ee5\u63a5\u6536\u76d1\u63a7\u6570\u636e\u3002 \u63d0\u4f9b\u4e86VM\u548c\u5bb9\u5668\u5316\u7684\u7248\u672c\u3002 \u5c24\u5176\u662f\u7b2c\u4e00\u70b9\uff0c\u8fd9\u662f\u5f88\u591a\u76d1\u63a7\u7cfb\u7edf\u671b\u5c18\u83ab\u53ca\u7684\u3002\u591a\u7ef4\u5ea6\u7684\u6570\u636e\u6a21\u578b\u548c\u7075\u6d3b\u7684\u67e5\u8be2\u65b9\u5f0f\uff0c\u4f7f\u76d1\u63a7\u6307\u6807\u53ef\u4ee5\u5173\u8054\u5230\u591a\u4e2a\u6807\u7b7e\uff0c\u5e76\u5bf9\u65f6\u95f4\u5e8f\u5217\u8fdb\u884c\u5207\u7247\u548c\u5207\u5757\uff0c\u4ee5\u652f\u6301\u5404\u79cd\u56fe\u5f62\u3001\u8868\u683c\u548c\u544a\u8b66\u573a\u666f\u3002<\/p>\n\n\n\n
Prometheus\u4e3b\u8981\u7531Prometheus Server\u3001Pushgateway\u3001Job\/Exporter\u3001Service Discovery\u3001Alertmanager\u3001Dashboard\u8fd96\u4e2a\u6838\u5fc3\u6a21\u5757\u6784\u6210\u3002Prometheus\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u673a\u5236\u53d1\u73b0target\uff0c\u8fd9\u4e9b\u76ee\u6807\u53ef\u4ee5\u662f\u957f\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u4e5f\u53ef\u4ee5\u662f\u77ed\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u8fd8\u53ef\u4ee5\u662f\u901a\u8fc7Exporter\u76d1\u63a7\u7684\u7b2c\u4e09\u65b9\u5e94\u7528\u7a0b\u5e8f\u3002\u88ab\u6293\u53d6\u7684\u6570\u636e\u4f1a\u5b58\u50a8\u8d77\u6765\uff0c\u901a\u8fc7PromQL\u8bed\u53e5\u5728\u4eea\u8868\u76d8\u7b49\u53ef\u89c6\u5316\u7cfb\u7edf\u4e2d\u4f9b\u67e5\u8be2\uff0c\u6216\u8005\u5411Alertmanager\u53d1\u9001\u544a\u8b66\u4fe1\u606f\uff0c\u544a\u8b66\u4f1a\u901a\u8fc7\u9875\u9762\u3001\u7535\u5b50\u90ae\u4ef6\u3001\u9489\u9489\u4fe1\u606f\u6216\u8005\u5176\u4ed6\u5f62\u5f0f\u5448\u73b0\u3002<\/p>\n\n\n\n
\u4ece\u4e0a\u8ff0\u67b6\u6784\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230\uff0cPrometheus\u4e0d\u4ec5\u662f\u4e00\u6b3e\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u5e93\uff0c\u5728\u6574\u4e2a\u751f\u6001\u4e0a\u8fd8\u662f\u4e00\u5957\u5b8c\u6574\u7684\u76d1\u63a7\u7cfb\u7edf\u3002\u5bf9\u4e8e\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u5e93\uff0c\u5728\u8fdb\u884c\u6280\u672f\u9009\u578b\u7684\u65f6\u5019\uff0c\u5f80\u5f80\u9700\u8981\u4ece\u5bbd\u5217\u6a21\u578b\u5b58\u50a8\u3001\u7c7bSQL\u67e5\u8be2\u652f\u6301\u3001\u6c34\u5e73\u6269\u5bb9\u3001\u8bfb\u5199\u5206\u79bb\u3001\u9ad8\u6027\u80fd\u7b49\u89d2\u5ea6\u8fdb\u884c\u5206\u6790\u3002\u800c\u76d1\u63a7\u7cfb\u7edf\u7684\u67b6\u6784\uff0c\u5f80\u5f80\u8fd8\u9700\u8981\u8003\u8651\u901a\u8fc7\u51cf\u5c11\u7ec4\u4ef6\u3001\u670d\u52a1\u6765\u964d\u4f4e\u6210\u672c\u548c\u590d\u6742\u6027\u4ee5\u53ca\u6c34\u5e73\u6269\u5bb9\u7b49\u56e0\u7d20\u3002<\/p>\n\n\n\n
\u5f88\u591a\u4f01\u4e1a\u81ea\u5df1\u7814\u53d1\u7684\u76d1\u63a7\u7cfb\u7edf\u4e2d\u5f80\u5f80\u4f1a\u4f7f\u7528\u6d88\u606f\u961f\u5217Kafka\u548cMetrics parser\u3001Metrics process server\u7b49Metrics\u89e3\u6790\u5904\u7406\u6a21\u5757\uff0c\u518d\u8f85\u4ee5Spark\u7b49\u6d41\u5f0f\u5904\u7406\u65b9\u5f0f\u3002\u5e94\u7528\u7a0b\u5e8f\u5c06Metric\u63a8\u5230\u6d88\u606f\u961f\u5217\uff08\u5982Kafaka\uff09\uff0c\u7136\u540e\u7ecf\u8fc7Exposer\u4e2d\u8f6c\uff0c\u518d\u88abPrometheus\u62c9\u53d6\u3002\u4e4b\u6240\u4ee5\u4f1a\u4ea7\u751f\u8fd9\u79cd\u65b9\u6848\uff0c\u662f\u56e0\u4e3a\u8003\u8651\u5230\u6709\u5386\u53f2\u5305\u88b1\u3001\u590d\u7528\u73b0\u6709\u7ec4\u4ef6\u3001\u901a\u8fc7MQ\uff08\u6d88\u606f\u961f\u5217\uff09\u6765\u63d0\u9ad8\u6269\u5c55\u6027\u7b49\u56e0\u7d20\u3002\u8fd9\u4e2a\u65b9\u6848\u4f1a\u6709\u5982\u4e0b\u51e0\u4e2a\u95ee\u9898\u3002<\/p>\n\n\n\n
\u589e\u52a0\u4e86\u67e5\u8be2\u7ec4\u4ef6\uff0c\u6bd4\u5982\u57fa\u7840\u7684sum\u3001count\u3001average\u51fd\u6570\u90fd\u9700\u8981\u989d\u5916\u8fdb\u884c\u8ba1\u7b97\u3002\u8fd9\u4e00\u65b9\u9762\u591a\u4e86\u4e00\u5c42\u4f9d\u8d56\uff0c\u5728\u67e5\u8be2\u6a21\u5757\u8fde\u63a5\u5931\u8d25\u7684\u60c5\u51b5\u4e0b\u4f1a\u591a\u63d0\u4f9b\u4e00\u5c42\u6545\u969c\u98ce\u9669\uff1b\u53e6\u4e00\u65b9\u9762\uff0c\u5f88\u591a\u57fa\u672c\u7684\u67e5\u8be2\u529f\u80fd\u7684\u5b9e\u73b0\u90fd\u9700\u8981\u6d88\u8017\u8d44\u6e90\u3002\u800c\u5728Prometheus\u7684\u67b6\u6784\u91cc\uff0c\u4e0a\u8ff0\u8fd9\u4e9b\u529f\u80fd\u90fd\u662f\u5f97\u5230\u652f\u6301\u7684\u3002 \u6293\u53d6\u65f6\u95f4\u53ef\u80fd\u4f1a\u4e0d\u540c\u6b65\uff0c\u5ef6\u8fdf\u7684\u6570\u636e\u5c06\u4f1a\u88ab\u6807\u8bb0\u4e3a\u9648\u65e7\u6570\u636e\u3002\u5982\u679c\u901a\u8fc7\u6dfb\u52a0\u65f6\u95f4\u6233\u6765\u6807\u8bc6\u6570\u636e\uff0c\u5c31\u4f1a\u5931\u53bb\u5bf9\u9648\u65e7\u6570\u636e\u7684\u5904\u7406\u903b\u8f91\u3002<\/p>\n\n\n\n
Prometheus\u9002\u7528\u4e8e\u76d1\u63a7\u5927\u91cf\u5c0f\u76ee\u6807\u7684\u573a\u666f\uff0c\u800c\u4e0d\u662f\u76d1\u63a7\u4e00\u4e2a\u5927\u76ee\u6807\uff0c\u5982\u679c\u5c06\u6240\u6709\u6570\u636e\u90fd\u653e\u5728Exposer\u4e2d\uff0c\u90a3\u4e48Prometheus\u7684\u5355\u4e2aJob\u62c9\u53d6\u5c31\u4f1a\u6210\u4e3aCPU\u7684\u74f6\u9888\u3002\u8fd9\u4e2a\u67b6\u6784\u8bbe\u8ba1\u548cPushgateway\u7c7b\u4f3c\uff0c\u56e0\u6b64\u5982\u679c\u4e0d\u662f\u7279\u522b\u5fc5\u8981\u7684\u573a\u666f\uff0c\u5b98\u65b9\u90fd\u4e0d\u5efa\u8bae\u4f7f\u7528\u3002 \u7f3a\u5c11\u670d\u52a1\u53d1\u73b0\u548c\u62c9\u53d6\u63a7\u5236\u673a\u5236\uff0cPrometheus\u53ea\u80fd\u8bc6\u522bExposer\u6a21\u5757\uff0c\u4e0d\u77e5\u9053\u5177\u4f53\u662f\u54ea\u4e9btarget\uff0c\u4e5f\u4e0d\u77e5\u9053\u6bcf\u4e2atarget\u7684UP\u65f6\u95f4\uff0c\u6240\u4ee5\u65e0\u6cd5\u4f7f\u7528Scrape_*\u7b49\u6307\u6807\u505a\u67e5\u8be2\uff0c\u4e5f\u65e0\u6cd5\u7528scrape_limit\u505a\u9650\u5236\u3002<\/p>\n\n\n\n
\u5bf9\u4e8e\u4e0a\u8ff0\u8fd9\u4e9b\u91cd\u5ea6\u4f9d\u8d56\uff0c\u53ef\u4ee5\u8003\u8651\u5c06\u5176\u4f18\u5316\u6389\uff0c\u800cPrometheus\u8fd9\u79cd\u91c7\u7528\u4ee5\u62c9\u6a21\u5f0f\u4e3a\u4e3b\u7684\u67b6\u6784\uff0c\u5728\u8fd9\u65b9\u9762\u7684\u5b9e\u73b0\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u53c2\u8003\u65b9\u5411\u3002\u540c\u7406\uff0c\u5f88\u591a\u4f01\u4e1a\u7684\u76d1\u63a7\u7cfb\u7edf\u5bf9\u4e8ecmdb\u5177\u6709\u5f3a\u4f9d\u8d56\uff0c\u901a\u8fc7Prometheus\u8fd9\u79cd\u67b6\u6784\u4e5f\u53ef\u4ee5\u6d88\u9664\u6807\u7b7e\u5bf9cmdb\u7684\u4f9d\u8d56\u3002<\/p>\n\n\n\n
Job\/Exporter\u5c5e\u4e8ePrometheus target\uff0c\u662fPrometheus\u76d1\u63a7\u7684\u5bf9\u8c61\u3002<\/p>\n\n\n\n
Job\u5206\u4e3a\u957f\u65f6\u95f4\u6267\u884c\u548c\u77ed\u65f6\u95f4\u6267\u884c\u4e24\u79cd\u3002\u5bf9\u4e8e\u957f\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u53ef\u4ee5\u4f7f\u7528Prometheus Client\u96c6\u6210\u8fdb\u884c\u76d1\u63a7\uff1b\u5bf9\u4e8e\u77ed\u65f6\u95f4\u6267\u884c\u7684Job\uff0c\u53ef\u4ee5\u5c06\u76d1\u63a7\u6570\u636e\u63a8\u9001\u5230Pushgateway\u4e2d\u7f13\u5b58\u3002<\/p>\n\n\n\n
Prometheus\u6536\u5f55\u7684Exporter\u6709\u4e0a\u5343\u79cd\uff0c\u5b83\u53ef\u4ee5\u7528\u4e8e\u7b2c\u4e09\u65b9\u7cfb\u7edf\u7684\u76d1\u63a7\u3002Exporter\u7684\u673a\u5236\u662f\u5c06\u7b2c\u4e09\u65b9\u7cfb\u7edf\u7684\u76d1\u63a7\u6570\u636e\u6309\u7167Prometheus\u7684\u683c\u5f0f\u66b4\u9732\u51fa\u6765\uff0c\u6ca1\u6709Exporter\u7684\u7b2c\u4e09\u65b9\u7cfb\u7edf\u53ef\u4ee5\u81ea\u5df1\u5b9a\u5236Exporter\u3002<\/p>\n\n\n\n
Exporter\u79cd\u7c7b\u7e41\u591a\uff0c\u6bcf\u4e2aExporter\u53c8\u90fd\u662f\u72ec\u7acb\u7684\uff0c\u6bcf\u4e2a\u7ec4\u4ef6\u5404\u53f8\u5176\u804c\u3002\u4f46\u662fExporter\u8d8a\u591a\uff0c\u7ef4\u62a4\u538b\u529b\u8d8a\u5927\uff0c\u5c24\u5176\u662f\u5185\u90e8\u81ea\u884c\u5f00\u53d1\u7684Agent\u7b49\u5de5\u5177\u9700\u8981\u5927\u91cf\u7684\u4eba\u529b\u6765\u5b8c\u6210\u8d44\u6e90\u63a7\u5236\u3001\u7279\u6027\u6dfb\u52a0\u3001\u7248\u672c\u5347\u7ea7\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n
\u9488\u5bf9\u4ee5\u4e0a\u95ee\u9898\uff0c\u53ef\u4ee5\u8003\u8651\u7528Influx Data\u516c\u53f8\u5f00\u6e90\u7684Telegra\u7edf\u4e00\u8fdb\u884c\u7ba1\u7406\u3002Telegraf\u662f\u4e00\u4e2a\u7528Golang\u7f16\u5199\u7684\u7528\u4e8e\u6570\u636e\u6536\u96c6\u7684\u5f00\u6e90Agent\uff0c\u5176\u57fa\u4e8e\u63d2\u4ef6\u9a71\u52a8\u3002Telegraf\u63d0\u4f9b\u7684\u8f93\u5165\u548c\u8f93\u51fa\u63d2\u4ef6\u975e\u5e38\u4e30\u5bcc\uff0c\u5f53\u7528\u6237\u6709\u7279\u6b8a\u9700\u6c42\u65f6\uff0c\u4e5f\u53ef\u4ee5\u81ea\u884c\u7f16\u5199\u63d2\u4ef6\uff08\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\uff09\u3002<\/p>\n\n\n\n
Telegraf\u5c31\u662fInflux Data\u516c\u53f8\u7684\u65f6\u95f4\u5e8f\u5217\u5e73\u53f0TICK\uff08\u4e00\u79cd\u9ad8\u6027\u80fd\u65f6\u5e8f\u4e2d\u53f0\uff09\u6280\u672f\u6808\u4e2d\u7684\u201cT\u201d\uff0c\u4e3b\u8981\u7528\u4e8e\u6536\u96c6\u65f6\u95f4\u5e8f\u5217\u578b\u6570\u636e\uff0c\u6bd4\u5982\u670d\u52a1\u5668CPU\u6307\u6807\u3001\u5185\u5b58\u6307\u6807\u3001\u5404\u79cdIoT\u8bbe\u5907\u4ea7\u751f\u7684\u6570\u636e\u7b49\u3002Telegraf\u652f\u6301\u5404\u79cd\u7c7b\u578bExporter\u7684\u96c6\u6210\uff0c\u53ef\u4ee5\u5b9e\u73b0Exporter\u7684\u591a\u5408\u4e00\u3002\u8fd8\u6709\u4e00\u79cd\u601d\u8def\u5c31\u662f\u901a\u8fc7\u4e3b\u8fdb\u7a0b\u62c9\u8d77\u591a\u4e2aExporter\u8fdb\u7a0b\uff0c\u4ecd\u7136\u53ef\u4ee5\u8ddf\u7740\u793e\u533a\u7248\u672c\u8fdb\u884c\u66f4\u65b0\u3002<\/p>\n\n\n\n
Telegraf\u7684CPU\u548c\u5185\u5b58\u4f7f\u7528\u7387\u6781\u4f4e\uff0c\u652f\u6301\u51e0\u4e4e\u6240\u6709\u7684\u96c6\u6210\u76d1\u63a7\u548c\u4e30\u5bcc\u7684\u793e\u533a\u96c6\u6210\u53ef\u89c6\u5316\uff0c\u5982Linux\u3001Redis\u3001Apache\u3001StatsD\u3001Java\/Jolokia\u3001Cassandra\u3001MySQL\u7b49\u3002\u7531\u4e8ePrometheus\u548cInfluxDB\u90fd\u662f\u65f6\u95f4\u5e8f\u5217\u5b58\u50a8\u76d1\u63a7\u7cfb\u7edf\uff0c\u53ef\u4ee5\u53d8\u901a\u5730\u5c06Telegraf\u5bf9\u63a5\u5230Prometheus\u4e2d\u3002\u5728\u5b9e\u9645POC\u73af\u5883\u9a8c\u8bc1\u4e2d\uff0c\u4f7f\u7528Telegraf\u96c6\u6210Prometheus\u6bd4\u5355\u72ec\u4f7f\u7528Prometheus\u4f1a\u62e5\u6709\u66f4\u4f4e\u7684\u5185\u5b58\u4f7f\u7528\u7387\u548cCPU\u4f7f\u7528\u7387\u3002<\/p>\n\n\n\n
Prometheus\u662f\u62c9\u6a21\u5f0f\u4e3a\u4e3b\u7684\u76d1\u63a7\u7cfb\u7edf\uff0c\u5b83\u7684\u63a8\u6a21\u5f0f\u5c31\u662f\u901a\u8fc7Pushgateway\u7ec4\u4ef6\u5b9e\u73b0\u7684\u3002Pushgateway\u662f\u652f\u6301\u4e34\u65f6\u6027Job\u4e3b\u52a8\u63a8\u9001\u6307\u6807\u7684\u4e2d\u95f4\u7f51\u5173\uff0c\u5b83\u672c\u8d28\u4e0a\u662f\u4e00\u79cd\u7528\u4e8e\u76d1\u63a7Prometheus\u670d\u52a1\u5668\u65e0\u6cd5\u6293\u53d6\u7684\u8d44\u6e90\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5b83\u4e5f\u662f\u7528Go\u8bed\u8a00\u7f16\u5199\u7684\uff0c\u5728Apache 2.0\u8bb8\u53ef\u8bc1\u4e0b\u5f00\u6e90\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nPushgateway\u4f5c\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7684\u670d\u52a1\uff0c\u4f4d\u4e8e\u88ab\u91c7\u96c6\u76d1\u63a7\u6307\u6807\u7684\u5e94\u7528\u7a0b\u5e8f\u548cPrometheus\u670d\u52a1\u5668\u4e4b\u95f4\u3002\u5e94\u7528\u7a0b\u5e8f\u4e3b\u52a8\u63a8\u9001\u6307\u6807\u5230Pushgateway\uff0cPushgateway\u63a5\u6536\u6307\u6807\uff0c\u7136\u540ePushgateway\u4e5f\u4f5c\u4e3atarget\u88abPrometheus\u670d\u52a1\u5668\u6293\u53d6\u3002\u5b83\u7684\u4f7f\u7528\u573a\u666f\u4e3b\u8981\u6709\u5982\u4e0b\u51e0\u79cd: \u4e34\u65f6\/\u77ed\u4f5c\u4e1a\u3002 \u6279\u5904\u7406\u4f5c\u4e1a\u3002 \u5e94\u7528\u7a0b\u5e8f\u4e0ePrometheus\u670d\u52a1\u5668\u4e4b\u95f4\u6709\u7f51\u7edc\u9694\u79bb\uff0c\u5982\u5b89\u5168\u6027\uff08\u9632\u706b\u5899\uff09\u3001\u8fde\u63a5\u6027\uff08\u4e0d\u5728\u4e00\u4e2a\u7f51\u6bb5\uff0c\u670d\u52a1\u5668\u6216\u5e94\u7528\u7a0b\u5e8f\u4ec5\u5141\u8bb8\u7279\u5b9a\u7aef\u53e3\u6216\u8def\u5f84\u8bbf\u95ee\uff09\u3002 Pushgateway\u4e0e\u7f51\u5173\u7c7b\u4f3c\uff0c\u5728Prometheus\u4e2d\u88ab\u5efa\u8bae\u4f5c\u4e3a\u4e34\u65f6\u6027\u89e3\u51b3\u65b9\u6848\uff0c\u4e3b\u8981\u7528\u4e8e\u76d1\u63a7\u4e0d\u592a\u65b9\u4fbf\u8bbf\u95ee\u5230\u7684\u8d44\u6e90\u3002\u5b83\u4f1a\u4e22\u5931\u5f88\u591aPrometheus\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u529f\u80fd\uff0c\u6bd4\u5982UP\u6307\u6807\u548c\u6307\u6807\u8fc7\u671f\u65f6\u8fdb\u884c\u5b9e\u4f8b\u72b6\u6001\u76d1\u63a7\u3002<\/p>\n\n\n\n\u670d\u52a1\u53d1\u73b0\uff08Service Discovery\uff09<\/h2>\n\n\n\nPrometheus\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u673a\u5236\u5bf9\u4e91\u4ee5\u53ca\u5bb9\u5668\u73af\u5883\u4e0b\u7684\u76d1\u63a7\u573a\u666f\u63d0\u4f9b\u4e86\u5b8c\u5584\u7684\u652f\u6301\u3002<\/p>\n\n\n\n\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\nPrometheus\u4f1a\u5468\u671f\u6027\u5730\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6700\u65b0\u7684target\u4fe1\u606f\u3002<\/p>\n\n\n\n\u5bf9\u4e8e\u652f\u6301\u6587\u4ef6\u7684\u670d\u52a1\u53d1\u73b0\uff0c\u5b9e\u8df5\u573a\u666f\u4e0b\u53ef\u4ee5\u884d\u751f\u4e3a\u4e0e\u81ea\u52a8\u5316\u914d\u7f6e\u7ba1\u7406\u5de5\u5177\uff08Ansible\u3001Cron Job\u3001Puppet\u3001SaltStack\u7b49\uff09\u7ed3\u5408\u4f7f\u7528\u3002<\/p>\n\n\n\n\u901a\u8fc7\u670d\u52a1\u52a8\u6001\u611f\u77e5<\/h2>\n\n\n\nPrometheus\u8fd8\u652f\u6301\u591a\u79cd\u5e38\u89c1\u7684\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5982Kubernetes\u3001DNS\u3001Zookeeper\u3001Azure\u3001EC2\u548cGCE\u7b49\u3002\u4f8b\u5982\uff0cPrometheus\u53ef\u4ee5\u4f7f\u7528Kubernetes\u7684API\u83b7\u53d6\u5bb9\u5668\u4fe1\u606f\u7684\u53d8\u5316\uff08\u5982\u5bb9\u5668\u7684\u521b\u5efa\u548c\u5220\u9664\uff09\u6765\u52a8\u6001\u66f4\u65b0\u76d1\u63a7\u5bf9\u8c61\u3002<\/p>\n\n\n\n\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u65b9\u5f0f\uff0c\u7ba1\u7406\u5458\u53ef\u4ee5\u5728\u4e0d\u91cd\u542fPrometheus\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u52a8\u6001\u53d1\u73b0\u9700\u8981\u76d1\u63a7\u7684target\u5b9e\u4f8b\u4fe1\u606f\u3002<\/p>\n\n\n\nRelabeling<\/h2>\n\n\n\n\u670d\u52a1\u53d1\u73b0\u4e2d\u6709\u4e00\u4e2a\u9ad8\u7ea7\u64cd\u4f5c\uff0c\u5c31\u662fRelabeling\u673a\u5236\u3002Relabeling\u673a\u5236\u4f1a\u4ecePrometheus\u5305\u542b\u7684target\u5b9e\u4f8b\u4e2d\u83b7\u53d6\u9ed8\u8ba4\u7684\u5143\u6807\u7b7e\u4fe1\u606f\uff0c\u4ece\u800c\u5bf9\u4e0d\u540c\u5f00\u53d1\u73af\u5883\uff08\u6d4b\u8bd5\u3001\u9884\u53d1\u5e03\u3001\u7ebf\u4e0a\uff09\u3001\u4e0d\u540c\u4e1a\u52a1\u56e2\u961f\u3001\u4e0d\u540c\u7ec4\u7ec7\u7b49\u6309\u7167\u67d0\u4e9b\u89c4\u5219\uff08\u6bd4\u5982\u6807\u7b7e\uff09\u4ece\u670d\u52a1\u53d1\u73b0\u6ce8\u518c\u4e2d\u5fc3\u8fd4\u56de\u7684target\u5b9e\u4f8b\u4e2d\u6709\u9009\u62e9\u6027\u5730\u91c7\u96c6\u67d0\u4e9bExporter\u5b9e\u4f8b\u7684\u76d1\u63a7\u6570\u636e\u3002<\/p>\n\n\n\n\u8fd9\u53e5\u8bdd\u7684\u610f\u601d\u5c31\u662fRelabeling\u673a\u5236\u53ef\u4ee5\u8ba9prometheus\u6309\u7167\u52a8\u6001\u7684\u6309\u7167\u67d0\u4e9b\u89c4\u5219\u91c7\u96c6\u6307\u5b9a\u76d1\u63a7\u6570\u636e\u3002<\/p>\n\n\n\nPrometheus\u670d\u52a1\u5668\uff08Prometheus Server\uff09<\/h2>\n\n\n\n<\/figure>\n\n\n\nPrometheus\u670d\u52a1\u5668\u662fPrometheus\u6700\u6838\u5fc3\u7684\u6a21\u5757\u3002\u5b83\u4e3b\u8981\u5305\u542b\u6293\u53d6<\/strong>\u3001\u5b58\u50a8<\/strong>\u548c\u67e5\u8be2<\/strong>\u8fd93\u4e2a\u529f\u80fd<\/p>\n\n\n\n\u6293\u53d6<\/h2>\n\n\n\nPrometheus Server\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5468\u671f\u6027\u5730\u4ece\u4e0a\u9762\u4ecb\u7ecd\u7684Job\u3001Exporter\u3001Pushgateway\u8fd93\u4e2a\u7ec4\u4ef6\u4e2d\u901a\u8fc7HTTP\u8f6e\u8be2\u7684\u5f62\u5f0f\u62c9\u53d6\u76d1\u63a7\u6307\u6807\u6570\u636e\u3002<\/p>\n\n\n\n\u5b58\u50a8<\/h2>\n\n\n\n\u6293\u53d6\u5230\u7684\u76d1\u63a7\u6570\u636e\u901a\u8fc7\u4e00\u5b9a\u7684\u89c4\u5219\u6e05\u7406<\/strong>\u548c\u6570\u636e<\/strong>\u6574\u7406\uff08\u6293\u53d6\u524d\u4f7f\u7528\u670d\u52a1\u53d1\u73b0\u63d0\u4f9b\u7684relabel_configs\u65b9\u6cd5\uff0c\u6293\u53d6\u540e\u4f7f\u7528\u4f5c\u4e1a\u5185\u7684metrics_relabel_configs\u65b9\u6cd5\uff09\uff0c\u4f1a\u628a\u5f97\u5230\u7684\u7ed3\u679c\u5b58\u50a8\u5230\u65b0\u7684\u65f6\u95f4\u5e8f\u5217\u4e2d\u8fdb\u884c\u6301\u4e45\u5316<\/strong>\u3002\u591a\u5e74\u6765\uff0c\u5b58\u50a8\u6a21\u5757\u7ecf\u5386\u4e86\u591a\u6b21\u91cd\u65b0\u8bbe\u8ba1\uff0cPrometheus 2.0\u7248\u7684\u5b58\u50a8\u7cfb\u7edf\u662f\u7b2c\u4e09\u6b21\u8fed\u4ee3\u3002\u8be5\u5b58\u50a8\u7cfb\u7edf\u6bcf\u79d2\u53ef\u4ee5\u5904\u7406\u6570\u767e\u4e07\u4e2a\u6837\u54c1\u7684\u6444\u5165\uff0c\u4f7f\u5f97\u4f7f\u7528\u4e00\u53f0Prometheus\u670d\u52a1\u5668\u76d1\u63a7\u6570\u5343\u53f0\u673a\u5668\u6210\u4e3a\u53ef\u80fd\u3002\u4f7f\u7528\u7684\u538b\u7f29\u7b97\u6cd5\u53ef\u4ee5\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u5b9e\u73b0\u6bcf\u4e2a\u6837\u672c1.3B\u3002\u5efa\u8bae\u4f7f\u7528SSD\uff0c\u4f46\u4e0d\u662f\u4e25\u683c\u8981\u6c42\u3002<\/p>\n\n\n\nPrometheus\u7684\u5b58\u50a8\u5206\u4e3a\u672c\u5730\u5b58\u50a8\u548c\u8fdc\u7a0b\u5b58\u50a8<\/strong><\/h2>\n\n\n\n\u672c\u5730\u5b58\u50a8\uff1a\u4f1a\u76f4\u63a5\u4fdd\u7559\u5230\u672c\u5730\u78c1\u76d8\uff0c\u6027\u80fd\u4e0a\u5efa\u8bae\u4f7f\u7528SSD\u4e14\u4e0d\u8981\u4fdd\u5b58\u8d85\u8fc7\u4e00\u4e2a\u6708\u7684\u6570\u636e\u3002\u8bb0\u4f4f\uff0c\u4efb\u4f55\u7248\u672c\u7684Prometheus\u90fd\u4e0d\u652f\u6301NFS\u3002\u4e00\u4e9b\u5b9e\u9645\u751f\u4ea7\u6848\u4f8b\u544a\u8bc9\u6211\u4eec\uff0cPrometheus\u5b58\u50a8\u6587\u4ef6\u5982\u679c\u4f7f\u7528NFS\uff0c\u5219\u6709\u635f\u574f\u6216\u4e22\u5931\u5386\u53f2\u6570\u636e\u7684\u53ef\u80fd\u3002 \u8fdc\u7a0b\u5b58\u50a8\uff1a\u9002\u7528\u4e8e\u5b58\u50a8\u5927\u91cf\u7684\u76d1\u63a7\u6570\u636e\u3002Prometheus\u652f\u6301\u7684\u8fdc\u7a0b\u5b58\u50a8\u5305\u62ecOpenTSDB\u3001InfluxDB\u3001Elasticsearch\u3001Graphite\u3001CrateDB\u3001Kakfa\u3001PostgreSQL\u3001TimescaleDB\u3001TiKV\u7b49\u3002\u8fdc\u7a0b\u5b58\u50a8\u9700\u8981\u914d\u5408\u4e2d\u95f4\u5c42\u7684\u9002\u914d\u5668\u8fdb\u884c\u8f6c\u6362\uff0c\u4e3b\u8981\u6d89\u53caPrometheus\u4e2d\u7684remote_write\u548cremote_read\u63a5\u53e3\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u4e2d\uff0c\u8fdc\u7a0b\u5b58\u50a8\u4f1a\u51fa\u73b0\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u9700\u8981\u4e0d\u65ad\u5730\u8fdb\u884c\u4f18\u5316\u3001\u538b\u6d4b\u3001\u67b6\u6784\u6539\u9020\u751a\u81f3\u91cd\u5199\u4e0a\u4f20\u6570\u636e\u903b\u8f91\u7684\u6a21\u5757\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n\u67e5\u8be2<\/h2>\n\n\n\nPrometheus\u6301\u4e45\u5316\u6570\u636e\u4ee5\u540e\uff0c\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u901a\u8fc7PromQL\u8bed\u53e5\u5bf9\u6570\u636e\u8fdb\u884c\u67e5\u8be2\u4e86\u3002<\/p>\n\n\n\nDashboard<\/h2>\n\n\n\n\u5728Prometheus\u67b6\u6784\u56fe\u4e2d\u63d0\u5230\uff0cWeb UI\u3001Grafana\u3001API client\u53ef\u4ee5\u7edf\u4e00\u7406\u89e3\u4e3aPrometheus\u7684Dashboard\u3002Prometheus\u670d\u52a1\u5668\u9664\u4e86\u5185\u7f6e\u67e5\u8be2\u8bed\u8a00PromQL\u4ee5\u5916\uff0c\u8fd8\u652f\u6301\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u53ca\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e0a\u7684\u6570\u636e\u56fe\u5f62\u754c\u9762\u3002\u5b9e\u9645\u5de5\u4f5c\u4e2d\u4f7f\u7528Grafana\u7b49\u4f5c\u4e3a\u524d\u7aef\u5c55\u793a\u754c\u9762\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Client\u5411Prometheus Server\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u6570\u636e\u3002<\/p>\n\n\n\nAlertmanager<\/h2>\n\n\n\nAlertmanager\u662f\u72ec\u7acb\u4e8ePrometheus\u7684\u4e00\u4e2a\u544a\u8b66\u7ec4\u4ef6\uff0c\u9700\u8981\u5355\u72ec\u5b89\u88c5\u90e8\u7f72\u3002Prometheus\u53ef\u4ee5\u5c06\u591a\u4e2aAlertmanager\u914d\u7f6e\u4e3a\u4e00\u4e2a\u96c6\u7fa4\uff0c\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u52a8\u6001\u53d1\u73b0\u544a\u8b66\u96c6\u7fa4\u4e2d\u8282\u70b9\u7684\u4e0a\u4e0b\u7ebf\u4ece\u800c\u907f\u514d\u5355\u70b9\u95ee\u9898\uff0cAlertmanager\u4e5f\u652f\u6301\u96c6\u7fa4\u5185\u591a\u4e2a\u5b9e\u4f8b\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nAlertmanager\u63a5\u6536Prometheus\u63a8\u9001\u8fc7\u6765\u7684\u544a\u8b66\uff0c\u7528\u4e8e\u7ba1\u7406\u3001\u6574\u5408\u548c\u5206\u53d1\u544a\u8b66\u5230\u4e0d\u540c\u7684\u76ee\u7684\u5730\u3002Alertmanager\u63d0\u4f9b\u4e86\u591a\u79cd\u5185\u7f6e\u7684\u7b2c\u4e09\u65b9\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u5bf9Webhook\u901a\u77e5\u7684\u652f\u6301\uff0c\u901a\u8fc7Webhook\u7528\u6237\u53ef\u4ee5\u5b8c\u6210\u5bf9\u544a\u8b66\u7684\u66f4\u591a\u4e2a\u6027\u5316\u7684\u6269\u5c55\u3002Alertmanager\u9664\u4e86\u63d0\u4f9b\u57fa\u672c\u7684\u544a\u8b66\u901a\u77e5\u80fd\u529b\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5982\u5206\u7ec4\u3001\u6291\u5236\u4ee5\u53ca\u9759\u9ed8\u7b49\u544a\u8b66\u7279\u6027\u3002<\/p>\n\n\n\nPrometheus\u76843\u5927\u5c40\u9650\u6027<\/h3>\n\n\n\nPrometheus\u56fa\u7136\u5f3a\u5927\uff0c\u4f46\u5b83\u8fd8\u662f\u5177\u6709\u4e00\u5b9a\u5c40\u9650\u6027\u7684\u3002<\/p>\n\n\n\n1.\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7<\/h2>\n\n\n\nPrometheus\u4f5c\u4e3a\u4e00\u4e2a\u57fa\u4e8e\u5ea6\u91cf\u7684\u7cfb\u7edf\uff0c\u4e0d\u9002\u5408\u5b58\u50a8\u4e8b\u4ef6\u6216\u8005\u65e5\u5fd7\u7b49\uff0c\u5b83\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7\u3002\u5982\u679c\u7528\u6237\u9700\u8981\u6570\u636e\u7684\u7cbe\u51c6\u6027\uff0c\u53ef\u4ee5\u8003\u8651ELK\u6216\u5176\u4ed6\u65e5\u5fd7\u67b6\u6784\u3002\u53e6\u5916\uff0cAPM\u66f4\u9002\u7528\u4e8e\u94fe\u8def\u8ffd\u8e2a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n2.Prometheus\u672c\u5730\u5b58\u50a8\u4e0d\u9002\u5408\u5927\u91cf\u5386\u53f2\u6570\u636e\u5b58\u50a8<\/h2>\n\n\n\nPrometheus\u8ba4\u4e3a\u53ea\u6709\u6700\u8fd1\u7684\u76d1\u63a7\u6570\u636e\u624d\u6709\u67e5\u8be2\u7684\u9700\u8981\uff0c\u6240\u6709Prometheus\u672c\u5730\u5b58\u50a8\u7684\u8bbe\u8ba1\u521d\u8877\u53ea\u662f\u4fdd\u5b58\u77ed\u671f\uff08\u5982\u4e00\u4e2a\u6708\uff09\u7684\u6570\u636e\uff0c\u4e0d\u4f1a\u9488\u5bf9\u5927\u91cf\u7684\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5b58\u50a8\u3002\u5982\u679c\u9700\u8981\u5386\u53f2\u6570\u636e\uff0c\u5219\u5efa\u8bae\u4f7f\u7528Prometheus\u7684\u8fdc\u7aef\u5b58\u50a8\uff0c\u5982OpenTSDB\u3001M3DB\u7b49\u3002<\/p>\n\n\n\n3.\u6210\u719f\u5ea6\u6ca1\u6709InfluxDB\u9ad8<\/h2>\n\n\n\nPrometheus\u5728\u96c6\u7fa4\u4e0a\u4e0d\u8bba\u662f\u91c7\u7528\u8054\u90a6\u96c6\u7fa4\u8fd8\u662f\u91c7\u7528Improbable\u5f00\u6e90\u7684Thanos\u7b49\u65b9\u6848\uff0c\u90fd\u6ca1\u6709InfluxDB\u6210\u719f\u5ea6\u9ad8\uff0c\u9700\u8981\u89e3\u51b3\u5f88\u591a\u7ec6\u8282\u4e0a\u7684\u6280\u672f\u95ee\u9898\uff08\u5982\u8017\u5c3dCPU\u3001\u6d88\u8017\u673a\u5668\u8d44\u6e90\u7b49\u95ee\u9898\uff09\uff0c\u8fd9\u4e5f\u662f\u672c\u7ae0\u5f00\u5934\u63d0\u5230\u7684InfluxDB\u5728\u65f6\u5e8f\u6570\u636e\u5e93\u4e2d\u6392\u540d\u7b2c\u4e00\u7684\u539f\u56e0\u4e4b\u4e00\u3002\u90e8\u5206\u4e92\u8054\u7f51\u516c\u53f8\u62e5\u6709\u6d77\u91cf\u4e1a\u52a1\uff0c\u51fa\u4e8e\u96c6\u7fa4\u7684\u539f\u56e0\u4f1a\u8003\u8651\u5bf9\u5355\u673a\u514d\u8d39\u4f46\u662f\u96c6\u7fa4\u6536\u8d39\u7684InfluxDB\u8fdb\u884c\u81ea\u4e3b\u7814\u53d1\u3002<\/p>\n\n\n\n\u603b\u4e4b\uff0c\u4f7f\u7528Prometheus\u4e00\u5b9a\u8981\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a\u5b83\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3\u5927\u5bb9\u91cf\u5b58\u50a8\u95ee\u9898\uff0cTB\u7ea7\u4ee5\u4e0a\u6570\u636e\u5efa\u8bae\u4fdd\u5b58\u5230\u8fdc\u7aefTSDB\u4e2d<\/strong>\uff1b\u5b83\u662f\u4e3a\u8fd0\u884c\u65f6\u6b63\u786e\u7684\u76d1\u63a7\u6570\u636e\u51c6\u5907\u7684\uff0c\u65e0\u6cd5\u505a\u5230100%\u7cbe\u51c6\uff0c\u5b58\u5728\u7531\u5185\u6838\u6545\u969c\u3001\u522e\u64e6\u6545\u969c\u7b49\u56e0\u7d20\u9020\u6210\u7684\u5fae\u5c0f\u8bef\u5dee<\/p>\n\n\n\n\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
Pushgateway\u4f5c\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7684\u670d\u52a1\uff0c\u4f4d\u4e8e\u88ab\u91c7\u96c6\u76d1\u63a7\u6307\u6807\u7684\u5e94\u7528\u7a0b\u5e8f\u548cPrometheus\u670d\u52a1\u5668\u4e4b\u95f4\u3002\u5e94\u7528\u7a0b\u5e8f\u4e3b\u52a8\u63a8\u9001\u6307\u6807\u5230Pushgateway\uff0cPushgateway\u63a5\u6536\u6307\u6807\uff0c\u7136\u540ePushgateway\u4e5f\u4f5c\u4e3atarget\u88abPrometheus\u670d\u52a1\u5668\u6293\u53d6\u3002\u5b83\u7684\u4f7f\u7528\u573a\u666f\u4e3b\u8981\u6709\u5982\u4e0b\u51e0\u79cd: \u4e34\u65f6\/\u77ed\u4f5c\u4e1a\u3002 \u6279\u5904\u7406\u4f5c\u4e1a\u3002 \u5e94\u7528\u7a0b\u5e8f\u4e0ePrometheus\u670d\u52a1\u5668\u4e4b\u95f4\u6709\u7f51\u7edc\u9694\u79bb\uff0c\u5982\u5b89\u5168\u6027\uff08\u9632\u706b\u5899\uff09\u3001\u8fde\u63a5\u6027\uff08\u4e0d\u5728\u4e00\u4e2a\u7f51\u6bb5\uff0c\u670d\u52a1\u5668\u6216\u5e94\u7528\u7a0b\u5e8f\u4ec5\u5141\u8bb8\u7279\u5b9a\u7aef\u53e3\u6216\u8def\u5f84\u8bbf\u95ee\uff09\u3002 Pushgateway\u4e0e\u7f51\u5173\u7c7b\u4f3c\uff0c\u5728Prometheus\u4e2d\u88ab\u5efa\u8bae\u4f5c\u4e3a\u4e34\u65f6\u6027\u89e3\u51b3\u65b9\u6848\uff0c\u4e3b\u8981\u7528\u4e8e\u76d1\u63a7\u4e0d\u592a\u65b9\u4fbf\u8bbf\u95ee\u5230\u7684\u8d44\u6e90\u3002\u5b83\u4f1a\u4e22\u5931\u5f88\u591aPrometheus\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u529f\u80fd\uff0c\u6bd4\u5982UP\u6307\u6807\u548c\u6307\u6807\u8fc7\u671f\u65f6\u8fdb\u884c\u5b9e\u4f8b\u72b6\u6001\u76d1\u63a7\u3002<\/p>\n\n\n\n
Prometheus\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u673a\u5236\u5bf9\u4e91\u4ee5\u53ca\u5bb9\u5668\u73af\u5883\u4e0b\u7684\u76d1\u63a7\u573a\u666f\u63d0\u4f9b\u4e86\u5b8c\u5584\u7684\u652f\u6301\u3002<\/p>\n\n\n\n
Prometheus\u4f1a\u5468\u671f\u6027\u5730\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u6700\u65b0\u7684target\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u5bf9\u4e8e\u652f\u6301\u6587\u4ef6\u7684\u670d\u52a1\u53d1\u73b0\uff0c\u5b9e\u8df5\u573a\u666f\u4e0b\u53ef\u4ee5\u884d\u751f\u4e3a\u4e0e\u81ea\u52a8\u5316\u914d\u7f6e\u7ba1\u7406\u5de5\u5177\uff08Ansible\u3001Cron Job\u3001Puppet\u3001SaltStack\u7b49\uff09\u7ed3\u5408\u4f7f\u7528\u3002<\/p>\n\n\n\n
Prometheus\u8fd8\u652f\u6301\u591a\u79cd\u5e38\u89c1\u7684\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5982Kubernetes\u3001DNS\u3001Zookeeper\u3001Azure\u3001EC2\u548cGCE\u7b49\u3002\u4f8b\u5982\uff0cPrometheus\u53ef\u4ee5\u4f7f\u7528Kubernetes\u7684API\u83b7\u53d6\u5bb9\u5668\u4fe1\u606f\u7684\u53d8\u5316\uff08\u5982\u5bb9\u5668\u7684\u521b\u5efa\u548c\u5220\u9664\uff09\u6765\u52a8\u6001\u66f4\u65b0\u76d1\u63a7\u5bf9\u8c61\u3002<\/p>\n\n\n\n
\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7684\u65b9\u5f0f\uff0c\u7ba1\u7406\u5458\u53ef\u4ee5\u5728\u4e0d\u91cd\u542fPrometheus\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u52a8\u6001\u53d1\u73b0\u9700\u8981\u76d1\u63a7\u7684target\u5b9e\u4f8b\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u670d\u52a1\u53d1\u73b0\u4e2d\u6709\u4e00\u4e2a\u9ad8\u7ea7\u64cd\u4f5c\uff0c\u5c31\u662fRelabeling\u673a\u5236\u3002Relabeling\u673a\u5236\u4f1a\u4ecePrometheus\u5305\u542b\u7684target\u5b9e\u4f8b\u4e2d\u83b7\u53d6\u9ed8\u8ba4\u7684\u5143\u6807\u7b7e\u4fe1\u606f\uff0c\u4ece\u800c\u5bf9\u4e0d\u540c\u5f00\u53d1\u73af\u5883\uff08\u6d4b\u8bd5\u3001\u9884\u53d1\u5e03\u3001\u7ebf\u4e0a\uff09\u3001\u4e0d\u540c\u4e1a\u52a1\u56e2\u961f\u3001\u4e0d\u540c\u7ec4\u7ec7\u7b49\u6309\u7167\u67d0\u4e9b\u89c4\u5219\uff08\u6bd4\u5982\u6807\u7b7e\uff09\u4ece\u670d\u52a1\u53d1\u73b0\u6ce8\u518c\u4e2d\u5fc3\u8fd4\u56de\u7684target\u5b9e\u4f8b\u4e2d\u6709\u9009\u62e9\u6027\u5730\u91c7\u96c6\u67d0\u4e9bExporter\u5b9e\u4f8b\u7684\u76d1\u63a7\u6570\u636e\u3002<\/p>\n\n\n\n
\u8fd9\u53e5\u8bdd\u7684\u610f\u601d\u5c31\u662fRelabeling\u673a\u5236\u53ef\u4ee5\u8ba9prometheus\u6309\u7167\u52a8\u6001\u7684\u6309\u7167\u67d0\u4e9b\u89c4\u5219\u91c7\u96c6\u6307\u5b9a\u76d1\u63a7\u6570\u636e\u3002<\/p>\n\n\n\n
Prometheus\u670d\u52a1\u5668\u662fPrometheus\u6700\u6838\u5fc3\u7684\u6a21\u5757\u3002\u5b83\u4e3b\u8981\u5305\u542b\u6293\u53d6<\/strong>\u3001\u5b58\u50a8<\/strong>\u548c\u67e5\u8be2<\/strong>\u8fd93\u4e2a\u529f\u80fd<\/p>\n\n\n\n\u6293\u53d6<\/h2>\n\n\n\nPrometheus Server\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5468\u671f\u6027\u5730\u4ece\u4e0a\u9762\u4ecb\u7ecd\u7684Job\u3001Exporter\u3001Pushgateway\u8fd93\u4e2a\u7ec4\u4ef6\u4e2d\u901a\u8fc7HTTP\u8f6e\u8be2\u7684\u5f62\u5f0f\u62c9\u53d6\u76d1\u63a7\u6307\u6807\u6570\u636e\u3002<\/p>\n\n\n\n\u5b58\u50a8<\/h2>\n\n\n\n\u6293\u53d6\u5230\u7684\u76d1\u63a7\u6570\u636e\u901a\u8fc7\u4e00\u5b9a\u7684\u89c4\u5219\u6e05\u7406<\/strong>\u548c\u6570\u636e<\/strong>\u6574\u7406\uff08\u6293\u53d6\u524d\u4f7f\u7528\u670d\u52a1\u53d1\u73b0\u63d0\u4f9b\u7684relabel_configs\u65b9\u6cd5\uff0c\u6293\u53d6\u540e\u4f7f\u7528\u4f5c\u4e1a\u5185\u7684metrics_relabel_configs\u65b9\u6cd5\uff09\uff0c\u4f1a\u628a\u5f97\u5230\u7684\u7ed3\u679c\u5b58\u50a8\u5230\u65b0\u7684\u65f6\u95f4\u5e8f\u5217\u4e2d\u8fdb\u884c\u6301\u4e45\u5316<\/strong>\u3002\u591a\u5e74\u6765\uff0c\u5b58\u50a8\u6a21\u5757\u7ecf\u5386\u4e86\u591a\u6b21\u91cd\u65b0\u8bbe\u8ba1\uff0cPrometheus 2.0\u7248\u7684\u5b58\u50a8\u7cfb\u7edf\u662f\u7b2c\u4e09\u6b21\u8fed\u4ee3\u3002\u8be5\u5b58\u50a8\u7cfb\u7edf\u6bcf\u79d2\u53ef\u4ee5\u5904\u7406\u6570\u767e\u4e07\u4e2a\u6837\u54c1\u7684\u6444\u5165\uff0c\u4f7f\u5f97\u4f7f\u7528\u4e00\u53f0Prometheus\u670d\u52a1\u5668\u76d1\u63a7\u6570\u5343\u53f0\u673a\u5668\u6210\u4e3a\u53ef\u80fd\u3002\u4f7f\u7528\u7684\u538b\u7f29\u7b97\u6cd5\u53ef\u4ee5\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u5b9e\u73b0\u6bcf\u4e2a\u6837\u672c1.3B\u3002\u5efa\u8bae\u4f7f\u7528SSD\uff0c\u4f46\u4e0d\u662f\u4e25\u683c\u8981\u6c42\u3002<\/p>\n\n\n\nPrometheus\u7684\u5b58\u50a8\u5206\u4e3a\u672c\u5730\u5b58\u50a8\u548c\u8fdc\u7a0b\u5b58\u50a8<\/strong><\/h2>\n\n\n\n\u672c\u5730\u5b58\u50a8\uff1a\u4f1a\u76f4\u63a5\u4fdd\u7559\u5230\u672c\u5730\u78c1\u76d8\uff0c\u6027\u80fd\u4e0a\u5efa\u8bae\u4f7f\u7528SSD\u4e14\u4e0d\u8981\u4fdd\u5b58\u8d85\u8fc7\u4e00\u4e2a\u6708\u7684\u6570\u636e\u3002\u8bb0\u4f4f\uff0c\u4efb\u4f55\u7248\u672c\u7684Prometheus\u90fd\u4e0d\u652f\u6301NFS\u3002\u4e00\u4e9b\u5b9e\u9645\u751f\u4ea7\u6848\u4f8b\u544a\u8bc9\u6211\u4eec\uff0cPrometheus\u5b58\u50a8\u6587\u4ef6\u5982\u679c\u4f7f\u7528NFS\uff0c\u5219\u6709\u635f\u574f\u6216\u4e22\u5931\u5386\u53f2\u6570\u636e\u7684\u53ef\u80fd\u3002 \u8fdc\u7a0b\u5b58\u50a8\uff1a\u9002\u7528\u4e8e\u5b58\u50a8\u5927\u91cf\u7684\u76d1\u63a7\u6570\u636e\u3002Prometheus\u652f\u6301\u7684\u8fdc\u7a0b\u5b58\u50a8\u5305\u62ecOpenTSDB\u3001InfluxDB\u3001Elasticsearch\u3001Graphite\u3001CrateDB\u3001Kakfa\u3001PostgreSQL\u3001TimescaleDB\u3001TiKV\u7b49\u3002\u8fdc\u7a0b\u5b58\u50a8\u9700\u8981\u914d\u5408\u4e2d\u95f4\u5c42\u7684\u9002\u914d\u5668\u8fdb\u884c\u8f6c\u6362\uff0c\u4e3b\u8981\u6d89\u53caPrometheus\u4e2d\u7684remote_write\u548cremote_read\u63a5\u53e3\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u4e2d\uff0c\u8fdc\u7a0b\u5b58\u50a8\u4f1a\u51fa\u73b0\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u9700\u8981\u4e0d\u65ad\u5730\u8fdb\u884c\u4f18\u5316\u3001\u538b\u6d4b\u3001\u67b6\u6784\u6539\u9020\u751a\u81f3\u91cd\u5199\u4e0a\u4f20\u6570\u636e\u903b\u8f91\u7684\u6a21\u5757\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n\u67e5\u8be2<\/h2>\n\n\n\nPrometheus\u6301\u4e45\u5316\u6570\u636e\u4ee5\u540e\uff0c\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u901a\u8fc7PromQL\u8bed\u53e5\u5bf9\u6570\u636e\u8fdb\u884c\u67e5\u8be2\u4e86\u3002<\/p>\n\n\n\nDashboard<\/h2>\n\n\n\n\u5728Prometheus\u67b6\u6784\u56fe\u4e2d\u63d0\u5230\uff0cWeb UI\u3001Grafana\u3001API client\u53ef\u4ee5\u7edf\u4e00\u7406\u89e3\u4e3aPrometheus\u7684Dashboard\u3002Prometheus\u670d\u52a1\u5668\u9664\u4e86\u5185\u7f6e\u67e5\u8be2\u8bed\u8a00PromQL\u4ee5\u5916\uff0c\u8fd8\u652f\u6301\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u53ca\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e0a\u7684\u6570\u636e\u56fe\u5f62\u754c\u9762\u3002\u5b9e\u9645\u5de5\u4f5c\u4e2d\u4f7f\u7528Grafana\u7b49\u4f5c\u4e3a\u524d\u7aef\u5c55\u793a\u754c\u9762\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Client\u5411Prometheus Server\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u6570\u636e\u3002<\/p>\n\n\n\nAlertmanager<\/h2>\n\n\n\nAlertmanager\u662f\u72ec\u7acb\u4e8ePrometheus\u7684\u4e00\u4e2a\u544a\u8b66\u7ec4\u4ef6\uff0c\u9700\u8981\u5355\u72ec\u5b89\u88c5\u90e8\u7f72\u3002Prometheus\u53ef\u4ee5\u5c06\u591a\u4e2aAlertmanager\u914d\u7f6e\u4e3a\u4e00\u4e2a\u96c6\u7fa4\uff0c\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u52a8\u6001\u53d1\u73b0\u544a\u8b66\u96c6\u7fa4\u4e2d\u8282\u70b9\u7684\u4e0a\u4e0b\u7ebf\u4ece\u800c\u907f\u514d\u5355\u70b9\u95ee\u9898\uff0cAlertmanager\u4e5f\u652f\u6301\u96c6\u7fa4\u5185\u591a\u4e2a\u5b9e\u4f8b\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nAlertmanager\u63a5\u6536Prometheus\u63a8\u9001\u8fc7\u6765\u7684\u544a\u8b66\uff0c\u7528\u4e8e\u7ba1\u7406\u3001\u6574\u5408\u548c\u5206\u53d1\u544a\u8b66\u5230\u4e0d\u540c\u7684\u76ee\u7684\u5730\u3002Alertmanager\u63d0\u4f9b\u4e86\u591a\u79cd\u5185\u7f6e\u7684\u7b2c\u4e09\u65b9\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u5bf9Webhook\u901a\u77e5\u7684\u652f\u6301\uff0c\u901a\u8fc7Webhook\u7528\u6237\u53ef\u4ee5\u5b8c\u6210\u5bf9\u544a\u8b66\u7684\u66f4\u591a\u4e2a\u6027\u5316\u7684\u6269\u5c55\u3002Alertmanager\u9664\u4e86\u63d0\u4f9b\u57fa\u672c\u7684\u544a\u8b66\u901a\u77e5\u80fd\u529b\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5982\u5206\u7ec4\u3001\u6291\u5236\u4ee5\u53ca\u9759\u9ed8\u7b49\u544a\u8b66\u7279\u6027\u3002<\/p>\n\n\n\nPrometheus\u76843\u5927\u5c40\u9650\u6027<\/h3>\n\n\n\nPrometheus\u56fa\u7136\u5f3a\u5927\uff0c\u4f46\u5b83\u8fd8\u662f\u5177\u6709\u4e00\u5b9a\u5c40\u9650\u6027\u7684\u3002<\/p>\n\n\n\n1.\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7<\/h2>\n\n\n\nPrometheus\u4f5c\u4e3a\u4e00\u4e2a\u57fa\u4e8e\u5ea6\u91cf\u7684\u7cfb\u7edf\uff0c\u4e0d\u9002\u5408\u5b58\u50a8\u4e8b\u4ef6\u6216\u8005\u65e5\u5fd7\u7b49\uff0c\u5b83\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7\u3002\u5982\u679c\u7528\u6237\u9700\u8981\u6570\u636e\u7684\u7cbe\u51c6\u6027\uff0c\u53ef\u4ee5\u8003\u8651ELK\u6216\u5176\u4ed6\u65e5\u5fd7\u67b6\u6784\u3002\u53e6\u5916\uff0cAPM\u66f4\u9002\u7528\u4e8e\u94fe\u8def\u8ffd\u8e2a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n2.Prometheus\u672c\u5730\u5b58\u50a8\u4e0d\u9002\u5408\u5927\u91cf\u5386\u53f2\u6570\u636e\u5b58\u50a8<\/h2>\n\n\n\nPrometheus\u8ba4\u4e3a\u53ea\u6709\u6700\u8fd1\u7684\u76d1\u63a7\u6570\u636e\u624d\u6709\u67e5\u8be2\u7684\u9700\u8981\uff0c\u6240\u6709Prometheus\u672c\u5730\u5b58\u50a8\u7684\u8bbe\u8ba1\u521d\u8877\u53ea\u662f\u4fdd\u5b58\u77ed\u671f\uff08\u5982\u4e00\u4e2a\u6708\uff09\u7684\u6570\u636e\uff0c\u4e0d\u4f1a\u9488\u5bf9\u5927\u91cf\u7684\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5b58\u50a8\u3002\u5982\u679c\u9700\u8981\u5386\u53f2\u6570\u636e\uff0c\u5219\u5efa\u8bae\u4f7f\u7528Prometheus\u7684\u8fdc\u7aef\u5b58\u50a8\uff0c\u5982OpenTSDB\u3001M3DB\u7b49\u3002<\/p>\n\n\n\n3.\u6210\u719f\u5ea6\u6ca1\u6709InfluxDB\u9ad8<\/h2>\n\n\n\nPrometheus\u5728\u96c6\u7fa4\u4e0a\u4e0d\u8bba\u662f\u91c7\u7528\u8054\u90a6\u96c6\u7fa4\u8fd8\u662f\u91c7\u7528Improbable\u5f00\u6e90\u7684Thanos\u7b49\u65b9\u6848\uff0c\u90fd\u6ca1\u6709InfluxDB\u6210\u719f\u5ea6\u9ad8\uff0c\u9700\u8981\u89e3\u51b3\u5f88\u591a\u7ec6\u8282\u4e0a\u7684\u6280\u672f\u95ee\u9898\uff08\u5982\u8017\u5c3dCPU\u3001\u6d88\u8017\u673a\u5668\u8d44\u6e90\u7b49\u95ee\u9898\uff09\uff0c\u8fd9\u4e5f\u662f\u672c\u7ae0\u5f00\u5934\u63d0\u5230\u7684InfluxDB\u5728\u65f6\u5e8f\u6570\u636e\u5e93\u4e2d\u6392\u540d\u7b2c\u4e00\u7684\u539f\u56e0\u4e4b\u4e00\u3002\u90e8\u5206\u4e92\u8054\u7f51\u516c\u53f8\u62e5\u6709\u6d77\u91cf\u4e1a\u52a1\uff0c\u51fa\u4e8e\u96c6\u7fa4\u7684\u539f\u56e0\u4f1a\u8003\u8651\u5bf9\u5355\u673a\u514d\u8d39\u4f46\u662f\u96c6\u7fa4\u6536\u8d39\u7684InfluxDB\u8fdb\u884c\u81ea\u4e3b\u7814\u53d1\u3002<\/p>\n\n\n\n\u603b\u4e4b\uff0c\u4f7f\u7528Prometheus\u4e00\u5b9a\u8981\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a\u5b83\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3\u5927\u5bb9\u91cf\u5b58\u50a8\u95ee\u9898\uff0cTB\u7ea7\u4ee5\u4e0a\u6570\u636e\u5efa\u8bae\u4fdd\u5b58\u5230\u8fdc\u7aefTSDB\u4e2d<\/strong>\uff1b\u5b83\u662f\u4e3a\u8fd0\u884c\u65f6\u6b63\u786e\u7684\u76d1\u63a7\u6570\u636e\u51c6\u5907\u7684\uff0c\u65e0\u6cd5\u505a\u5230100%\u7cbe\u51c6\uff0c\u5b58\u5728\u7531\u5185\u6838\u6545\u969c\u3001\u522e\u64e6\u6545\u969c\u7b49\u56e0\u7d20\u9020\u6210\u7684\u5fae\u5c0f\u8bef\u5dee<\/p>\n\n\n\n\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
Prometheus Server\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6\uff0c\u5468\u671f\u6027\u5730\u4ece\u4e0a\u9762\u4ecb\u7ecd\u7684Job\u3001Exporter\u3001Pushgateway\u8fd93\u4e2a\u7ec4\u4ef6\u4e2d\u901a\u8fc7HTTP\u8f6e\u8be2\u7684\u5f62\u5f0f\u62c9\u53d6\u76d1\u63a7\u6307\u6807\u6570\u636e\u3002<\/p>\n\n\n\n
\u6293\u53d6\u5230\u7684\u76d1\u63a7\u6570\u636e\u901a\u8fc7\u4e00\u5b9a\u7684\u89c4\u5219\u6e05\u7406<\/strong>\u548c\u6570\u636e<\/strong>\u6574\u7406\uff08\u6293\u53d6\u524d\u4f7f\u7528\u670d\u52a1\u53d1\u73b0\u63d0\u4f9b\u7684relabel_configs\u65b9\u6cd5\uff0c\u6293\u53d6\u540e\u4f7f\u7528\u4f5c\u4e1a\u5185\u7684metrics_relabel_configs\u65b9\u6cd5\uff09\uff0c\u4f1a\u628a\u5f97\u5230\u7684\u7ed3\u679c\u5b58\u50a8\u5230\u65b0\u7684\u65f6\u95f4\u5e8f\u5217\u4e2d\u8fdb\u884c\u6301\u4e45\u5316<\/strong>\u3002\u591a\u5e74\u6765\uff0c\u5b58\u50a8\u6a21\u5757\u7ecf\u5386\u4e86\u591a\u6b21\u91cd\u65b0\u8bbe\u8ba1\uff0cPrometheus 2.0\u7248\u7684\u5b58\u50a8\u7cfb\u7edf\u662f\u7b2c\u4e09\u6b21\u8fed\u4ee3\u3002\u8be5\u5b58\u50a8\u7cfb\u7edf\u6bcf\u79d2\u53ef\u4ee5\u5904\u7406\u6570\u767e\u4e07\u4e2a\u6837\u54c1\u7684\u6444\u5165\uff0c\u4f7f\u5f97\u4f7f\u7528\u4e00\u53f0Prometheus\u670d\u52a1\u5668\u76d1\u63a7\u6570\u5343\u53f0\u673a\u5668\u6210\u4e3a\u53ef\u80fd\u3002\u4f7f\u7528\u7684\u538b\u7f29\u7b97\u6cd5\u53ef\u4ee5\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u5b9e\u73b0\u6bcf\u4e2a\u6837\u672c1.3B\u3002\u5efa\u8bae\u4f7f\u7528SSD\uff0c\u4f46\u4e0d\u662f\u4e25\u683c\u8981\u6c42\u3002<\/p>\n\n\n\nPrometheus\u7684\u5b58\u50a8\u5206\u4e3a\u672c\u5730\u5b58\u50a8\u548c\u8fdc\u7a0b\u5b58\u50a8<\/strong><\/h2>\n\n\n\n\u672c\u5730\u5b58\u50a8\uff1a\u4f1a\u76f4\u63a5\u4fdd\u7559\u5230\u672c\u5730\u78c1\u76d8\uff0c\u6027\u80fd\u4e0a\u5efa\u8bae\u4f7f\u7528SSD\u4e14\u4e0d\u8981\u4fdd\u5b58\u8d85\u8fc7\u4e00\u4e2a\u6708\u7684\u6570\u636e\u3002\u8bb0\u4f4f\uff0c\u4efb\u4f55\u7248\u672c\u7684Prometheus\u90fd\u4e0d\u652f\u6301NFS\u3002\u4e00\u4e9b\u5b9e\u9645\u751f\u4ea7\u6848\u4f8b\u544a\u8bc9\u6211\u4eec\uff0cPrometheus\u5b58\u50a8\u6587\u4ef6\u5982\u679c\u4f7f\u7528NFS\uff0c\u5219\u6709\u635f\u574f\u6216\u4e22\u5931\u5386\u53f2\u6570\u636e\u7684\u53ef\u80fd\u3002 \u8fdc\u7a0b\u5b58\u50a8\uff1a\u9002\u7528\u4e8e\u5b58\u50a8\u5927\u91cf\u7684\u76d1\u63a7\u6570\u636e\u3002Prometheus\u652f\u6301\u7684\u8fdc\u7a0b\u5b58\u50a8\u5305\u62ecOpenTSDB\u3001InfluxDB\u3001Elasticsearch\u3001Graphite\u3001CrateDB\u3001Kakfa\u3001PostgreSQL\u3001TimescaleDB\u3001TiKV\u7b49\u3002\u8fdc\u7a0b\u5b58\u50a8\u9700\u8981\u914d\u5408\u4e2d\u95f4\u5c42\u7684\u9002\u914d\u5668\u8fdb\u884c\u8f6c\u6362\uff0c\u4e3b\u8981\u6d89\u53caPrometheus\u4e2d\u7684remote_write\u548cremote_read\u63a5\u53e3\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u4e2d\uff0c\u8fdc\u7a0b\u5b58\u50a8\u4f1a\u51fa\u73b0\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u9700\u8981\u4e0d\u65ad\u5730\u8fdb\u884c\u4f18\u5316\u3001\u538b\u6d4b\u3001\u67b6\u6784\u6539\u9020\u751a\u81f3\u91cd\u5199\u4e0a\u4f20\u6570\u636e\u903b\u8f91\u7684\u6a21\u5757\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n\u67e5\u8be2<\/h2>\n\n\n\nPrometheus\u6301\u4e45\u5316\u6570\u636e\u4ee5\u540e\uff0c\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u901a\u8fc7PromQL\u8bed\u53e5\u5bf9\u6570\u636e\u8fdb\u884c\u67e5\u8be2\u4e86\u3002<\/p>\n\n\n\nDashboard<\/h2>\n\n\n\n\u5728Prometheus\u67b6\u6784\u56fe\u4e2d\u63d0\u5230\uff0cWeb UI\u3001Grafana\u3001API client\u53ef\u4ee5\u7edf\u4e00\u7406\u89e3\u4e3aPrometheus\u7684Dashboard\u3002Prometheus\u670d\u52a1\u5668\u9664\u4e86\u5185\u7f6e\u67e5\u8be2\u8bed\u8a00PromQL\u4ee5\u5916\uff0c\u8fd8\u652f\u6301\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u53ca\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e0a\u7684\u6570\u636e\u56fe\u5f62\u754c\u9762\u3002\u5b9e\u9645\u5de5\u4f5c\u4e2d\u4f7f\u7528Grafana\u7b49\u4f5c\u4e3a\u524d\u7aef\u5c55\u793a\u754c\u9762\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Client\u5411Prometheus Server\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u6570\u636e\u3002<\/p>\n\n\n\nAlertmanager<\/h2>\n\n\n\nAlertmanager\u662f\u72ec\u7acb\u4e8ePrometheus\u7684\u4e00\u4e2a\u544a\u8b66\u7ec4\u4ef6\uff0c\u9700\u8981\u5355\u72ec\u5b89\u88c5\u90e8\u7f72\u3002Prometheus\u53ef\u4ee5\u5c06\u591a\u4e2aAlertmanager\u914d\u7f6e\u4e3a\u4e00\u4e2a\u96c6\u7fa4\uff0c\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u52a8\u6001\u53d1\u73b0\u544a\u8b66\u96c6\u7fa4\u4e2d\u8282\u70b9\u7684\u4e0a\u4e0b\u7ebf\u4ece\u800c\u907f\u514d\u5355\u70b9\u95ee\u9898\uff0cAlertmanager\u4e5f\u652f\u6301\u96c6\u7fa4\u5185\u591a\u4e2a\u5b9e\u4f8b\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nAlertmanager\u63a5\u6536Prometheus\u63a8\u9001\u8fc7\u6765\u7684\u544a\u8b66\uff0c\u7528\u4e8e\u7ba1\u7406\u3001\u6574\u5408\u548c\u5206\u53d1\u544a\u8b66\u5230\u4e0d\u540c\u7684\u76ee\u7684\u5730\u3002Alertmanager\u63d0\u4f9b\u4e86\u591a\u79cd\u5185\u7f6e\u7684\u7b2c\u4e09\u65b9\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u5bf9Webhook\u901a\u77e5\u7684\u652f\u6301\uff0c\u901a\u8fc7Webhook\u7528\u6237\u53ef\u4ee5\u5b8c\u6210\u5bf9\u544a\u8b66\u7684\u66f4\u591a\u4e2a\u6027\u5316\u7684\u6269\u5c55\u3002Alertmanager\u9664\u4e86\u63d0\u4f9b\u57fa\u672c\u7684\u544a\u8b66\u901a\u77e5\u80fd\u529b\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5982\u5206\u7ec4\u3001\u6291\u5236\u4ee5\u53ca\u9759\u9ed8\u7b49\u544a\u8b66\u7279\u6027\u3002<\/p>\n\n\n\nPrometheus\u76843\u5927\u5c40\u9650\u6027<\/h3>\n\n\n\nPrometheus\u56fa\u7136\u5f3a\u5927\uff0c\u4f46\u5b83\u8fd8\u662f\u5177\u6709\u4e00\u5b9a\u5c40\u9650\u6027\u7684\u3002<\/p>\n\n\n\n1.\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7<\/h2>\n\n\n\nPrometheus\u4f5c\u4e3a\u4e00\u4e2a\u57fa\u4e8e\u5ea6\u91cf\u7684\u7cfb\u7edf\uff0c\u4e0d\u9002\u5408\u5b58\u50a8\u4e8b\u4ef6\u6216\u8005\u65e5\u5fd7\u7b49\uff0c\u5b83\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7\u3002\u5982\u679c\u7528\u6237\u9700\u8981\u6570\u636e\u7684\u7cbe\u51c6\u6027\uff0c\u53ef\u4ee5\u8003\u8651ELK\u6216\u5176\u4ed6\u65e5\u5fd7\u67b6\u6784\u3002\u53e6\u5916\uff0cAPM\u66f4\u9002\u7528\u4e8e\u94fe\u8def\u8ffd\u8e2a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n2.Prometheus\u672c\u5730\u5b58\u50a8\u4e0d\u9002\u5408\u5927\u91cf\u5386\u53f2\u6570\u636e\u5b58\u50a8<\/h2>\n\n\n\nPrometheus\u8ba4\u4e3a\u53ea\u6709\u6700\u8fd1\u7684\u76d1\u63a7\u6570\u636e\u624d\u6709\u67e5\u8be2\u7684\u9700\u8981\uff0c\u6240\u6709Prometheus\u672c\u5730\u5b58\u50a8\u7684\u8bbe\u8ba1\u521d\u8877\u53ea\u662f\u4fdd\u5b58\u77ed\u671f\uff08\u5982\u4e00\u4e2a\u6708\uff09\u7684\u6570\u636e\uff0c\u4e0d\u4f1a\u9488\u5bf9\u5927\u91cf\u7684\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5b58\u50a8\u3002\u5982\u679c\u9700\u8981\u5386\u53f2\u6570\u636e\uff0c\u5219\u5efa\u8bae\u4f7f\u7528Prometheus\u7684\u8fdc\u7aef\u5b58\u50a8\uff0c\u5982OpenTSDB\u3001M3DB\u7b49\u3002<\/p>\n\n\n\n3.\u6210\u719f\u5ea6\u6ca1\u6709InfluxDB\u9ad8<\/h2>\n\n\n\nPrometheus\u5728\u96c6\u7fa4\u4e0a\u4e0d\u8bba\u662f\u91c7\u7528\u8054\u90a6\u96c6\u7fa4\u8fd8\u662f\u91c7\u7528Improbable\u5f00\u6e90\u7684Thanos\u7b49\u65b9\u6848\uff0c\u90fd\u6ca1\u6709InfluxDB\u6210\u719f\u5ea6\u9ad8\uff0c\u9700\u8981\u89e3\u51b3\u5f88\u591a\u7ec6\u8282\u4e0a\u7684\u6280\u672f\u95ee\u9898\uff08\u5982\u8017\u5c3dCPU\u3001\u6d88\u8017\u673a\u5668\u8d44\u6e90\u7b49\u95ee\u9898\uff09\uff0c\u8fd9\u4e5f\u662f\u672c\u7ae0\u5f00\u5934\u63d0\u5230\u7684InfluxDB\u5728\u65f6\u5e8f\u6570\u636e\u5e93\u4e2d\u6392\u540d\u7b2c\u4e00\u7684\u539f\u56e0\u4e4b\u4e00\u3002\u90e8\u5206\u4e92\u8054\u7f51\u516c\u53f8\u62e5\u6709\u6d77\u91cf\u4e1a\u52a1\uff0c\u51fa\u4e8e\u96c6\u7fa4\u7684\u539f\u56e0\u4f1a\u8003\u8651\u5bf9\u5355\u673a\u514d\u8d39\u4f46\u662f\u96c6\u7fa4\u6536\u8d39\u7684InfluxDB\u8fdb\u884c\u81ea\u4e3b\u7814\u53d1\u3002<\/p>\n\n\n\n\u603b\u4e4b\uff0c\u4f7f\u7528Prometheus\u4e00\u5b9a\u8981\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a\u5b83\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3\u5927\u5bb9\u91cf\u5b58\u50a8\u95ee\u9898\uff0cTB\u7ea7\u4ee5\u4e0a\u6570\u636e\u5efa\u8bae\u4fdd\u5b58\u5230\u8fdc\u7aefTSDB\u4e2d<\/strong>\uff1b\u5b83\u662f\u4e3a\u8fd0\u884c\u65f6\u6b63\u786e\u7684\u76d1\u63a7\u6570\u636e\u51c6\u5907\u7684\uff0c\u65e0\u6cd5\u505a\u5230100%\u7cbe\u51c6\uff0c\u5b58\u5728\u7531\u5185\u6838\u6545\u969c\u3001\u522e\u64e6\u6545\u969c\u7b49\u56e0\u7d20\u9020\u6210\u7684\u5fae\u5c0f\u8bef\u5dee<\/p>\n\n\n\n\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
\u672c\u5730\u5b58\u50a8\uff1a\u4f1a\u76f4\u63a5\u4fdd\u7559\u5230\u672c\u5730\u78c1\u76d8\uff0c\u6027\u80fd\u4e0a\u5efa\u8bae\u4f7f\u7528SSD\u4e14\u4e0d\u8981\u4fdd\u5b58\u8d85\u8fc7\u4e00\u4e2a\u6708\u7684\u6570\u636e\u3002\u8bb0\u4f4f\uff0c\u4efb\u4f55\u7248\u672c\u7684Prometheus\u90fd\u4e0d\u652f\u6301NFS\u3002\u4e00\u4e9b\u5b9e\u9645\u751f\u4ea7\u6848\u4f8b\u544a\u8bc9\u6211\u4eec\uff0cPrometheus\u5b58\u50a8\u6587\u4ef6\u5982\u679c\u4f7f\u7528NFS\uff0c\u5219\u6709\u635f\u574f\u6216\u4e22\u5931\u5386\u53f2\u6570\u636e\u7684\u53ef\u80fd\u3002 \u8fdc\u7a0b\u5b58\u50a8\uff1a\u9002\u7528\u4e8e\u5b58\u50a8\u5927\u91cf\u7684\u76d1\u63a7\u6570\u636e\u3002Prometheus\u652f\u6301\u7684\u8fdc\u7a0b\u5b58\u50a8\u5305\u62ecOpenTSDB\u3001InfluxDB\u3001Elasticsearch\u3001Graphite\u3001CrateDB\u3001Kakfa\u3001PostgreSQL\u3001TimescaleDB\u3001TiKV\u7b49\u3002\u8fdc\u7a0b\u5b58\u50a8\u9700\u8981\u914d\u5408\u4e2d\u95f4\u5c42\u7684\u9002\u914d\u5668\u8fdb\u884c\u8f6c\u6362\uff0c\u4e3b\u8981\u6d89\u53caPrometheus\u4e2d\u7684remote_write\u548cremote_read\u63a5\u53e3\u3002\u5728\u5b9e\u9645\u751f\u4ea7\u4e2d\uff0c\u8fdc\u7a0b\u5b58\u50a8\u4f1a\u51fa\u73b0\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u9700\u8981\u4e0d\u65ad\u5730\u8fdb\u884c\u4f18\u5316\u3001\u538b\u6d4b\u3001\u67b6\u6784\u6539\u9020\u751a\u81f3\u91cd\u5199\u4e0a\u4f20\u6570\u636e\u903b\u8f91\u7684\u6a21\u5757\u7b49\u5de5\u4f5c\u3002<\/p>\n\n\n\n
Prometheus\u6301\u4e45\u5316\u6570\u636e\u4ee5\u540e\uff0c\u5ba2\u6237\u7aef\u5c31\u53ef\u4ee5\u901a\u8fc7PromQL\u8bed\u53e5\u5bf9\u6570\u636e\u8fdb\u884c\u67e5\u8be2\u4e86\u3002<\/p>\n\n\n\n
\u5728Prometheus\u67b6\u6784\u56fe\u4e2d\u63d0\u5230\uff0cWeb UI\u3001Grafana\u3001API client\u53ef\u4ee5\u7edf\u4e00\u7406\u89e3\u4e3aPrometheus\u7684Dashboard\u3002Prometheus\u670d\u52a1\u5668\u9664\u4e86\u5185\u7f6e\u67e5\u8be2\u8bed\u8a00PromQL\u4ee5\u5916\uff0c\u8fd8\u652f\u6301\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u53ca\u8868\u8fbe\u5f0f\u6d4f\u89c8\u5668\u4e0a\u7684\u6570\u636e\u56fe\u5f62\u754c\u9762\u3002\u5b9e\u9645\u5de5\u4f5c\u4e2d\u4f7f\u7528Grafana\u7b49\u4f5c\u4e3a\u524d\u7aef\u5c55\u793a\u754c\u9762\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Client\u5411Prometheus Server\u53d1\u9001\u8bf7\u6c42\u4ee5\u83b7\u53d6\u6570\u636e\u3002<\/p>\n\n\n\n
Alertmanager\u662f\u72ec\u7acb\u4e8ePrometheus\u7684\u4e00\u4e2a\u544a\u8b66\u7ec4\u4ef6\uff0c\u9700\u8981\u5355\u72ec\u5b89\u88c5\u90e8\u7f72\u3002Prometheus\u53ef\u4ee5\u5c06\u591a\u4e2aAlertmanager\u914d\u7f6e\u4e3a\u4e00\u4e2a\u96c6\u7fa4\uff0c\u901a\u8fc7\u670d\u52a1\u53d1\u73b0\u52a8\u6001\u53d1\u73b0\u544a\u8b66\u96c6\u7fa4\u4e2d\u8282\u70b9\u7684\u4e0a\u4e0b\u7ebf\u4ece\u800c\u907f\u514d\u5355\u70b9\u95ee\u9898\uff0cAlertmanager\u4e5f\u652f\u6301\u96c6\u7fa4\u5185\u591a\u4e2a\u5b9e\u4f8b\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/p>\n\n\n\n<\/figure>\n\n\n\nAlertmanager\u63a5\u6536Prometheus\u63a8\u9001\u8fc7\u6765\u7684\u544a\u8b66\uff0c\u7528\u4e8e\u7ba1\u7406\u3001\u6574\u5408\u548c\u5206\u53d1\u544a\u8b66\u5230\u4e0d\u540c\u7684\u76ee\u7684\u5730\u3002Alertmanager\u63d0\u4f9b\u4e86\u591a\u79cd\u5185\u7f6e\u7684\u7b2c\u4e09\u65b9\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u5bf9Webhook\u901a\u77e5\u7684\u652f\u6301\uff0c\u901a\u8fc7Webhook\u7528\u6237\u53ef\u4ee5\u5b8c\u6210\u5bf9\u544a\u8b66\u7684\u66f4\u591a\u4e2a\u6027\u5316\u7684\u6269\u5c55\u3002Alertmanager\u9664\u4e86\u63d0\u4f9b\u57fa\u672c\u7684\u544a\u8b66\u901a\u77e5\u80fd\u529b\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5982\u5206\u7ec4\u3001\u6291\u5236\u4ee5\u53ca\u9759\u9ed8\u7b49\u544a\u8b66\u7279\u6027\u3002<\/p>\n\n\n\nPrometheus\u76843\u5927\u5c40\u9650\u6027<\/h3>\n\n\n\nPrometheus\u56fa\u7136\u5f3a\u5927\uff0c\u4f46\u5b83\u8fd8\u662f\u5177\u6709\u4e00\u5b9a\u5c40\u9650\u6027\u7684\u3002<\/p>\n\n\n\n1.\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7<\/h2>\n\n\n\nPrometheus\u4f5c\u4e3a\u4e00\u4e2a\u57fa\u4e8e\u5ea6\u91cf\u7684\u7cfb\u7edf\uff0c\u4e0d\u9002\u5408\u5b58\u50a8\u4e8b\u4ef6\u6216\u8005\u65e5\u5fd7\u7b49\uff0c\u5b83\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7\u3002\u5982\u679c\u7528\u6237\u9700\u8981\u6570\u636e\u7684\u7cbe\u51c6\u6027\uff0c\u53ef\u4ee5\u8003\u8651ELK\u6216\u5176\u4ed6\u65e5\u5fd7\u67b6\u6784\u3002\u53e6\u5916\uff0cAPM\u66f4\u9002\u7528\u4e8e\u94fe\u8def\u8ffd\u8e2a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n2.Prometheus\u672c\u5730\u5b58\u50a8\u4e0d\u9002\u5408\u5927\u91cf\u5386\u53f2\u6570\u636e\u5b58\u50a8<\/h2>\n\n\n\nPrometheus\u8ba4\u4e3a\u53ea\u6709\u6700\u8fd1\u7684\u76d1\u63a7\u6570\u636e\u624d\u6709\u67e5\u8be2\u7684\u9700\u8981\uff0c\u6240\u6709Prometheus\u672c\u5730\u5b58\u50a8\u7684\u8bbe\u8ba1\u521d\u8877\u53ea\u662f\u4fdd\u5b58\u77ed\u671f\uff08\u5982\u4e00\u4e2a\u6708\uff09\u7684\u6570\u636e\uff0c\u4e0d\u4f1a\u9488\u5bf9\u5927\u91cf\u7684\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5b58\u50a8\u3002\u5982\u679c\u9700\u8981\u5386\u53f2\u6570\u636e\uff0c\u5219\u5efa\u8bae\u4f7f\u7528Prometheus\u7684\u8fdc\u7aef\u5b58\u50a8\uff0c\u5982OpenTSDB\u3001M3DB\u7b49\u3002<\/p>\n\n\n\n3.\u6210\u719f\u5ea6\u6ca1\u6709InfluxDB\u9ad8<\/h2>\n\n\n\nPrometheus\u5728\u96c6\u7fa4\u4e0a\u4e0d\u8bba\u662f\u91c7\u7528\u8054\u90a6\u96c6\u7fa4\u8fd8\u662f\u91c7\u7528Improbable\u5f00\u6e90\u7684Thanos\u7b49\u65b9\u6848\uff0c\u90fd\u6ca1\u6709InfluxDB\u6210\u719f\u5ea6\u9ad8\uff0c\u9700\u8981\u89e3\u51b3\u5f88\u591a\u7ec6\u8282\u4e0a\u7684\u6280\u672f\u95ee\u9898\uff08\u5982\u8017\u5c3dCPU\u3001\u6d88\u8017\u673a\u5668\u8d44\u6e90\u7b49\u95ee\u9898\uff09\uff0c\u8fd9\u4e5f\u662f\u672c\u7ae0\u5f00\u5934\u63d0\u5230\u7684InfluxDB\u5728\u65f6\u5e8f\u6570\u636e\u5e93\u4e2d\u6392\u540d\u7b2c\u4e00\u7684\u539f\u56e0\u4e4b\u4e00\u3002\u90e8\u5206\u4e92\u8054\u7f51\u516c\u53f8\u62e5\u6709\u6d77\u91cf\u4e1a\u52a1\uff0c\u51fa\u4e8e\u96c6\u7fa4\u7684\u539f\u56e0\u4f1a\u8003\u8651\u5bf9\u5355\u673a\u514d\u8d39\u4f46\u662f\u96c6\u7fa4\u6536\u8d39\u7684InfluxDB\u8fdb\u884c\u81ea\u4e3b\u7814\u53d1\u3002<\/p>\n\n\n\n\u603b\u4e4b\uff0c\u4f7f\u7528Prometheus\u4e00\u5b9a\u8981\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a\u5b83\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3\u5927\u5bb9\u91cf\u5b58\u50a8\u95ee\u9898\uff0cTB\u7ea7\u4ee5\u4e0a\u6570\u636e\u5efa\u8bae\u4fdd\u5b58\u5230\u8fdc\u7aefTSDB\u4e2d<\/strong>\uff1b\u5b83\u662f\u4e3a\u8fd0\u884c\u65f6\u6b63\u786e\u7684\u76d1\u63a7\u6570\u636e\u51c6\u5907\u7684\uff0c\u65e0\u6cd5\u505a\u5230100%\u7cbe\u51c6\uff0c\u5b58\u5728\u7531\u5185\u6838\u6545\u969c\u3001\u522e\u64e6\u6545\u969c\u7b49\u56e0\u7d20\u9020\u6210\u7684\u5fae\u5c0f\u8bef\u5dee<\/p>\n\n\n\n\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
Alertmanager\u63a5\u6536Prometheus\u63a8\u9001\u8fc7\u6765\u7684\u544a\u8b66\uff0c\u7528\u4e8e\u7ba1\u7406\u3001\u6574\u5408\u548c\u5206\u53d1\u544a\u8b66\u5230\u4e0d\u540c\u7684\u76ee\u7684\u5730\u3002Alertmanager\u63d0\u4f9b\u4e86\u591a\u79cd\u5185\u7f6e\u7684\u7b2c\u4e09\u65b9\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b\u4e86\u5bf9Webhook\u901a\u77e5\u7684\u652f\u6301\uff0c\u901a\u8fc7Webhook\u7528\u6237\u53ef\u4ee5\u5b8c\u6210\u5bf9\u544a\u8b66\u7684\u66f4\u591a\u4e2a\u6027\u5316\u7684\u6269\u5c55\u3002Alertmanager\u9664\u4e86\u63d0\u4f9b\u57fa\u672c\u7684\u544a\u8b66\u901a\u77e5\u80fd\u529b\u4ee5\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u5982\u5206\u7ec4\u3001\u6291\u5236\u4ee5\u53ca\u9759\u9ed8\u7b49\u544a\u8b66\u7279\u6027\u3002<\/p>\n\n\n\n
Prometheus\u56fa\u7136\u5f3a\u5927\uff0c\u4f46\u5b83\u8fd8\u662f\u5177\u6709\u4e00\u5b9a\u5c40\u9650\u6027\u7684\u3002<\/p>\n\n\n\n
Prometheus\u4f5c\u4e3a\u4e00\u4e2a\u57fa\u4e8e\u5ea6\u91cf\u7684\u7cfb\u7edf\uff0c\u4e0d\u9002\u5408\u5b58\u50a8\u4e8b\u4ef6\u6216\u8005\u65e5\u5fd7\u7b49\uff0c\u5b83\u66f4\u591a\u5730\u5c55\u793a\u7684\u662f\u8d8b\u52bf\u6027\u7684\u76d1\u63a7\u3002\u5982\u679c\u7528\u6237\u9700\u8981\u6570\u636e\u7684\u7cbe\u51c6\u6027\uff0c\u53ef\u4ee5\u8003\u8651ELK\u6216\u5176\u4ed6\u65e5\u5fd7\u67b6\u6784\u3002\u53e6\u5916\uff0cAPM\u66f4\u9002\u7528\u4e8e\u94fe\u8def\u8ffd\u8e2a\u7684\u573a\u666f\u3002<\/p>\n\n\n\n
Prometheus\u8ba4\u4e3a\u53ea\u6709\u6700\u8fd1\u7684\u76d1\u63a7\u6570\u636e\u624d\u6709\u67e5\u8be2\u7684\u9700\u8981\uff0c\u6240\u6709Prometheus\u672c\u5730\u5b58\u50a8\u7684\u8bbe\u8ba1\u521d\u8877\u53ea\u662f\u4fdd\u5b58\u77ed\u671f\uff08\u5982\u4e00\u4e2a\u6708\uff09\u7684\u6570\u636e\uff0c\u4e0d\u4f1a\u9488\u5bf9\u5927\u91cf\u7684\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5b58\u50a8\u3002\u5982\u679c\u9700\u8981\u5386\u53f2\u6570\u636e\uff0c\u5219\u5efa\u8bae\u4f7f\u7528Prometheus\u7684\u8fdc\u7aef\u5b58\u50a8\uff0c\u5982OpenTSDB\u3001M3DB\u7b49\u3002<\/p>\n\n\n\n
Prometheus\u5728\u96c6\u7fa4\u4e0a\u4e0d\u8bba\u662f\u91c7\u7528\u8054\u90a6\u96c6\u7fa4\u8fd8\u662f\u91c7\u7528Improbable\u5f00\u6e90\u7684Thanos\u7b49\u65b9\u6848\uff0c\u90fd\u6ca1\u6709InfluxDB\u6210\u719f\u5ea6\u9ad8\uff0c\u9700\u8981\u89e3\u51b3\u5f88\u591a\u7ec6\u8282\u4e0a\u7684\u6280\u672f\u95ee\u9898\uff08\u5982\u8017\u5c3dCPU\u3001\u6d88\u8017\u673a\u5668\u8d44\u6e90\u7b49\u95ee\u9898\uff09\uff0c\u8fd9\u4e5f\u662f\u672c\u7ae0\u5f00\u5934\u63d0\u5230\u7684InfluxDB\u5728\u65f6\u5e8f\u6570\u636e\u5e93\u4e2d\u6392\u540d\u7b2c\u4e00\u7684\u539f\u56e0\u4e4b\u4e00\u3002\u90e8\u5206\u4e92\u8054\u7f51\u516c\u53f8\u62e5\u6709\u6d77\u91cf\u4e1a\u52a1\uff0c\u51fa\u4e8e\u96c6\u7fa4\u7684\u539f\u56e0\u4f1a\u8003\u8651\u5bf9\u5355\u673a\u514d\u8d39\u4f46\u662f\u96c6\u7fa4\u6536\u8d39\u7684InfluxDB\u8fdb\u884c\u81ea\u4e3b\u7814\u53d1\u3002<\/p>\n\n\n\n
\u603b\u4e4b\uff0c\u4f7f\u7528Prometheus\u4e00\u5b9a\u8981\u4e86\u89e3\u5b83\u7684\u8bbe\u8ba1\u7406\u5ff5\uff1a\u5b83\u5e76\u4e0d\u662f\u4e3a\u4e86\u89e3\u51b3\u5927\u5bb9\u91cf\u5b58\u50a8\u95ee\u9898\uff0cTB\u7ea7\u4ee5\u4e0a\u6570\u636e\u5efa\u8bae\u4fdd\u5b58\u5230\u8fdc\u7aefTSDB\u4e2d<\/strong>\uff1b\u5b83\u662f\u4e3a\u8fd0\u884c\u65f6\u6b63\u786e\u7684\u76d1\u63a7\u6570\u636e\u51c6\u5907\u7684\uff0c\u65e0\u6cd5\u505a\u5230100%\u7cbe\u51c6\uff0c\u5b58\u5728\u7531\u5185\u6838\u6545\u969c\u3001\u522e\u64e6\u6545\u969c\u7b49\u56e0\u7d20\u9020\u6210\u7684\u5fae\u5c0f\u8bef\u5dee<\/p>\n\n\n\n\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
\u8fd9\u4e00\u671f\u7684Prometheus\u6280\u672f\u5206\u4eab\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\uff0c\u66f4\u591a\u5f00\u6e90\u76d1\u63a7\u6280\u672f\u5206\u4eab\u8bf7\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51<\/a>\u6216\u4e50\u7ef4\u793e\u533a<\/a>\uff08https:\/\/forum.lwops.cn\/\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nPrometheus\u6280\u672f\u5206\u4eab\u2014\u2014Prometheus\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u63a2\u8ba8 - \u4e50\u7ef4\u5b98\u7f51<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n
\u524d\u8a00 \u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d […]<\/p>\n","protected":false},"author":1,"featured_media":11061,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[246],"tags":[238,256,257],"class_list":["post-11101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-prometheus-artisan","tag-prometheus","tag-prometheustd","tag-prometheuszj"],"metadata":{"_edit_lock":["1668151383:1"],"_thumbnail_id":["11061"],"_edit_last":["1"],"themepark_seo_title":["Prometheu\u7684s\u7279\u70b9\uff0c\u7ec4\u4ef6\uff0c\u5c40\u9650\u6027"],"themepark_seo_description":["\u8fd9\u4e00\u671f\u4e50\u7ef4\u541b\u4e3b\u8981\u8ddf\u5927\u5bb6\u6765\u63a2\u8ba8\u65b0\u4e00\u4ee3\u7684\u5f00\u6e90\u76d1\u63a7prometheus\uff0c\u6211\u4eec\u77e5\u9053 zabbix \u5728\u76d1\u63a7\u754c\u5360\u6709\u4e0d\u53ef\u64bc\u52a8\u7684\u5730\u4f4d\uff0c\u529f\u80fd\u5f3a\u5927\u3002\u4f46\u662f\u5bf9\u5bb9\u5668\u76d1\u63a7\u663e\u5f97\u529b\u4e0d\u4ece\u5fc3\u3002\u4e3a\u89e3\u51b3\u76d1\u63a7\u5bb9\u5668\u7684\u95ee\u9898\uff0c\u5f15\u5165\u4e86 Prometheus \u6280\u672f\u3002\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u6253\u7b97\u56f4\u7ed5 Prometheus \u505a\u4e00\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\uff0c\u987a\u4fbf\u4e5f\u5e2e\u81ea\u5df1\u7406\u6e05\u4e00\u4e0b\u77e5\u8bc6\u70b9\u3002"],"themepark_seo_keyword":["Prometheus\u7279\u70b9,Prometheus\u7ec4\u4ef6,Prometheus"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["246"],"_yoast_wpseo_focuskw":["prometheus\u7279\u70b9"],"_yoast_wpseo_linkdex":["41"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["4543"],"ig_es_is_post_notified":["1"]},"yoast_head":"\n