{"id":43421,"date":"2023-06-24T03:34:19","date_gmt":"2023-08-27T04:08:48","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/"},"modified":"2024-04-30T10:25:13","modified_gmt":"2024-04-30T02:25:13","slug":"%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/","title":{"rendered":"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8"},"content":{"rendered":"<p>\u8fd9\u662f\u4e00\u4efd\u4f5c\u4e1a\u5907\u5fd8\u5f55\u3002<br \/>\n\u4ee5\u4e0b\u662f\u5173\u4e8e\u6211\u5728\u6211\u7684 Mac \u4e0a\u6784\u5efa\u7684 Prometheus \u548c Alertmanager \u7684\u76f8\u5173\u4fe1\u606f\uff0c\u4f7f\u7528 promtool \u548c amtool \u8fdb\u884c\u6d4b\u8bd5\u65f6\u7684\u5907\u5fd8\u5f55\u3002<\/p>\n<p>\u4f7f\u7528promtool\/amtool\u68c0\u67e5Prometheus\/Alertmanager\u7684\u914d\u7f6e<\/p>\n<p>amtool\u7684\u7528\u6cd5- Prometheus\u6587\u6863<\/p>\n<h1>\u73af\u5883<\/h1>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Mac OS<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Prometheus 2.33.2<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Alertmanager 0.23.0<\/ul>\n<h1>\u4f7f\u7528 promtool\u3002<\/h1>\n<p>\u5f53\u60a8\u4e0b\u8f7dPrometheus\u4e8c\u8fdb\u5236\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u4e00\u8d77\u4f7f\u7528\u3002(\u4f7f\u7528Docker\u4e5f\u53ef\u4ee5\uff0c\u5c31\u50cf\u53c2\u8003\u6587\u7ae0\u4e2d\u4e00\u6837)<\/p>\n<pre class=\"post-pre\"><code>$ls\r\nLICENSE           consoles          prometheus.yml\r\nNOTICE            data              promtool\r\nconsole_libraries prometheus        rules.yml\r\n<\/code><\/pre>\n<p>\u770b\u4e0b\u5e2e\u52a9\u7684\u8bdd\uff0c\u5c31\u662f\u8fd9\u6837\u7684\u611f\u89c9\u3002<\/p>\n<pre class=\"post-pre\"><code> .\/promtool --help\r\nusage: promtool [&lt;flags&gt;] &lt;command&gt; [&lt;args&gt; ...]\r\n\r\nTooling for the Prometheus monitoring system.\r\n\r\nFlags:\r\n  -h, --help                 Show context-sensitive help (also try --help-long\r\n                             and --help-man).\r\n      --version              Show application version.\r\n      --enable-feature= ...  Comma separated feature names to enable (only\r\n                             PromQL related). See\r\n                             https:\/\/prometheus.io\/docs\/prometheus\/latest\/feature_flags\/\r\n                             for the options and more details.\r\n\r\nCommands:\r\n  help [&lt;command&gt;...]\r\n    Show help.\r\n\r\n  check service-discovery [&lt;flags&gt;] &lt;config-file&gt; &lt;job&gt;\r\n    Perform service discovery for the given job name and report the results,\r\n    including relabeling.\r\n\r\n  check config [&lt;flags&gt;] &lt;config-files&gt;...\r\n    Check if the config files are valid or not.\r\n\r\n  check web-config &lt;web-config-files&gt;...\r\n    Check if the web config files are valid or not.\r\n\r\n  check rules &lt;rule-files&gt;...\r\n    Check if the rule files are valid or not.\r\n\r\n  check metrics\r\n    Pass Prometheus metrics over stdin to lint them for consistency and\r\n    correctness.\r\n\r\n    examples:\r\n\r\n    $ cat metrics.prom | promtool check metrics\r\n\r\n    $ curl -s http:\/\/localhost:9090\/metrics | promtool check metrics\r\n\r\n  query instant [&lt;flags&gt;] &lt;server&gt; &lt;expr&gt;\r\n    Run instant query.\r\n\r\n  query range [&lt;flags&gt;] &lt;server&gt; &lt;expr&gt;\r\n    Run range query.\r\n\r\n  query series --match=MATCH [&lt;flags&gt;] &lt;server&gt;\r\n    Run series query.\r\n\r\n  query labels [&lt;flags&gt;] &lt;server&gt; &lt;name&gt;\r\n    Run labels query.\r\n\r\n  debug pprof &lt;server&gt;\r\n    Fetch profiling debug information.\r\n\r\n  debug metrics &lt;server&gt;\r\n    Fetch metrics debug information.\r\n\r\n  debug all &lt;server&gt;\r\n    Fetch all debug information.\r\n\r\n  test rules &lt;test-rule-file&gt;...\r\n    Unit tests for rules.\r\n\r\n  tsdb bench write [&lt;flags&gt;] [&lt;file&gt;]\r\n    Run a write performance benchmark.\r\n\r\n  tsdb analyze [&lt;flags&gt;] [&lt;db path&gt;] [&lt;block id&gt;]\r\n    Analyze churn, label pair cardinality and compaction efficiency.\r\n\r\n  tsdb list [&lt;flags&gt;] [&lt;db path&gt;]\r\n    List tsdb blocks.\r\n\r\n  tsdb dump [&lt;flags&gt;] [&lt;db path&gt;]\r\n    Dump samples from a TSDB.\r\n\r\n  tsdb create-blocks-from openmetrics &lt;input file&gt; [&lt;output directory&gt;]\r\n    Import samples from OpenMetrics input and produce TSDB blocks. Please refer\r\n    to the storage docs for more details.\r\n\r\n  tsdb create-blocks-from rules --start=START [&lt;flags&gt;] &lt;rule-files&gt;...\r\n    Create blocks of data for new recording rules.\r\n<\/code><\/pre>\n<p>\u8bd5\u7740\u7528 check config \u6765\u6267\u884c\u89c4\u5219\u6587\u4ef6\u548c\u914d\u7f6e\u6587\u4ef6\u7684\u68c0\u67e5\u3002<\/p>\n<pre class=\"post-pre\"><code>.\/promtool check config prometheus.yml\r\nChecking prometheus.yml\r\n  SUCCESS: 1 rule files found\r\n SUCCESS: prometheus.yml is valid prometheus config file syntax\r\n\r\nChecking rules.yml\r\n  SUCCESS: 1 rules found\r\n<\/code><\/pre>\n<p>\u597d\u7684\u3002<br \/>\n\u770b\u8d77\u6765\u5b83\u8fd8\u4f1a\u81ea\u52a8\u68c0\u67e5rules.yml\u3002<br \/>\n\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5rules\u6765\u68c0\u67e5\u5355\u4e2a\u89c4\u5219\u3002<\/p>\n<pre class=\"post-pre\"><code> .\/promtool check rules rules.yml\r\nChecking rules.yml\r\n  SUCCESS: 1 rules found\r\n<\/code><\/pre>\n<p>\u8fd9\u6b21\u867d\u7136\u4e0d\u4f1a\u5c1d\u8bd5\uff0c\u4f46\u542c\u8bf4\u4e5f\u53ef\u4ee5\u8fdb\u884c\u5355\u5143\u6d4b\u8bd5\u3002<\/p>\n<p>\u89c4\u5219\u7684\u5355\u5143\u6d4b\u8bd5<\/p>\n<p>\u666e\u7f57\u7c73\u4fee\u65af\uff1a\u5bf9\u8b66\u62a5\u89c4\u5219\u8fdb\u884c\u5355\u5143\u6d4b\u8bd5\u3002<\/p>\n<p>Prometheus\u6587\u4ef6\u4e2d\u63cf\u8ff0\u7684\u7531Prometheus\u6267\u884c\u7684\u89c4\u5219\u5355\u5143\u6d4b\u8bd5\u3002<\/p>\n<h1>\u4f7f\u7528 amtool<\/h1>\n<p>\u901a\u8fc7\u4f7f\u7528\u9644\u5e26\u5728Alertmanager\u4e2d\u7684amtool\u5de5\u5177\uff0c\u53ef\u4ee5\u68c0\u67e5Alertmanager\u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code> ls\r\nLICENSE               alertmanager.yml      data\r\nNOTICE                alertmanager.yml.back\r\nalertmanager          amtool\r\n<\/code><\/pre>\n<p>\u770b\u770b\u6709\u6ca1\u6709\u5e2e\u52a9\u3002<\/p>\n<pre class=\"post-pre\"><code>.\/amtool --help\r\nusage: amtool [&lt;flags&gt;] &lt;command&gt; [&lt;args&gt; ...]\r\n\r\nView and modify the current Alertmanager state.\r\n\r\nConfig File: The alertmanager tool will read a config file in YAML format from\r\none of two default config locations: $HOME\/.config\/amtool\/config.yml or\r\n\/etc\/amtool\/config.yml\r\n\r\nAll flags can be given in the config file, but the following are the suited for\r\nstatic configuration:\r\n\r\n  alertmanager.url\r\n        Set a default alertmanager url for each request\r\n\r\n  author\r\n        Set a default author value for new silences. If this argument is not\r\n        specified then the username will be used\r\n\r\n  require-comment\r\n        Bool, whether to require a comment on silence creation. Defaults to true\r\n\r\n  output\r\n        Set a default output type. Options are (simple, extended, json)\r\n\r\n  date.format\r\n        Sets the output format for dates. Defaults to \"2006-01-02 15:04:05 MST\"\r\n\r\n  tls.insecure.skip.verify\r\n        Skips TLS certificate verification for all HTTPS requests.\r\n        Defaults to false.\r\n\r\nFlags:\r\n  -h, --help           Show context-sensitive help (also try --help-long and\r\n                       --help-man).\r\n      --date.format=\"2006-01-02 15:04:05 MST\"\r\n                       Format of date output\r\n  -v, --verbose        Verbose running information\r\n      --alertmanager.url=ALERTMANAGER.URL\r\n                       Alertmanager to talk to\r\n  -o, --output=simple  Output formatter (simple, extended, json)\r\n      --timeout=30s    Timeout for the executed command\r\n      --tls.insecure.skip.verify\r\n                       Skip TLS certificate verification\r\n      --version-check  Check alertmanager version. Use --no-version-check to\r\n                       disable.\r\n      --version        Show application version.\r\n\r\nCommands:\r\n  help [&lt;command&gt;...]\r\n  alert\r\n    query* [&lt;flags&gt;] [&lt;matcher-groups&gt;...]\r\n    add [&lt;flags&gt;] [&lt;labels&gt;...]\r\n  silence\r\n    add [&lt;flags&gt;] [&lt;matcher-groups&gt;...]\r\n    expire [&lt;silence-ids&gt;...]\r\n    import [&lt;flags&gt;] [&lt;input-file&gt;]\r\n    query* [&lt;flags&gt;] [&lt;matcher-groups&gt;...]\r\n    update [&lt;flags&gt;] [&lt;update-ids&gt;...]\r\n  check-config [&lt;check-files&gt;...]\r\n  cluster\r\n    show*\r\n  config\r\n    show*\r\n    routes [&lt;flags&gt;]\r\n      show*\r\n      test [&lt;flags&gt;] [&lt;labels&gt;...]\r\n  template\r\n    render --template.glob=TEMPLATE.GLOB --template.text=TEMPLATE.TEXT [&lt;flags&gt;]\r\n<\/code><\/pre>\n<p>alertmanager \u7684\u4f7f\u7528\u65b9\u5f0f\u5728\u5176 GitHub \u7684 README \u6587\u4ef6\u4e2d\u6709\u8be6\u7ec6\u4ecb\u7ecd\u3002<\/p>\n<p>amtool\u53ef\u4ee5\u7528\u4e8e\u5904\u7406ASN.1\u4fe1\u606f\uff0c\u652f\u6301\u5404\u79cdASN.1\u7f16\u7801\u548c\u89e3\u7801\u64cd\u4f5c\u3002<\/p>\n<p>\u8bd5\u8bd5\u68c0\u67e5\u4e00\u4e0b\u8b66\u62a5\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code> .\/amtool check-config alertmanager.yml\r\nChecking 'alertmanager.yml'  SUCCESS\r\nFound:\r\n - global config\r\n - route\r\n - 0 inhibit rules\r\n - 1 receivers\r\n - 0 templates\r\n<\/code><\/pre>\n<p>\u597d\u7684\u3002<\/p>\n<p>\u8bd5\u7740\u5c1d\u8bd5\u4f7f\u7528\u5176\u4ed6\u547d\u4ee4\u5427\u3002<\/p>\n<pre class=\"post-pre\"><code>.\/amtool alert\r\namtool: error: required flag --alertmanager.url not provided\r\n<\/code><\/pre>\n<p>\u4f3c\u4e4e\u9700\u8981\u914d\u7f6e $HOME\/.config\/amtool\/config.yml \u6216 \/etc\/amtool\/config.yml \u624d\u80fd\u6210\u529f\u3002<\/p>\n<pre class=\"post-pre\"><code>mkdir -p $HOME\/.config\/amtool\/\r\necho 'alertmanager.url: \"http:\/\/localhost:9093\"' &gt;&gt; $HOME\/.config\/amtool\/config.yml\r\n\r\n# View all currently firing alerts\r\n .\/amtool alert\r\nAlertname       Starts At                Summary  State\r\nDeadMansSwitch  2022-02-11 22:29:38 UTC  \u30c6\u30b9\u30c8\u30a2\u30e9\u30fc\u30c8  active\r\n<\/code><\/pre>\n<p>\u6210\u529f\u3002<br \/>\n\u6c89\u9ed8\u4e5f\u5f97\u5230\u786e\u8ba4\u3002<\/p>\n<pre class=\"post-pre\"><code># View silences\r\n.\/amtool silence query\r\nID  Matchers  Ends At  Created By  Comment\r\n\r\n# Silence an alert\r\n.\/amtool silence add alertname=DeadMansSwitch\r\n\r\n# \u30b3\u30e1\u30f3\u30c8\u304c\u306a\u3044\u306e\u3067\u30a8\u30e9\u30fc\r\n .\/amtool silence add alertname=DeadMansSwitch\r\namtool: error: comment required by config\r\n\r\n # help \u3092\u30c1\u30a7\u30c3\u30af\r\n .\/amtool silence add --help\r\n\r\n# Silence\r\n .\/amtool silence add alertname=DeadMansSwitch -c fromCLI\r\n49965d0a-1b10-4110-b23f-f0df0dc0078e\r\n\r\n# OK\r\n.\/amtool silence query\r\nID                                    Matchers                    Ends At                  Created By  Comment\r\n49965d0a-1b10-4110-b23f-f0df0dc0078e  alertname=\"DeadMansSwitch\"  2022-02-14 22:05:27 UTC  toshihirock     fromCLI\r\n\r\n# \u30c7\u30d5\u30a9\u30eb\u30c8\u30671\u6642\u9593\u5f8c\u306b expire \u306b\u306a\u308b\u6a21\u69d8\r\ndate -u\r\n2022\u5e74 2\u670814\u65e5 \u6708\u66dc\u65e5 21\u664207\u520633\u79d2 UTC\r\n<\/code><\/pre>\n<p>\u8fc7\u671f<\/p>\n<pre class=\"post-pre\"><code># Expire\r\n.\/amtool silence expire 49965d0a-1b10-4110-b23f-f0df0dc0078e\r\n\r\n# Expire \u3057\u305f\u306e\u3067\u8868\u793a\u3055\u308c\u306a\u3044\r\n .\/amtool silence query\r\nID  Matchers  Ends At  Created By  Comment\r\n\r\n# Alert \u306b\u8868\u793a\u3055\u308c\u308b\r\n.\/amtool alert\r\nAlertname       Starts At                Summary  State\r\nDeadMansSwitch  2022-02-11 22:29:38 UTC  \u30c6\u30b9\u30c8\u30a2\u30e9\u30fc\u30c8  active\r\n<\/code><\/pre>\n<p>\u597d<\/p>\n<h1>\u8bb0\u4e8b<\/h1>\n<p>\u867d\u7136\u6709\u5e0c\u671b\u901a\u8fc7\u4ee3\u7406\u4f7f\u7528amtool\uff0c\u4f46\u4ece\u4e0b\u9762\u7684\u60c5\u51b5\u770b\uff0c\u5b83\u4f3c\u4e4e\u5df2\u7ecf\u4e0e\u4e3b\u5206\u652f\u5408\u5e76\uff0c\u4f46\u5c1a\u672a\u53d1\u5e03\u3002<\/p>\n<p>amtool \u652f\u6301\u4f7f\u7528 http_config \u8bbf\u95ee alertmanager<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u4e00\u4efd\u4f5c\u4e1a\u5907\u5fd8\u5f55\u3002 \u4ee5\u4e0b\u662f\u5173\u4e8e\u6211\u5728\u6211\u7684 Mac \u4e0a\u6784\u5efa\u7684 Prometheus \u548c Alertmanager [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-43421","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u662f\u4e00\u4efd\u4f5c\u4e1a\u5907\u5fd8\u5f55\u3002 \u4ee5\u4e0b\u662f\u5173\u4e8e\u6211\u5728\u6211\u7684 Mac \u4e0a\u6784\u5efa\u7684 Prometheus \u548c Alertmanager [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-27T04:08:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T02:25:13+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u626c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u626c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/\",\"name\":\"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-08-27T04:08:48+00:00\",\"dateModified\":\"2024-04-30T02:25:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\",\"name\":\"\u6e05, \u626c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u626c\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8","og_description":"\u8fd9\u662f\u4e00\u4efd\u4f5c\u4e1a\u5907\u5fd8\u5f55\u3002 \u4ee5\u4e0b\u662f\u5173\u4e8e\u6211\u5728\u6211\u7684 Mac \u4e0a\u6784\u5efa\u7684 Prometheus \u548c Alertmanager [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-08-27T04:08:48+00:00","article_modified_time":"2024-04-30T02:25:13+00:00","author":"\u6e05, \u626c","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u626c","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/","name":"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-08-27T04:08:48+00:00","dateModified":"2024-04-30T02:25:13+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528promtool\u548camtool\u65f6\u7684\u5907\u6ce8"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461","name":"\u6e05, \u626c","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","caption":"\u6e05, \u626c"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8promtool%e5%92%8camtool%e6%97%b6%e7%9a%84%e5%a4%87%e6%b3%a8%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=43421"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43421\/revisions"}],"predecessor-version":[{"id":91345,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/43421\/revisions\/91345"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=43421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=43421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=43421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}