{"id":211384,"date":"2014-02-04T16:45:02","date_gmt":"2014-02-04T12:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=211384"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=211384","title":{"rendered":"<span class=\"post_title\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 Zabbix \u0441 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 Zabbix \u2014 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0417\u0430\u0441\u0435\u0442\u0430\u043f\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0448\u043b\u0438 \u0432 web-\u043c\u043e\u0440\u0434\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043a\u0443. \u041d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0440\u0443\u043a\u0430\u043c\u0438, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0432\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 \u0441\u0442\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0430\u0441\u0442\u043e. <br \/>  \u041f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f: \u0447\u0442\u043e-\u0442\u043e \u0433\u0440\u043e\u0445\u043d\u0443\u043b\u043e\u0441\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u043e \u0438 \u043d\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u043d\u0438\u043a\u043e\u0433\u0434\u0430, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: <\/h5>\n<p>  <\/p>\n<ol>\n<li>\u0427\u0435\u0440\u0435\u0437 <a href=\"https:\/\/www.zabbix.com\/documentation\/ru\/2.0\/manual\/discovery\/network_discovery\/rule\">network discovery<\/a> \u2014 \u0437\u0430\u0434\u0430\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043a\u0430\u043d \u043f\u043e\u0440\u0442\u043e\u0432 \u0438, \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0437\u0435\u043b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. <br \/>  \u042d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435\u043f\u043b\u043e\u0445, \u043d\u043e, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u043e\u0434\u0441\u0435\u0442\u0435\u0439 \u043c\u043d\u043e\u0433\u043e, \u043e\u043d\u0438 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0438 \u0432 \u0437\u0430\u0431\u0431\u0438\u043a\u0441 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043d\u0435 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044f \u043f\u043e\u0440\u0442\u044b. <\/li>\n<li><a href=\"https:\/\/www.zabbix.com\/documentation\/ru\/2.0\/manual\/discovery\/auto_registration\">\u0410\u0432\u0442\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/a>. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c zabbix \u0441\u0435\u0440\u0432\u0435\u0440 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 (\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430) \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 \u0441\u0435\u0442\u0438 \u0432 \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443. \u0422\u0430\u043a\u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043c\u044b \u0443\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432  <\/li>\n<li>\u0415\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u2014 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043d\u0430 \u043b\u0435\u0442\u0443, \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u044f\u043c\u043e \u0432 \u0431\u0430\u0437\u0443 \u0438 \u0442.\u043f \u2014 \u0432\u0441\u0435 \u043a\u0430\u043a-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e.<\/li>\n<\/ol>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a, \u043f\u0440\u0438 \u0441\u0435\u0442\u0430\u043f\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u043e\u043d\u0444\u0438\u0433 \u0430\u0433\u0435\u043d\u0442\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 puppet, \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0430\u0432\u0442\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u0430 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0447\u0435\u0440\u0435\u0437 API \u0437\u0430\u0431\u0431\u0438\u043a\u0441\u0430. <br \/>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0430\u043f\u043f\u0435\u0442\u0430 \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0445\u043e\u0441\u0442 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u043e\u0435 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0445\u043e\u0441\u0442\u0430. \u042f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u043e \u0434\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430.<\/p>\n<h5>\u0418\u0442\u0430\u043a, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0430\u043a\u043e\u0439: <\/h5>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0440\u0438 \u0441\u0435\u0442\u0430\u043f\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u0430 \u043d\u0435\u0433\u043e \u043f\u0440\u0438\u0435\u0437\u0436\u0430\u0435\u0442 zabbix \u0430\u0433\u0435\u043d\u0442, \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043e FQDN \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430. \u0422\u0430\u043a\u0436\u0435, \u043f\u0440\u0438\u0435\u0437\u0436\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 zabbixapi.py, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 zabbix API. <\/li>\n<li>\u0410\u0433\u0435\u043d\u0442 \u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f, \u0445\u043e\u0441\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 AutoRegistered, \u043a \u043d\u0435\u043c\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d \u00abNew Server\u00bb, \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 <b>host.relocate<\/b><\/li>\n<li>Zabbix \u0441\u0435\u0440\u0432\u0435\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u043f\u0440\u043e\u0441 \u043a\u043b\u044e\u0447\u0430 <b>host.relocate<\/b>, \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 zabbixapi.py.<\/li>\n<li>\u0421\u043a\u0440\u0438\u043f\u0442, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0445\u043e\u0441\u0442\u0430, \u043b\u0435\u0437\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 API \u043d\u0430 Zabbix \u0441\u0435\u0440\u0432\u0435\u0440, \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u0430\u043c \u0445\u043e\u0441\u0442 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b AutoRegistered, \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0448\u0430\u0431\u043b\u043e\u043d New Server, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b.<\/li>\n<\/ol>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u0443\u0439\u0442\u0438 \u043e\u0442 \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 zabbixapi.py. \u041f\u043e \u0441\u0443\u0442\u0438, \u0441\u0430\u043c zabbix \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0441\u0442 \u0443\u0435\u0437\u0436\u0430\u0435\u0442 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b AutoRegistered. \u0412 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043d\u0435 \u0438\u043c\u0435\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<h5>\u0427\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u0447\u0442\u043e\u0431 \u0432\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430? <\/h5>\n<p>  <\/p>\n<ol>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0443\u0437\u043b\u043e\u0432 AutoRegister \u0441\u0435\u0442\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Zabbix<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d Autoregister \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445\n<div class=\"spoiler\"><b class=\"spoiler_title\">host.relocate<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c3a\/1c6\/95f\/c3a1c695f60e9a92d400866b4970c33d.png\" alt=\"image\"\/><\/div>\n<\/div>\n<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0449\u0435\u0435 \u043d\u043e\u0432\u043e\u043c\u0443 \u0445\u043e\u0441\u0442\u0443 \u0448\u0430\u0431\u043b\u043e\u043d \u0438 \u0434\u043e\u0431\u0430\u043b\u044f\u044e\u0449\u0435\u0435 \u0435\u0433\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 AutoRegistered. \u0412 Web \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u2014 \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 -&gt; \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u043f\u0440\u0430\u0432\u0430 \u0432\u0432\u0435\u0440\u0445\u0443 \u2014 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f: \u0410\u0432\u0442\u043e\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f -&gt; \u041d\u043e\u0432\u043e\u0435 \u0434\u0435\u0441\u0442\u0432\u0438\u0435<br \/> \n<div class=\"spoiler\"><b class=\"spoiler_title\">Host autoregistration<\/b><\/p>\n<div class=\"spoiler_text\"> <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/251\/8d0\/91e\/2518d091e8750cb9ae67a9ba8b2b95da.png\" alt=\"image\"\/><\/div>\n<\/div>\n<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433 \u0437\u0430\u0431\u0431\u0438\u043a\u0441 \u0430\u0433\u0435\u043d\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 UserParameter:<br \/>  <code>UserParameter=host.relocate,\/etc\/zabbix\/bin\/zabbixapi.py &gt; \/dev\/null 2&gt;&1 ;echo $?<\/code>  <\/li>\n<li>\u041a\u043b\u0430\u0434\u0435\u043c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442: <br \/> \n<div class=\"spoiler\"><b class=\"spoiler_title\">\/etc\/zabbix\/bin\/zabbixapi.py<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python  import urllib, json, httplib, socket, sys, os  def httpRequest(request):     body = json.dumps(request)     headers = {&quot;Content-type&quot;: &quot;application\/json&quot;}     conn = httplib.HTTPConnection(&quot;zabbix.example.com&quot;, 80)     conn.request(&quot;POST&quot;, &quot;\/api_jsonrpc.php&quot;, body, headers)     response = conn.getresponse()     data = response.read()     conn.close()     return data   me = os.popen('facter --puppet fqdn').read().strip('\\n')  # \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435  authToken = httpRequest({&quot;jsonrpc&quot;: &quot;2.0&quot;,&quot;method&quot;:&quot;user.authenticate&quot;,&quot;params&quot;:{&quot;user&quot;:&quot;API_USER&quot;,&quot;password&quot;:&quot;API_PASSWORD&quot;},&quot;auth&quot;: None,&quot;id&quot;:0}) authToken = json.loads(authToken).get('result', None)  # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 Autoregistered  hostInGroup = httpRequest({&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;host.get&quot;,&quot;params&quot;:{&quot;output&quot;:&quot;extend&quot;,&quot;filter&quot;:{&quot;host&quot;:me}, &quot;groupids&quot;:&quot;21&quot;},&quot;auth&quot;:authToken,&quot;id&quot;:1}) hostInGroup = json.loads(hostInGroup).get('result', None) if hostInGroup:     hostID = httpRequest({&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;host.get&quot;,&quot;params&quot;:{&quot;output&quot;:&quot;extend&quot;,&quot;filter&quot;:{&quot;host&quot;:me}, &quot;groupids&quot;:&quot;21&quot;},&quot;auth&quot;:authToken,&quot;id&quot;:2})     hostID = json.loads(hostID)     hostID = hostID['result'][0]['hostid']     print &quot;Host is in AutoRegistered Group&quot;     print &quot;HostID is&quot;,hostID     print &quot;We need to update host info, link templates and move host to proper group&quot; # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c facter \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435     print &quot;Collecitng host info...&quot;     osFamily = os.popen('facter --puppet kernel').read().strip('\\n')     virtualEnv = os.popen('facter --puppet virtual').read().strip('\\n')     print &quot;Base OS is&quot;,osFamily     if osFamily == &quot;FreeBSD&quot;: \thostGroups = [{&quot;groupid&quot;:&quot;11&quot;}, {&quot;groupid&quot;:&quot;6&quot;}] \thostTemplates = [{&quot;templateid&quot;:&quot;10077&quot;}, {&quot;templateid&quot;:&quot;10090&quot;}]     if osFamily == &quot;Linux&quot;: \tprint &quot;Checking virtualization...&quot; \tif virtualEnv == &quot;physical&quot;: \t    print &quot;Physical host detected, no virtualization&quot; \t    hostGroups = [{&quot;groupid&quot;:&quot;11&quot;}, {&quot;groupid&quot;:&quot;2&quot;}] \t    hostTemplates = [{&quot;templateid&quot;:&quot;10076&quot;}, {&quot;templateid&quot;:&quot;10090&quot;}, {&quot;templateid&quot;:&quot;10127&quot;}] \tif virtualEnv == &quot;openvzve&quot; or virtualEnv == &quot;openvz&quot;: \t    print &quot;OpenVZ virtualization detected&quot; \t    hostGroups = [{&quot;groupid&quot;:&quot;11&quot;}, {&quot;groupid&quot;:&quot;14&quot;}] \t    hostTemplates = [{&quot;templateid&quot;:&quot;10117&quot;}, {&quot;templateid&quot;:&quot;10090&quot;}]     print &quot;Detected groups are&quot;, hostGroups     print &quot;Detected templates are&quot;, hostTemplates      updateHost = { \t&quot;jsonrpc&quot;:&quot;2.0&quot;, \t&quot;method&quot;:&quot;host.update&quot;,         &quot;params&quot;:{ \t    &quot;hostid&quot;:hostID, \t    &quot;ip&quot;:&quot;127.0.0.1&quot;, \t    &quot;groups&quot;:hostGroups, \t    &quot;templates&quot;:hostTemplates, \t    &quot;templates_clear&quot;:&quot;10263&quot;         },         &quot;auth&quot;:authToken,         &quot;id&quot;:3     }     print &quot;Trying to update host...&quot;     httpRequest(updateHost)      hostInterfaceID = httpRequest({&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;hostinterface.get&quot;,&quot;params&quot;:{&quot;output&quot;:&quot;extend&quot;, &quot;hostids&quot;:hostID},&quot;auth&quot;:authToken,&quot;id&quot;:4})     hostInterfaceID = json.loads(hostInterfaceID)     hostInterfaceID = hostInterfaceID['result'][0]['interfaceid']     print &quot;Host Interface ID detected as&quot;, hostInterfaceID     updateHostInterface = { \t&quot;jsonrpc&quot;:&quot;2.0&quot;, \t&quot;method&quot;:&quot;hostinterface.update&quot;,         &quot;params&quot;:{ \t    &quot;interfaceid&quot;:hostInterfaceID, \t    &quot;dns&quot;: me,             &quot;useip&quot;: 0         },         &quot;auth&quot;:authToken,         &quot;id&quot;:4     }     print &quot;Trying to update host interface to DNS based...&quot;     httpRequest(updateHostInterface)     sys.exit(0)   else:     print &quot;Host is absent in AutoRegistered Group&quot;     print &quot;Nothing to do...&quot;     sys.exit(0) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443: Linux \u0438\u043b\u0438 FreeBSD, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OpenVZ \u2014 \u044d\u0442\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c, \u043c\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u044b.<br \/>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u0433\u0440\u0443\u043f\u043f \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u0432 \u0432\u0430\u0448\u0435\u0439 \u0438\u043d\u0441\u0442\u0430\u043b\u044f\u0446\u0438\u0438 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c!  <\/li>\n<\/ol>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/211384\/\"> http:\/\/habrahabr.ru\/post\/211384\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 Zabbix \u2014 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0417\u0430\u0441\u0435\u0442\u0430\u043f\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0448\u043b\u0438 \u0432 web-\u043c\u043e\u0440\u0434\u0443, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043c\u0430\u0448\u0438\u043d\u043a\u0443. \u041d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0440\u0443\u043a\u0430\u043c\u0438, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0432\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 \u0441\u0442\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0430\u0441\u0442\u043e. <br \/>  \u041f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f: \u0447\u0442\u043e-\u0442\u043e \u0433\u0440\u043e\u0445\u043d\u0443\u043b\u043e\u0441\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u043e \u0438 \u043d\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u043d\u0438\u043a\u043e\u0433\u0434\u0430, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-211384","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211384"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211384\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}