{"id":657,"date":"2020-03-17T10:11:27","date_gmt":"2020-03-17T02:11:27","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=657"},"modified":"2020-03-17T10:11:28","modified_gmt":"2020-03-17T02:11:28","slug":"zabbix-monitors-alicloud-rds-mysql-database","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/","title":{"rendered":"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93"},"content":{"rendered":"\n

zabbix\u901a\u8fc7\u963f\u91cc\u4e91api \u81ea\u52a8\u53d1\u73b0\u3001\u76d1\u63a7\u963f\u91cc\u4e91RDS-Mysql\u6570\u636e\u5e93  
\u672c\u7248\u672c\u6570\u636e\u7684\u56fe\u8868\u5c55\u793a\uff0c\u662f\u4ee5\u76d1\u63a7\u9879\u8fdb\u884c\u5206\u7ec4<\/strong>\uff0c\u540e\u671f\u4f1a\u518d\u53d1\u5e03\u4ee5rds\u5b9e\u4f8b\u5206\u7ec4<\/strong>\u7684\u7248\u672c\u3002<\/p>\n\n\n\n

<\/a>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n\n\n\n

<\/a>\u6ce8\u610f\u4e8b\u9879<\/h3>\n\n\n\n
  1. \u811a\u672c\u4f1a\u6536\u96c6RDS\u522b\u540d\uff0c<\/li>
  2. \u4e0d\u8981\u9ed8\u8ba4\u522b\u540d<\/li>
  3. \u4e0d\u8981\u4f7f\u7528\u4e2d\u6587\u522b\u540d\uff08zabbix\u4e0d\u8bc6\u522b\uff09<\/li>
  4. \u5207\u8bb0aliyun-python-sdk-core==2.3.5\uff0c\u65b0\u7248\u672c\u7684sdk\u6709bug<\/li><\/ol>\n\n\n\n

    <\/a>\u73af\u5883\u8981\u6c42<\/h3>\n\n\n\n

    python = 2.7<\/p>\n\n\n\n

    <\/a>\u6a21\u5757\u5b89\u88c5<\/h3>\n\n\n\n
    \/usr\/bin\/env pip2.7 install aliyun-python-sdk-core==2.3.5 aliyun-python-sdk-rds==2.1.4 datetime<\/pre>\n\n\n\n

    <\/a>\u4f7f\u7528\u65b9\u6cd5<\/h3>\n\n\n\n
    1. \u4ece\u963f\u91cc\u4e91\u63a7\u5236\u53f0\u83b7\u53d6\u00a0AccessKey<\/strong>\u00a0,\u5e76\u4fee\u6539\u811a\u672c\u4e2d\u7684\u00a0ID<\/strong>\u00a0\u4e0e\u00a0Secret<\/strong><\/li>
    2. \u4fee\u6539\u533a\u57df\u00a0RegionId<\/strong><\/li>
    3. \u5c06\u4e24\u4e2a\u811a\u672c\u653e\u7f6e\u4e8e\u4ee5\u4e0b\u76ee\u5f55\uff08\u76ee\u5f55\u968f\u610f\u53ea\u8981\u6709\u6743\u9650\u6267\u884c\u5373\u53ef\uff09<\/li><\/ol>\n\n\n\n
      \/etc\/zabbix\/script\nchmod +x \/etc\/zabbix\/script\/*<\/code><\/pre>\n\n\n\n

      4. \u4fee\u6539zabbix-agentd.conf\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9<\/p>\n\n\n\n

      #rds\nUserParameter=rds.discovery,\/usr\/bin\/env python2.7 \/etc\/zabbix\/script\/discovery_rds.py\nUserParameter=check.rds[*],\/usr\/bin\/env python2.7 \/etc\/zabbix\/script\/check_rds.py $1 $2 $3\n<\/code><\/pre>\n\n\n\n

      5. \u91cd\u542fzabbix-agent<\/p>\n\n\n\n

      6. zabbix\u63a7\u5236\u53f0\u5bfc\u5165\u6a21\u677f\uff0c\u5e76\u5173\u8054\u4e3b\u673a<\/p>\n\n\n\n

      \u539f\u6587\uff1a https:\/\/github.com\/XWJR-Ops\/zabbix-RDS-monitor<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"

      zabbix\u901a\u8fc7\u963f\u91cc\u4e91api \u81ea\u52a8\u53d1\u73b0\u3001\u76d1\u63a7\u963f\u91cc\u4e91RDS-Mysql\u6570\u636e\u5e93  \u672c\u7248\u672c\u6570\u636e\u7684\u56fe\u8868\u5c55\u793a\uff0c<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18,33],"tags":[],"yoast_head":"\nZabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93 - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4<\/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.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93 - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"og:description\" content=\"zabbix\u901a\u8fc7\u963f\u91cc\u4e91api \u81ea\u52a8\u53d1\u73b0\u3001\u76d1\u63a7\u963f\u91cc\u4e91RDS-Mysql\u6570\u636e\u5e93  \u672c\u7248\u672c\u6570\u636e\u7684\u56fe\u8868\u5c55\u793a\uff0c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-17T02:11:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-17T02:11:28+00:00\" \/>\n<meta name=\"author\" content=\"\u7ba1\u7406\u5458\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\"},\"author\":{\"name\":\"\u7ba1\u7406\u5458\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"headline\":\"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93\",\"datePublished\":\"2020-03-17T02:11:27+00:00\",\"dateModified\":\"2020-03-17T02:11:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\"},\"wordCount\":27,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"articleSection\":[\"Linux\",\"Linux\u670d\u52a1\",\"zabbix\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\",\"name\":\"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93 - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\"},\"datePublished\":\"2020-03-17T02:11:27+00:00\",\"dateModified\":\"2020-03-17T02:11:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.linuxdevops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\/\/www.linuxdevops.cn\/linux\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\",\"url\":\"https:\/\/www.linuxdevops.cn\/\",\"name\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"description\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0\",\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"alternateName\":\"linuxdevops\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.linuxdevops.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\",\"name\":\"\u7ba1\u7406\u5458\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"contentUrl\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u7ba1\u7406\u5458\"},\"logo\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\"},\"description\":\"\u7ba1\u7406\u5458\",\"url\":\"https:\/\/www.linuxdevops.cn\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93 - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","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.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/","og_locale":"zh_CN","og_type":"article","og_title":"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93 - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","og_description":"zabbix\u901a\u8fc7\u963f\u91cc\u4e91api \u81ea\u52a8\u53d1\u73b0\u3001\u76d1\u63a7\u963f\u91cc\u4e91RDS-Mysql\u6570\u636e\u5e93  \u672c\u7248\u672c\u6570\u636e\u7684\u56fe\u8868\u5c55\u793a\uff0c","og_url":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/","og_site_name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","article_published_time":"2020-03-17T02:11:27+00:00","article_modified_time":"2020-03-17T02:11:28+00:00","author":"\u7ba1\u7406\u5458","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#article","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/"},"author":{"name":"\u7ba1\u7406\u5458","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"headline":"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93","datePublished":"2020-03-17T02:11:27+00:00","dateModified":"2020-03-17T02:11:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/"},"wordCount":27,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"articleSection":["Linux","Linux\u670d\u52a1","zabbix"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/","url":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/","name":"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93 - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/#website"},"datePublished":"2020-03-17T02:11:27+00:00","dateModified":"2020-03-17T02:11:28+00:00","breadcrumb":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/zabbix-monitors-alicloud-rds-mysql-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.linuxdevops.cn\/"},{"@type":"ListItem","position":2,"name":"Linux","item":"https:\/\/www.linuxdevops.cn\/linux\/"},{"@type":"ListItem","position":3,"name":"Zabbix\u76d1\u63a7\u963f\u91cc\u4e91RDS MySQL\u6570\u636e\u5e93"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxdevops.cn\/#website","url":"https:\/\/www.linuxdevops.cn\/","name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","description":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0","publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"alternateName":"linuxdevops","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxdevops.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":["Person","Organization"],"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1","name":"\u7ba1\u7406\u5458","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","contentUrl":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","width":512,"height":512,"caption":"\u7ba1\u7406\u5458"},"logo":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/"},"description":"\u7ba1\u7406\u5458","url":"https:\/\/www.linuxdevops.cn\/author\/root\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/657"}],"collection":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/comments?post=657"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/657\/revisions"}],"predecessor-version":[{"id":658,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/657\/revisions\/658"}],"wp:attachment":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media?parent=657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/categories?post=657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/tags?post=657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}