{"id":269204,"date":"2015-11-27T20:34:02","date_gmt":"2015-11-27T17:34:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269204"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269204","title":{"rendered":"Zabbix \u043d\u0430 OpenShift \u0447\u0430\u0441\u0442\u044c 2 \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430"},"content":{"rendered":"<p>       \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e Zabbix-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 Openshift. <br \/>  \u041e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/266327\/\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Zabbix 2.4 \u043d\u0430 RedHat Openshift<\/a>.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 zabbix-agent \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0441 zabbix-server \u0447\u0435\u0440\u0435\u0437 ssh-\u0442\u0443\u043d\u043d\u0435\u043b\u044c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/63f\/9f2\/3d3\/63f9f23d34a84ca8a90d53a7855b4013.PNG\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 (\u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438) \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 OpenShift.<br \/>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c,   <\/p>\n<pre><code class=\"bash\">% ssh 55e9bc400c1e66a589000029@zabbix-chinacoolhacker.rhcloud.com [zabbix-chinacoolhacker.rhcloud.com 55e9bc400c1e66a589000029]\\&gt; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ip \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f OpenShift.   <\/p>\n<pre><code class=\"bash\">[zabbix-chinacoolhacker.rhcloud.com 55e9bc400c1e66a589000029]\\&gt; export  | grep OPENSHIFT_PHP_IP declare -x OPENSHIFT_PHP_IP=&quot;127.13.151.129&quot; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0445\u043e\u0441\u0442\u0435 ssh-\u0442\u0443\u043d\u043d\u0435\u043b\u044c:  <\/p>\n<pre><code class=\"bash\">#!\/bin\/sh SSH_DAEMON=&quot;\/usr\/bin\/ssh&quot; SSH_DAEMON_OPTS=&quot;-2 -N -f -L&quot; LOCAL_PREF=&quot;10051:&lt;YOUR_LOCAL_OPENSHIFT_IP&gt;:30051&quot; REMOTE_PREF=&quot;&lt;USER&gt;@&lt;YOUR_SERVER&gt;.rhcloud.com&quot; CONNECT=&quot; $SSH_DAEMON $SSH_DAEMON_OPTS $LOCAL_PREF $REMOTE_PREF&quot; # STAT=$(ps auxww | grep &quot;$CONNECT&quot; | grep -v grep | wc -l) if [ $STAT == 0 ]; then    $CONNECT    exit 0; else   exit 0; fi <\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u043a\u0440\u043e\u043d\u0442\u0430\u0431 \u043d\u0435\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, zabbix) \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443.<br \/>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:   <\/p>\n<pre><code class=\"bash\">user@localhost:~ % telnet localhost 10051 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. ^] telnet&gt; quit <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430 localhost \u0430\u0433\u0435\u043d\u0442\u0430, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 zabbix_agentd.conf:  <\/p>\n<pre><code class=\"bash\">LogFile=\/tmp\/zabbix_agentd.log LogFileSize=1 Server=127.0.0.1 StartAgents=0 ServerActive=127.0.0.1 Hostname=localhost RefreshActiveChecks=120 Timeout=10 User=zabbix <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c localhost \u043a\u0430\u043a \u043d\u043e\u0434\u0443 \u0432 zabbix <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/938\/0fe\/10a\/9380fe10afb84659a3f7822687873383.PNG\"\/><br \/>  \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443 \u0447\u0442\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a \u0442\u0430\u043a \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0430\u0433\u0435\u043d\u0442\u0430 \u0432 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f.<br \/>  \u0411\u0435\u0440\u0451\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0412\u0430\u043c \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Template OS Linux), \u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 Items \u043c\u0435\u043d\u044f\u0435\u043c(\u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 mass update) \u0442\u0438\u043f \u043d\u0430 zabbix-agent(active). <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a8a\/63f\/1d1\/a8a63f1d19e24a2ba8d25343a805e8b7.PNG\"\/><br \/>  \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0434\u0438\u0441\u043a\u0430\u0432\u0435\u0440\u0438\u043d\u0433\u0430 \u2014 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0438 \u0442\u0430\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c zabbix-agent(active) \u0442\u043e\u0436\u0435.<br \/>  \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0447\u043d\u0443\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/088\/034\/bcd\/088034bcdbd14378986b356fb3d92610.PNG\"\/><br \/>  \u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u2014 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u043b\u043e\u0433 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<br \/>  \u0411\u0443\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443.               <\/p>\n<div class=\"clear\"><\/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\/271843\/\"> http:\/\/habrahabr.ru\/post\/271843\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e Zabbix-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 Openshift. <br \/>  \u041e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/266327\/\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Zabbix 2.4 \u043d\u0430 RedHat Openshift<\/a>.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 zabbix-agent \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0441 zabbix-server \u0447\u0435\u0440\u0435\u0437 ssh-\u0442\u0443\u043d\u043d\u0435\u043b\u044c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/63f\/9f2\/3d3\/63f9f23d34a84ca8a90d53a7855b4013.PNG\"\/><\/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-269204","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269204","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=269204"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269204\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}