{"id":507,"date":"2017-12-05T18:53:35","date_gmt":"2017-12-05T10:53:35","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=507"},"modified":"2017-12-05T18:53:35","modified_gmt":"2017-12-05T10:53:35","slug":"zabbix%e7%b3%bb%e5%88%97%e4%ba%94zabbix3-0-4-%e6%8e%a2%e7%b4%a2%e4%b8%bb%e6%9c%badiscovery%e8%87%aa%e5%8a%a8%e5%8f%91%e7%8e%b0agent%e4%b8%bb%e6%9c%ba%e5%92%8czabbix-agent%e8%87%aa%e5%8a%a8%e6%b3%a8","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=507","title":{"rendered":"zabbix\u7cfb\u5217(\u4e94)zabbix3.0.4 \u63a2\u7d22\u4e3b\u673aDiscovery\u81ea\u52a8\u53d1\u73b0agent\u4e3b\u673a\u548czabbix-agent\u81ea\u52a8\u6ce8\u518c\u8be6\u7ec6\u56fe\u6587\u6559\u7a0b"},"content":{"rendered":"<p>Zabbix \u81ea\u52a8\u53d1\u73b0\uff08Discovery\uff09\u529f\u80fd\u4f7f\u7528<\/p>\n<p>\u968f\u7740\u76d1\u63a7\u4e3b\u673a\u4e0d\u65ad\u589e\u591a\uff0c\u6709\u7684\u65f6\u5019\u9700\u8981\u6dfb\u52a0\u4e00\u6279\u673a\u5668\uff0c\u7279\u522b\u662f\u521a\u7528zabbix\u7684\u8fd0\u7ef4\u4eba\u5458\u9700\u8981\u5c06\u516c\u53f8\u7684\u6240\u6709\u670d\u52a1\u5668\u6dfb\u52a0\u5230zabbix\uff0c\u5982\u679c\u4f7f\u7528\u4f20\u7edf\u529e\u6cd5\u53bb\u5355\u4e2a\u6dfb\u52a0\u8bbe\u5907\u3001\u5206\u7ec4\u3001\u9879\u76ee\u3001\u56fe\u50cf\u2026..\u7ed3\u679c\u5e94\u8be5\u662f\u8ba9\u4eba\u5410\u7684\u7ed3\u679c\u3002<br \/>\n\u9274\u4e8e\u8fd9\u4e2a\u95ee\u9898\u6211\u4eec\u53ef\u4ee5\u597d\u597d\u5229\u7528\u4e0bZabbix\u7684\u4e00\u4e2a\u53d1\u73b0(Discovery)\u6a21\u5757\uff0c\u8fdb\u800c\u6765\u5b9e\u73b0\u81ea\u52a8\u521a\u53d1\u73b0\u4e3b\u673a\u3001\u81ea\u52a8\u5c06\u4e3b\u673a\u6dfb\u52a0\u5230\u4e3b\u673a\u7ec4\u3001\u81ea\u52a8\u52a0\u8f7d\u6a21\u677f\u3001\u81ea\u52a8\u521b\u5efa\u9879\u76ee\uff08item\uff09\u3001\u81ea\u52a8\u521b\u5efa\u56fe\u50cf\uff0c\u4e0b\u9762\u6211\u4eec\u6765\u770b\u770b\u8fd9\u4e2a\u6a21\u5757\u5982\u4f55\u4f7f\u7528\u3002<\/p>\n<p>\u4e00\u3001Zabbix \u521b\u5efa\u53d1\u73b0\u89c4\u5219\u521b\u5efa\u53d1\u73b0\u89c4\u5219Configuration &#8212;- discovery &#8212;- Create discovery rule<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113707906\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113721915\" alt=\"\" \/><\/p>\n<p>\u914d\u7f6e\u57fa\u672c\u4fe1\u606f \u00a0\u914d\u7f6eChecks \u00a0\u6dfb\u52a0\u5b8cchecks\u4e4b\u540e \u70b9\u51fb\u6700\u4e0b\u9762\u7684add\u6dfb\u52a0\u4fdd\u5b58\u5373\u53ef<\/p>\n<p>OK \u89c4\u5219\u5df2\u7ecf\u521b\u5efa\u5b8c\u6bd5\u4e86<\/p>\n<p>\u4e0b\u9762\u5f00\u59cb\u8ba9\u4ed6\u81ea\u52a8\u52a0\u5165\u5230\u7ec4\u81ea\u52a8\u521b\u5efa\u56fe\u5f62\u5427<\/p>\n<p>\u4e8c\u3001\u4e3b\u673a\u81ea\u52a8\u52a0\u5165\u4e3b\u673a\u7ec4\u5e76\u5173\u8054\u6a21\u677f<br \/>\n\u4e0a\u9762\u6211\u4eec\u4e86\u89e3\u4e86\u5982\u4f55\u81ea\u52a8\u53d1\u73b0\u4e3b\u673a\uff0c\u90a3\u4e48\u53d1\u73b0\u4e3b\u673a\u4e4b\u540e\u6211\u4eec\u8981\u505a\u4ec0\u4e48\u5462\uff1f<br \/>\n\u5c06\u4e3b\u673a\u52a0\u5165\u4e3b\u673a\u7ec4\u3001\u5e76\u5173\u8054\u76f8\u5e94\u7684\u6a21\u677f\uff01\u8fd9\u6837\u4e00\u6574\u4e2a\u6d41\u7a0b\u5c31\u5b8c\u5584\u4e86\uff0c\u90a3\u4e48\u5982\u4f55\u505a\u5462\uff1f\u6211\u4eec\u4e0a\u9762\u5df2\u7ecf\u53d1\u73b0\u4e86\u4e3b\u673a \u63a5\u4e0b\u6765\u8981\u5bf9\u4e3b\u673a\u505a\u64cd\u4f5c<br \/>\n\u6240\u4ee5\u9700\u8981\u4e00\u4e2aaction \uff08\u52a8\u4f5c\uff09\u6765\u6267\u884c\u4e00\u4e9b\u5217\u7684\u64cd\u4f5c\uff0c\u4e0b\u9762\u6211\u4eec\u6765\u770b\u5177\u4f53\u64cd\u4f5c\u3002<\/p>\n<p>2.1\u3001\u4e3adiscovery\uff08\u53d1\u73b0\uff09\u521b\u5efaaction\uff08\u52a8\u4f5c\uff09Configuration &#8212;- Actions &#8212;- Event source(\u9009\u62e9Discovery) &#8212;- Create action<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113802244\" alt=\"\" \/><\/p>\n<p>2.1.1\u3001\u8f93\u5165 Action \u540d\u5b57<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113817307\" alt=\"\" \/><\/p>\n<p>2.1.2\u3001\u6dfb\u52a0\u89e6\u53d1Action\u7684\u6761\u4ef6 \u00a0\u8fd9\u91cc\u6dfb\u52a0\u4e86\u4e09\u4e2a\u6761\u4ef6 \u5206\u522b\u662f \u201cip\u5730\u5740\u8303\u56f4\u201d\u3001\u201c\u670d\u52a1\u7c7b\u578b\u201d \u548c \u201cDiscovery \u72b6\u6001\u201d<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113845526\" alt=\"\" \/><\/p>\n<p>2.2\u3001\u521b\u5efa\u64cd\u4f5c \u00a02.2.1\u3001\u201cAdd host \u201d\u6dfb\u52a0\u4e3b\u673a<br \/>\n\u201cAdd to host group\u201d \u5c06\u4e3b\u673a\u6dfb\u52a0\u5230\u4e3b\u673a\u7ec4\u3001\u9009\u62e9\u8981\u6dfb\u52a0\u5230\u7684\u4e3b\u673a\u7ec4<\/p>\n<p>\u201cLink to template\u201d \u94fe\u63a5\u5230\u6a21\u677f\u3001\u9009\u62e9\u76f8\u5e94\u7684\u6a21\u677f \u00a0\u8fd9\u91cc\u6211\u5b9a\u4e49\u4e86 \u53d1\u73b0\u4e3b\u673a\u5c31 \u201c\u6dfb\u52a0\u4e3b\u673a\uff08Add host\uff09\u201d\u5e76 \u201c\u6dfb\u52a0\u5230\u4e3b\u673a\u7ec4\uff08Add to host groups\uff09\u201d\u3001\u201c\u94fe\u63a5\u5230\u76f8\u5e94\u7684\u6a21\u677f\uff08Link to template\uff09\u201d<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113924844\" alt=\"\" \/><\/p>\n<p>\u70b9\u51fb\u201cAdd\u201d \u6dfb\u52a0 \u6dfb\u52a0\u5b8c\u6210\u4e4b\u540e\u6548\u679c\u5982\u4e0b \u00a0Ok \u81f3\u6b64\u53d1\u73b0\u4e3b\u673a\u3001\u6dfb\u52a0\u4e3b\u673a\u5e76\u5c06\u4e3b\u673a\u6dfb\u52a0\u5230\u4e3b\u673a\u7ec4 \u94fe\u63a5\u6a21\u677f \u5168\u90e8\u5b8c\u6bd5\u770b\u770b\u6548\u679c\u5427Monitoring &#8212;- Discovery &#8212;-\u9009\u62e9 \u81ea\u5b9a\u4e49\u7684\u53d1\u73b0\u89c4\u5219\u4e0b\u9762\u662f\u6211\u5b9a\u4e49\u7684\u4e00\u4e2a\u53d1\u73b0\u89c4\u5219\u7684\u6548\u679c \u5982\u56fe\u662f\u53d1\u73b0\u7684\u4e3b\u673a \u00a0\u67e5\u770b\u4e3b\u673a\u4ee5\u53ca\u4e3b\u673a\u76f8\u5173\u7684\u56fe\u50cf<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160815113938641\" alt=\"\" \/><\/p>\n<p>\u81ea\u52a8\u53d1\u73b0\u89c4\u5219\u8fd8\u53ef\u4ee5\u9488\u5bf9\u7f51\u6bb5\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160817192347667\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20160817192355495\" alt=\"\" \/><\/p>\n<h1>zabbix-agent\u4e3b\u52a8\u6ce8\u518c\u670d\u52a1\u7aef\u7684<\/h1>\n<p>\u7b80\u8ff0\uff1a<br \/>\n\u5f53\u4e3b\u673a\u5206\u5e03\u5728\u4e0d\u540c\u7684\u57ce\u5e02\uff0c\u6bd4\u5982\u4e0d\u540c\u7684\u4e91\u73af\u5883\u4e2d\u65f6\uff0c\u4f7f\u7528\u4e3b\u52a8\u53d1\u73b0\u5c31\u4e0d\u597d\u5904\u7406\u4e86\uff0c\u4f7f\u7528\u81ea\u52a8\u6ce8\u518c\u7684\u65b9\u5f0f\u975e\u5e38\u9002\u5408\u5728\u4e91\u73af\u5883\u4e2d\u7684\u90e8\u7f72\u3002<\/p>\n<p>1.\u914d\u7f6e\u5ba2\u6237\u7aef:<br \/>\nvim \/etc\/zabbix\/zabbix_agentd.conf<\/p>\n<p>\u914d\u7f6e\u4ee5\u4e0b\u4e09\u9879\uff1a<br \/>\n# \u4e3b\u52a8\u6a21\u5f0f\u4e0b\u7684zabbix\u670d\u52a1\u7aef<br \/>\nServerActive=zbx.chinasoft.com<br \/>\n# \u4e3b\u673a\u540d(\u8fd9\u4e2a\u4f1a\u81ea\u52a8\u52a0\u5165\u5230zabbix-server\u65ad\u7684\u4e3b\u673a\u663e\u793a\u4e2d)<br \/>\nHostname=auto_register_agent01<br \/>\n# \u4f5c\u4e3aserver\u7aef\u7684\u5224\u65ad\u6761\u4ef6\u5165\u53e3<br \/>\nHostMetadataItem=system.uname<br \/>\n<img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20170210143243326\" alt=\"\" \/><br \/>\n\u91cd\u542f\u751f\u6548<br \/>\nservice zabbix-agent restart<\/p>\n<p>2.\u914d\u7f6e\u670d\u52a1\u7aef<\/p>\n<p>Configuration &#8211;&gt; Action &#8211;&gt; Auto registion &#8211;&gt; Create action<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20170210143305452\" alt=\"\" width=\"800\" height=\"100\" \/><br \/>\nAction<\/p>\n<p>Name: action_for_auto_register<br \/>\nDefault subject: Auto registration: {HOST.HOST}<br \/>\nHost name: {HOST.HOST}<br \/>\nHost IP: {HOST.IP}<br \/>\nAgent port: {HOST.PORT}<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20170210143343108\" alt=\"\" width=\"800\" height=\"500\" \/><br \/>\nConditon:<br \/>\nHost metadata like Linux<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20170210143440703\" alt=\"\" width=\"800\" height=\"300\" \/><br \/>\nOpertions:<br \/>\nSend message to users: Admin (Zabbix Administrator) via weixin<br \/>\nAdd to host groups: Linux servers<br \/>\nLink to templates: Template OS Linux<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20170210143457297\" alt=\"\" width=\"800\" height=\"300\" \/><br \/>\n\u53ef\u4ee5\u901a\u8fc7\u5728\u670d\u52a1\u7aef\u5b9a\u4f4d\u65e5\u5fd7\u6392\u9519\uff1a<br \/>\ngrep auto_register_agent01 \/var\/log\/zabbix\/zabbix_server.log<\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u5fae\u4fe1\u6536\u5230\u6ce8\u518c\u6210\u529f\u7684\u901a\u77e5<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.blog.csdn.net\/20170210143511297\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix \u81ea\u52a8\u53d1\u73b0\uff08Discovery\uff09\u529f\u80fd\u4f7f\u7528 \u968f\u7740\u76d1\u63a7\u4e3b\u673a\u4e0d\u65ad\u589e\u591a\uff0c\u6709\u7684\u65f6\u5019\u9700\u8981\u6dfb\u52a0\u4e00\u6279\u673a\u5668\uff0c\u7279\u522b\u662f\u521a\u7528zabbix\u7684\u8fd0\u7ef4\u4eba\u5458\u9700\u8981\u5c06\u516c\u53f8\u7684\u6240\u6709\u670d\u52a1\u5668\u6dfb\u52a0\u5230zabbix\uff0c\u5982\u679c\u4f7f\u7528\u4f20\u7edf\u529e\u6cd5\u53bb\u5355\u4e2a\u6dfb\u52a0\u8bbe\u5907\u3001\u5206\u7ec4\u3001\u9879\u76ee\u3001\u56fe\u50cf\u2026..\u7ed3\u679c\u5e94\u8be5\u662f\u8ba9\u4eba\u5410\u7684\u7ed3\u679c\u3002 \u9274\u4e8e\u8fd9\u4e2a\u95ee\u9898\u6211\u4eec\u53ef\u4ee5\u597d\u597d\u5229\u7528\u4e0bZabbix\u7684\u4e00\u4e2a\u53d1\u73b0(Discovery)\u6a21\u5757\uff0c\u8fdb\u800c\u6765\u5b9e\u73b0\u81ea\u52a8\u521a\u53d1\u73b0\u4e3b\u673a\u3001\u81ea\u52a8\u5c06\u4e3b\u673a\u6dfb\u52a0\u5230\u4e3b\u673a\u7ec4\u3001\u81ea\u52a8\u52a0\u8f7d\u6a21\u677f\u3001\u81ea\u52a8\u521b\u5efa\u9879\u76ee\uff08item\uff09\u3001\u81ea\u52a8\u521b\u5efa\u56fe\u50cf\uff0c\u4e0b\u9762\u6211\u4eec\u6765\u770b\u770b\u8fd9\u4e2a\u6a21\u5757\u5982\u4f55\u4f7f\u7528\u3002 \u4e00\u3001Zabbix \u521b\u5efa\u53d1\u73b0\u89c4\u5219\u521b\u5efa\u53d1\u73b0\u89c4\u5219Configuration &#8212;- discovery &#8212;- Create discovery rule \u914d\u7f6e\u57fa\u672c\u4fe1\u606f \u00a0\u914d\u7f6eChecks \u00a0\u6dfb\u52a0\u5b8cchecks\u4e4b\u540e \u70b9\u51fb\u6700\u4e0b\u9762\u7684add\u6dfb\u52a0\u4fdd\u5b58\u5373\u53ef OK \u89c4\u5219\u5df2\u7ecf\u521b\u5efa\u5b8c\u6bd5\u4e86 \u4e0b\u9762\u5f00\u59cb\u8ba9\u4ed6\u81ea\u52a8\u52a0\u5165\u5230\u7ec4\u81ea\u52a8\u521b\u5efa\u56fe\u5f62\u5427 \u4e8c\u3001\u4e3b\u673a\u81ea\u52a8\u52a0\u5165\u4e3b\u673a\u7ec4\u5e76\u5173\u8054\u6a21\u677f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-507","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=507"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/507\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}