{"id":217161,"date":"2014-03-26T13:35:05","date_gmt":"2014-03-26T09:35:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=217161"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=217161","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u043f\u0443\u0441\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 ssh\/telnet\/vnc \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0438\u0437 \u043a\u0430\u0440\u0442\u044b Zabbix<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u0435\u043a, \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 kvm&#8217;\u0430\u043c\u0438.<br \/>  \u041d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0443\u043b\u0438\u0442\u044c \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0445\u043e\u0437\u0430\u0439\u0441\u0442\u0432\u043e\u043c, \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u0438 <br \/>  \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u041f\u0440\u044f\u043c\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u0440\u0430 \u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u044b\u0448\u044c\u044e \u0438 \u043e\u043f \u2014 \u043f\u0435\u0440\u0435\u0434 \u0442\u043e\u0431\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u043e\u043f\u0435\u0447\u043d\u044b\u0445 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Zabbix.<br \/>  \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0441\u0435\u0439 \u0434\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<br \/>  \u0412\u0435\u0434\u044c \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0442\u043a\u043d\u0443\u0442\u044c \u0432 \u043a\u0430\u0440\u0442\u0435 Zabbix \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0439\u043a\u0443, \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0435\u0451 \u043f\u043e\u0434\u043a\u0430\u0440\u0442\u0443 \u0438, \u0432\u044b\u0431\u0440\u0430\u0432 \u0436\u0435\u043b\u0435\u0437\u043a\u0443,<br \/>  \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ssh\/telnet\/vnc \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.<\/p>\n<p>  \u041e\u0437\u0430\u0434\u0430\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u0438\u0434\u0435\u0435\u0439, \u044f \u043d\u0430\u0447\u0430\u043b \u043c\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u0411\u044b\u043b \u043d\u0430\u0439\u0434\u0435\u043d <a href=\"https:\/\/www.zabbix.com\/forum\/showthread.php?t=12916\">\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u0434<\/a> \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 Zabbix, \u043d\u043e \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u043c\u043e\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432 \u043a\u0430\u0440\u0442\u0435. <br \/>  \u0415\u0449\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u043b\u0443\u0442\u0430\u0432 \u043f\u043e \u0437\u0430\u043a\u043e\u0443\u043b\u043a\u0430\u043c \u0432\u0441\u0435\u043c\u0438\u0440\u043d\u043e\u0439 \u043f\u0430\u0443\u0442\u0438\u043d\u044b \u0438 \u043f\u043e\u043c\u0443\u0447\u0430\u0432 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0433\u043b\u0443\u043f\u044b\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u044f \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b \u043e\u2026 Python.<br \/>  \u0414\u0430, Python, \u043d\u0435 \u0440\u0430\u0437 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0439 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0432 \u0442\u0440\u0443\u0434\u043d\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443.<br \/>  \u041f\u0438\u0442\u0430\u044e \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0436\u043d\u044b\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0430 \u043a \u044d\u0442\u043e\u043c\u0443 \u044f\u0437\u044b\u043a\u0443 \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0442\u0435\u043f\u043b\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441.<\/p>\n<p>  \u0418 \u0442\u0430\u043a, \u0432\u0435\u043a\u0442\u043e\u0440 \u0430\u0442\u0430\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0438 \u0437\u0430\u043c\u0435\u0440\u043b\u0438 \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u0431\u0440\u043e\u0441\u0430 \u043c\u044b\u0441\u043b\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u2026 <br \/>  \u0421\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0443\u0436\u0435 \u0447\u0435\u0442\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u043a\u0430\u043a \u0431\u0443\u0434\u0443 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u043d\u0430\u043f\u0438\u0448\u0443 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435!<br \/>  \u041d\u0430 \u043c\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0436\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0438\u0437\u044b\u0441\u043a\u0430\u043d\u0438\u0439 \u0441\u0442\u0430\u043b\u043e \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430 Linux, \u0442\u0430\u043a \u0438 \u043d\u0430 Windows.<br \/>  \u042d\u043f\u043e\u043f\u0435\u044f \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043f\u0443\u0442\u0438 \u043a \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u0439 \u0446\u0435\u043b\u0438 \u0436\u0434\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u0434 \u0445\u0430\u0431\u0440\u0430\u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041f\u0440\u043e\u043b\u043e\u0433<\/h4>\n<p>  \u041d\u0430\u0447\u0430\u043b\u043e \u043f\u0443\u0442\u0438.<\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432 \u0434\u043b\u044f Python \u0432\u0435\u0440\u0441\u0438\u0438 2.7.<br \/>  \u0410 \u0432\u0435\u0440\u0441\u0438\u044f Zabbix \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043b\u0430 \u0442\u0440\u0438 \u0434\u0432\u043e\u0439\u043a\u0438 \u2014 <code>Zabbix 2.2.2<\/code><br \/>  \u041e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0440\u0443\u0447\u0435\u043d\u043e <a href=\"http:\/\/docs.python.org\/2.7\/library\/socket.html\">Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 socket<\/a>.<br \/>  \u041f\u043e\u043c\u0438\u043c\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u043d\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<br \/>  1. <a href=\"http:\/\/www.binarytides.com\/python-socket-programming-tutorial\/\">www.binarytides.com\/python-socket-programming-tutorial\/<\/a><br \/>  2. <a href=\"http:\/\/www.binarytides.com\/code-chat-application-server-client-sockets-python\/\">www.binarytides.com\/code-chat-application-server-client-sockets-python\/<\/a><br \/>  3. <a href=\"http:\/\/java-developer.livejournal.com\/6920.html\">java-developer.livejournal.com\/6920.html<\/a><\/p>\n<p>  \u041d\u0430\u0438\u0433\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u041a\u043b\u0438\u0435\u043d\u0442:  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*- import socket  sock = socket.socket() sock.connect(('localhost', 9090)) sock.send('\/usr\/bin\/konsole -e  mc')  sock.close() <\/code><\/pre>\n<p>  \u0418 \u0441\u0435\u0440\u0432\u0435\u0440:  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*- import socket import subprocess  sock = socket.socket() sock.bind(('localhost', 9090)) sock.listen(1) while True:         conn, addr = sock.accept()         data = conn.recv(1024)         if not data:                 break         subprocess.call(data, shell=True) conn.close() <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0449\u0435\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u00ab\u0441\u043b\u0443\u0448\u0430\u0435\u0442\u00bb \u043f\u043e\u0440\u0442 9090 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u0435\u0442\u043b\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-e mc<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 midnight commander.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\"><iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/Aov4lP9XTWo?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe>  <\/div>\n<\/div>\n<p>  *\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u041e\u0421 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Linux, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 DE \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 KDE, \u043d\u043e \u043f\u0443\u0441\u0442\u044c \u0432\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0441\u043c\u0443\u0449\u0430\u0435\u0442, \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u041e\u0421.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430, \u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u0435\u0435!<\/p>\n<h4>\u0413\u043b\u0430\u0432\u0430 1<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441 \u043a\u0430\u0440\u0442\u044b Zabbix.<\/p>\n<p>  \u041a\u043e\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0430 \u0432\u043e\u0442 \u0432 \u043a\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 sys.  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*- import socket import sys  sock = socket.socket() sock.connect(('localhost', 9090)) sock.send('\/usr\/bin\/konsole -e ssh root@'+ sys.argv[1])  sock.close() <\/code><\/pre>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e ssh \u043a IP \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<br \/>  \u041b\u043e\u0433\u0438\u043d\u043e\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 <code>root<\/code>.<\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430.<br \/>  \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0443\u044e\u0442\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f \u0437\u0434\u0435\u0441\u044c \u2014 \/usr\/local\/bin\/client.py<br \/>  \u0412 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Zabbix \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 Administration -&gt; Scripts.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/710\/03c\/011\/71003c011276bd73497522e2e94edc47.png\"\/><br \/>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442(Create new).<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/2c5\/c1c\/19a\/2c5c1c19a493ad93b32b027448f80dd5.png\"\/><br \/>  \u0427\u0435\u0440\u0435\u0437 Zabbix \u043c\u0430\u043a\u0440\u043e\u0441 {HOST.IP} \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f IP \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0443 \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443 \u0445\u043e\u0441\u0442\u043e\u0432 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043c\u0435\u043d\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/397\/c40\/e5b\/397c40e5bd2371d9ea920b052cead7b5.png\"\/><br \/>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u044f\u0442 \u2014 \u00ab\u0421\u043a\u0440\u0438\u043f\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f \u0441 localhost, \u043d\u043e \u043e\u043d \u0436\u0435 \u0443\u0436\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435?!\u00bb<br \/>  \u0412\u0441\u0435 \u0432\u0435\u0440\u043d\u043e! \u041d\u043e \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f ssh \u0442\u0443\u043d\u043d\u0435\u043b\u044c.<br \/>  \u0412\u0441\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430 localhost:9090 Zabbix \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. <br \/>  \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u00ab\u0437\u0435\u0440\u043a\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00bb \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"bash\">ssh -f -N -R 9090:127.0.0.1:9090  zabbix <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e ssh, \u0438 \u0442\u043e\u043d\u043d\u0435\u043b\u044f\u0445 \u0432 \u0447\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0432 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u2014 <a href=\"http:\/\/habrahabr.ru\/post\/122445\/\">1<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/122445\/\">2<\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0438\u0434\u0435\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043a \u043f\u0435\u0440\u0432\u043e\u0439 \u0433\u043b\u0430\u0432\u0435<\/b><\/p>\n<div class=\"spoiler_text\"><iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/qd9yOpMJLi0?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe>  <\/div>\n<\/div>\n<h4>\u0413\u043b\u0430\u0432\u0430 2<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0443\u043c\u043d\u0435\u044e\u0442 \u0438 \u043d\u0430\u0443\u0447\u0430\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c Windows \u043e\u0442 Linux.<\/p>\n<p>  \u0418\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0443\u0437\u043d\u0430\u0432\u0430\u043b \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u041e\u0421 \u0442\u043e\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d.<br \/>  \u0418, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u044d\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043e\u0442\u0434\u0430\u0432\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<br \/>  \u041a\u043e\u0434 \u043e\u0431\u043e\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f.<\/p>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442:  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*- import socket import sys  sock = socket.socket() sock.connect(('localhost', 9090))  os = sock.recv(64) if  os == &quot;Windows&quot;:     sock.send('C:\\\\apps\\\\putty.exe -ssh root@' + sys.argv[1]) elif os == &quot;Linux&quot;:     sock.send('\/usr\/bin\/konsole -e ssh root@'+ sys.argv[1])  sock.close() <\/code><\/pre>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440:  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*- import socket import subprocess  OS = &quot;Linux&quot;  sock = socket.socket() sock.bind(('127.0.0.1', 9090)) sock.listen(1) while True:     conn, addr = sock.accept()     conn.sendall(OS)     data = conn.recv(1024)     print data     if not data:         break     subprocess.call(data, shell=True) conn.close() <\/code><\/pre>\n<p>  * \u0434\u043b\u044f Windows \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f OS \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435<br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043f\u0440\u0438 \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0435 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0435\u0440\u0432\u043e-\u043d\u0430\u043f\u0435\u0440\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u041e\u0421, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0431\u0435\u043a\u0441\u043b\u044d\u0448\u0438 \u0432 \u043f\u0443\u0442\u044f\u0445 \u0434\u043b\u044f \u041e\u0421 Windows \u043d\u0443\u0436\u043d\u043e \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442.\u0435. \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439 <code>\\\\<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0438\u0434\u0435\u043e \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0433\u043b\u0430\u0432\u0435<\/b><\/p>\n<div class=\"spoiler_text\"><iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/LcRHA4iLssA?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  \u041d\u0430 \u0432\u0438\u0434\u0435\u043e:<br \/>  \u00ab\u0437\u0435\u0440\u043a\u0430\u043b\u0438\u0440\u0443\u0435\u043c\u00bb \u043f\u043e\u0440\u0442 \u0432 Windows \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 putty<br \/>  \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440<br \/>  \u043a\u043b\u0438\u043a\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0445\u043e\u0441\u0442\u043e\u043c<br \/>  \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0432 Windows \u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432 Linux  <\/div>\n<\/div>\n<h4>\u0413\u043b\u0430\u0432\u0430 3<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043c \u043a\u043e\u0434 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 Zabbix.<br \/>  \u041d\u0430\u0443\u0447\u0438\u043c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0443-\u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0432\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043b\u043e\u0433\u0438\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\/\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u0438 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438.<br \/>  \u041d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445\u0441\u044f Zabbix, \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e?<br \/>  \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u0430\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043a\u0442\u043e \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b, \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0433\u043e\u0432\u043e\u0440\u044f \u043a\u0442\u043e \u00ab\u0442\u043a\u043d\u0443\u043b\u00bb \u0441\u0441\u044b\u043b\u043a\u0443 \u0432 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<p>  \u0420\u0435\u0448\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e.  <\/p>\n<ul>\n<li>\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u043c \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u0442.<\/li>\n<li>\u041d\u0430\u0443\u0447\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442-\u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u2014 \u043b\u043e\u0433\u0438\u043d\u0430.<\/li>\n<li>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0434 Zabbix \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0438\u0437 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0440\u0442\u044b:<br \/>  Admin \u2014 9090<br \/>  Admin1 \u2014 9091<br \/>  \u0438 \u0442.\u0434.<\/p>\n<p>  \u041a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438:  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*-  import socket import sys  if sys.argv[2] == 'Admin':         PORT=9090 elif sys.argv[2] == 'Admin1':         PORT=9091  sock = socket.socket() sock.connect(('localhost', PORT)) os = sock.recv(64)  if  os == &quot;Windows&quot;:         sock.send('C:\\\\apps\\\\putty.exe -ssh root@' + sys.argv[1]) elif os == &quot;Linux&quot;:         sock.send('\/usr\/bin\/konsole -e ssh root@'+ sys.argv[1])  sock.close() <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0433\u043b\u0430\u0432\u044b, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e.<br \/>  \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043b\u0438\u043c\u0438\u0442 \u043a\u043e\u0444\u0435 \u043d\u0430 \u044d\u0442\u0443 \u0441\u043c\u0435\u043d\u0443 \u0438 \u0434\u0430\u0436\u0435 \u0443\u043c\u044b\u043a\u043d\u0443\u0442\u044c \u043a\u043e\u0442\u0430 \u0443 \u0436\u0435\u043d\u044b \u0438\u0437 \u043f\u043e\u0434 \u0431\u043e\u043a\u0430.<br \/>  \u041a\u043e\u0444\u0435 \u0431\u044b\u043b \u0432\u044b\u043f\u0438\u0442, \u043a\u043e\u0442, \u043f\u0440\u043e\u043c\u0443\u0440\u043b\u044b\u043a\u0430\u0432 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435, \u0434\u0430\u0432\u043d\u043e \u0441\u0432\u0430\u043b\u0438\u043b, \u0430 \u044f \u043d\u0438 \u043d\u0430 \u0439\u043e\u0442\u0443 \u043d\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u043b\u0441\u044f \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e\u2026<br \/>  \u041d\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043e\u0442\u0433\u0430\u0434\u043a\u0438 \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u043e\u044f, \u043e\u043d\u043e \u043a\u0440\u0435\u043f\u043a\u043e \u0432\u0446\u0435\u043f\u0438\u043b\u043e\u0441\u044c \u0432 \u043c\u043e\u0439 \u043c\u043e\u0437\u0433 \u0441\u0432\u043e\u0438\u043c\u0438 \u043a\u043b\u0435\u0448\u043d\u044f\u043c\u0438, \u0438 \u044f \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u044f\u0431\u043b\u043e\u043a\u043e \u0432\u043e\u0442-\u0432\u043e\u0442 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0432\u0430\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u043d\u0435 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443.<br \/>  \u0418 \u043e\u043d\u043e \u0441\u0432\u0430\u043b\u0438\u043b\u043e\u0441\u044c!(\u043d\u0435 \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e)<br \/>  \u0420\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0431\u044b\u043b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438.<br \/>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f scripts_exec.php, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b\u0439 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e Zabbix.<br \/>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 MySQL \u0431\u0430\u0437\u0435. <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/9d8\/51e\/922\/9d851e922d8e1dfff33426fa35802902.png\"\/><br \/>  \u0417\u043d\u0430\u0447\u0438\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0432 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c scripts_exec.php \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043d \u043a\u0430\u043a \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e scripts_exec.php:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php \/* ** Zabbix ** Copyright (C) 2001-2014 Zabbix SIA ** ** This program is free software; you can redistribute it and\/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. **\/   require_once dirname(__FILE__).'\/include\/config.inc.php';  $page['title'] = _('Scripts'); $page['file'] = 'scripts_exec.php';  define('ZBX_PAGE_NO_MENU', 1);  require_once dirname(__FILE__).'\/include\/page_header.php';  $NewCommand4Run = '\/usr\/local\/bin\/client_ssh.py {HOST.IP} '. CWebUser::$data['alias'];   \/\/ VAR  TYPE    OPTIONAL        FLAGS   VALIDATION      EXCEPTION $fields = array(         'hostid' =&gt;             array(T_ZBX_INT, O_OPT, P_ACT, DB_ID, null),         'scriptid' =&gt;   array(T_ZBX_INT, O_OPT, null, DB_ID, null) ); check_fields($fields);  ob_flush(); flush();  $scriptId = getRequest('scriptid'); $hostId = getRequest('hostid');  $data = array(         'message' =&gt; '',         'info' =&gt; DBfetch(DBselect('SELECT s.name FROM scripts s WHERE s.scriptid='.zbx_dbstr($scriptId))) );  if ($scriptId == 5) {                 DBexecute('update zabbix.scripts set command='.&quot;'&quot;.$NewCommand4Run.&quot;'&quot;.' where scriptid=5;');         }  $result = API::Script()-&gt;execute(array(         'hostid' =&gt; $hostId,         'scriptid' =&gt; $scriptId ));  $isErrorExist = false;  if (!$result) {         $isErrorExist = true; } elseif ($result['response'] == 'failed') {         error($result['value']);          $isErrorExist = true; } else {         $data['message'] = $result['value']; }  if ($isErrorExist) {         show_error_message(                 _('Cannot connect to the trapper port of zabbix server daemon, but it should be available to run the script.')         ); }  \/\/ render view $scriptView = new CView('general.script.execute', $data); $scriptView-&gt;render(); $scriptView-&gt;show();  require_once dirname(__FILE__).'\/include\/page_footer.php'; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f  <\/p>\n<pre><code class=\"php\">$NewCommand4Run = '\/usr\/local\/bin\/client.py {HOST.IP} '. CWebUser::$data['alias']; <\/code><\/pre>\n<p>  \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 + \u043c\u0430\u043a\u0440\u043e\u0441 {HOST.IP} + \u043b\u043e\u0433\u0438\u043d \u0430\u0434\u043c\u0438\u043d\u0430.<br \/>  \u0410 \u0443\u0441\u043b\u043e\u0432\u0438\u0435  <\/p>\n<pre><code class=\"php\">if ($scriptId == 5) {                 DBexecute('update zabbix.scripts set command='.&quot;'&quot;.$NewCommand4Run.&quot;'&quot;.' where scriptid=5;');         } <\/code><\/pre>\n<p>  \u0437\u0430\u043c\u0435\u043d\u0438\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 MySQL \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/d28\/0a3\/543\/d280a354302d8821612d25db95f1c185.png\"\/><\/p>\n<p>  \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u0440\u0438\u043f\u0442-\u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0443-\u0441\u0435\u0440\u0432\u0435\u0440\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442.<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0431\u0435\u0437 \u0437\u0432\u0443\u043a\u0430, \u043d\u043e\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u0440\u0430\u0437\u0431\u0443\u0448\u0435\u0432\u0430\u043b\u0441\u044f \u0443\u0436 \u043e\u0447\u0435\u043d\u044c)<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/9cm6L--wMIk?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0413\u043b\u0430\u0432\u0430 4<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c Zabbix \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c vnc \u0438 telnet \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445-\u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445 \u0434\u043b\u044f \u043f\u0440\u043e\u0447\u0438\u0445, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432.<br \/>  \u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/usr\/local\/bin \u043d\u0430 Zabbix \u0441\u0435\u0440\u0432\u0435\u0440\u0435:  <\/p>\n<pre><code class=\"bash\">-rwxr-xr-x 1 root staff 429 Mar 17 03:06 client_ssh.py -rwxr-xr-x 1 root staff 418 Mar 17 04:58 client_telnet.py -rwxr-xr-x 1 root staff 412 Mar 17 05:00 client_vnc.py <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430-\u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">client_ssh.py  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*-  import socket import sys  if sys.argv[2] == 'Admin':         PORT=9090 elif sys.argv[2] == 'Admin1':         PORT=9091  sock = socket.socket() sock.connect(('localhost', PORT)) os = sock.recv(64)  if  os == &quot;Windows&quot;:         sock.send('C:\\\\apps\\\\putty.exe -ssh root@' + sys.argv[1]) elif os == &quot;Linux&quot;:         sock.send('\/usr\/bin\/konsole -e ssh root@'+ sys.argv[1])  sock.close() <\/code><\/pre>\n<p>  client_vnc.py  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*-  import socket import sys  if sys.argv[2] == 'Admin':         PORT=9090 elif sys.argv[2] == 'Admin1':         PORT=9091  sock = socket.socket() sock.connect(('localhost', PORT)) os = sock.recv(64)  if  os == &quot;Windows&quot;:         sock.send('c:\\\\apps\\\\vnc.exe ' + sys.argv[1]) elif os == &quot;Linux&quot;:         sock.send('\/usr\/bin\/X11\/gvncviewer '+ sys.argv[1])  sock.close() <\/code><\/pre>\n<p>  client_telnet.py  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*- import socket import sys  if sys.argv[2] == 'Admin':         PORT=9090 elif sys.argv[2] == 'Admin1':         PORT=9091  sock = socket.socket() sock.connect(('localhost', PORT))  os = sock.recv(64) if  os == &quot;Windows&quot;:     sock.send('C:\\\\apps\\\\putty.exe -telnet ' + sys.argv[1]) elif os == &quot;Linux&quot;:     sock.send('\/usr\/bin\/konsole -e telnet '+ sys.argv[1])   sock.close() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u0434\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0433\u043b\u0430\u0432\u0430\u0445 \u044d\u0442\u043e \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e.<br \/>  \u0421\u043a\u0430\u0436\u0443 \u043b\u0438\u0448\u044c, \u0447\u0442\u043e \u0434\u043b\u044f Windows \u044f \u0441\u043a\u0430\u0447\u0430\u043b portable \u0432\u0435\u0440\u0441\u0438\u044e vnc \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0432\u0441\u0435 \u0432 <code>c:\\apps\\ <\/code><\/p>\n<p>  \u0414\u043b\u044f telnet \u0438 vnc \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0448\u0430\u0433\u0438 \u0438\u0437 \u0433\u043b\u0430\u0432\u044b 1, \u0432 \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Zabbix, \u0430 \u0434\u043b\u044f ssh \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.<br \/>  \u0424\u0430\u0439\u043b scripts_exe\u0441.php \u0442\u0430\u043a \u0436\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u043d\u043e\u0432\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 scripts_exe\u0441.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php \/* ** Zabbix ** Copyright (C) 2001-2014 Zabbix SIA ** ** This program is free software; you can redistribute it and\/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. **\/   require_once dirname(__FILE__).'\/include\/config.inc.php';  $page['title'] = _('Scripts'); $page['file'] = 'scripts_exec.php';  define('ZBX_PAGE_NO_MENU', 1);  require_once dirname(__FILE__).'\/include\/page_header.php';  $NewCommand4RunSSH = '\/usr\/local\/bin\/client_ssh.py {HOST.IP} '. CWebUser::$data['alias']; $NewCommand4RunVNC = '\/usr\/local\/bin\/client_vnc.py {HOST.IP} '. CWebUser::$data['alias']; $NewCommand4RunTELNET = '\/usr\/local\/bin\/client_telnet.py {HOST.IP} '. CWebUser::$data['alias'];   \/\/ VAR  TYPE    OPTIONAL        FLAGS   VALIDATION      EXCEPTION $fields = array(         'hostid' =&gt;             array(T_ZBX_INT, O_OPT, P_ACT, DB_ID, null),         'scriptid' =&gt;   array(T_ZBX_INT, O_OPT, null, DB_ID, null) ); check_fields($fields);  ob_flush(); flush();  $scriptId = getRequest('scriptid'); $hostId = getRequest('hostid');  $data = array(         'message' =&gt; '',         'info' =&gt; DBfetch(DBselect('SELECT s.name FROM scripts s WHERE s.scriptid='.zbx_dbstr($scriptId))) );  if ($scriptId == 5) {                 DBexecute('update zabbix.scripts set command='.&quot;'&quot;.$NewCommand4RunSSH.&quot;'&quot;.' where scriptid=5;');         } if ($scriptId == 6) {                 DBexecute('update zabbix.scripts set command='.&quot;'&quot;.$NewCommand4RunVNC.&quot;'&quot;.' where scriptid=6;');         } if ($scriptId == 7) {                 DBexecute('update zabbix.scripts set command='.&quot;'&quot;.$NewCommand4RunTELNET.&quot;'&quot;.' where scriptid=7;');         }   $result = API::Script()-&gt;execute(array(         'hostid' =&gt; $hostId,         'scriptid' =&gt; $scriptId ));  $isErrorExist = false;  if (!$result) {         $isErrorExist = true; } elseif ($result['response'] == 'failed') {         error($result['value']);          $isErrorExist = true; } else {         $data['message'] = $result['value']; }  if ($isErrorExist) {         show_error_message(                 _('Cannot connect to the trapper port of zabbix server daemon, but it should be available to run the script.')         ); }  \/\/ render view $scriptView = new CView('general.script.execute', $data); $scriptView-&gt;render(); $scriptView-&gt;show();  require_once dirname(__FILE__).'\/include\/page_footer.php'; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0423\u0436\u0435 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e.<\/b><\/p>\n<div class=\"spoiler_text\">\u0417\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0431\u0435\u0437 \u0437\u0432\u0443\u043a\u0430.<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/VvwELEAGw5k?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe>  <\/div>\n<\/div>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/h4>\n<p>  \u041d\u0430\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438 \u043f\u0440\u0438\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u043e\u0441\u043a \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<p>  \u0421\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0437\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u041e\u0421 Linux, \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0431\u044b\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u0434\u0435\u043c\u043e\u043d \u043d\u0430 Python. <br \/>  \u041e\u043d \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0430\u0431\u043b \u0444\u043e\u0440\u043a \u0438 \u043f\u0440\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0436\u0434\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0412 \u041e\u0421 Windows \u0432\u0441\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043d\u043e, \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>  \u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u041e\u0421 Linux:  <\/p>\n<pre><code class=\"bash\">fessae@workbook:~\/sh\/python &gt; pwd \/home\/fessae\/sh\/python fessae@workbook:~\/sh\/python &gt; ll total 12 -rwxr-xr-x 1 fessae fessae 2880 Feb 28 02:56 daemon.py* -rwxr-xr-x 1 fessae fessae  710 Mar 17 03:36 server.py* -rwxr-xr-x 1 fessae fessae 1122 Mar 13 04:59 ZabbixTeams.py* <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 Linux.<\/b><\/p>\n<div class=\"spoiler_text\">daemon.py  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python  import sys, os, time, atexit from signal import SIGTERM  class Daemon:         &quot;&quot;&quot;         A generic daemon class.          Usage: subclass the Daemon class and override the run() method         &quot;&quot;&quot;         def __init__(self, pidfile, stdin='\/dev\/null', stdout='\/dev\/null', stderr='\/dev\/null'):                 self.stdin = stdin                 self.stdout = stdout                 self.stderr = stderr                 self.pidfile = pidfile          def daemonize(self):                 &quot;&quot;&quot;                 do the UNIX double-fork magic, see Stevens' &quot;Advanced                 Programming in the UNIX Environment&quot; for details (ISBN 0201563177)                 http:\/\/www.erlenstar.demon.co.uk\/unix\/faq_2.html#SEC16                 &quot;&quot;&quot;                 try:                         pid = os.fork()                         if pid &gt; 0:                                 # exit first parent                                 sys.exit(0)                 except OSError, e:                         sys.stderr.write(&quot;fork #1 failed: %d (%s)\\n&quot; % (e.errno, e.strerror))                         sys.exit(1)                  # decouple from parent environment                 os.chdir(&quot;\/&quot;)                 os.setsid()                 os.umask(0)                  # do second fork                 try:                         pid = os.fork()                         if pid &gt; 0:                                 # exit from second parent                                 sys.exit(0)                 except OSError, e:                         sys.stderr.write(&quot;fork #2 failed: %d (%s)\\n&quot; % (e.errno, e.strerror))                         sys.exit(1)                  # redirect standard file descriptors                 sys.stdout.flush()                 sys.stderr.flush()                 si = file(self.stdin, 'r')                 so = file(self.stdout, 'a+')                 se = file(self.stderr, 'a+', 0)                 os.dup2(si.fileno(), sys.stdin.fileno())                 os.dup2(so.fileno(), sys.stdout.fileno())                 os.dup2(se.fileno(), sys.stderr.fileno())                  # write pidfile                 atexit.register(self.delpid)                 pid = str(os.getpid())                 file(self.pidfile,'w+').write(&quot;%s\\n&quot; % pid)          def delpid(self):                 os.remove(self.pidfile)          def start(self):                 &quot;&quot;&quot;                 Start the daemon                 &quot;&quot;&quot;                 # Check for a pidfile to see if the daemon already runs                 try:                         pf = file(self.pidfile,'r')                         pid = int(pf.read().strip())                         pf.close()                 except IOError:                         pid = None                  if pid:                         message = &quot;pidfile %s already exist. Daemon already running?\\n&quot;                         sys.stderr.write(message % self.pidfile)                         sys.exit(1)                  # Start the daemon                 self.daemonize()                 self.run()          def stop(self):                 &quot;&quot;&quot;                 Stop the daemon                 &quot;&quot;&quot;                 # Get the pid from the pidfile                 try:                         pf = file(self.pidfile,'r')                         pid = int(pf.read().strip())                         pf.close()                 except IOError:                         pid = None                  if not pid:                         message = &quot;pidfile %s does not exist. Daemon not running?\\n&quot;                         sys.stderr.write(message % self.pidfile)                         return # not an error in a restart                  # Try killing the daemon process                 try:                         while 1:                                 os.kill(pid, SIGTERM)                                 time.sleep(0.1)                 except OSError, err:                         err = str(err)                         if err.find(&quot;No such process&quot;) &gt; 0:                                 if os.path.exists(self.pidfile):                                         os.remove(self.pidfile)                         else:                                 print str(err)                                 sys.exit(1)          def restart(self):                 &quot;&quot;&quot;                 Restart the daemon                 &quot;&quot;&quot;                 self.stop()                 self.start()  def run(self):                 &quot;&quot;&quot;                 You should override this method when you subclass Daemon. It will be called after the process has been                 daemonized by start() or restart().         &quot;&quot;&quot; <\/code><\/pre>\n<p>  server.py  <\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*-  import socket import subprocess import sys  OS = &quot;Linux&quot;  def main():         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)         print 'Socket created'         try:             sock.bind(('127.0.0.1', 9090))         except socket.error , msg:             print 'Bind failed. Error Code : ' + str(msg[0]) + ' Message ' + msg[1]             sys.exit()         print 'Socket bind complete'         sock.listen(1)         print 'Socket now listening'          while True:                 conn, addr = sock.accept()                 conn.sendall(OS)                 data = conn.recv(1024)                 print 'Connected with ' + addr[0] + ':' + str(addr[1])                 print data                 if not data:                         break                 subprocess.call(data, shell=True)         conn.close()  if __name__ == &quot;__main__&quot;:     main() <\/code><\/pre>\n<p>  ZabbixTeams.py  <\/p>\n<pre><code class=\"python\">#\/usr\/bin\/env python #-*- coding: utf-8 -*-                                                                                                                             import sys sys.path.append(&quot;\/home\/fessae\/sh\/python&quot;) from daemon import Daemon import server  class ZabbixTeams(Daemon):             def run(self):                 while True:                     server.main()                               if __name__ == &quot;__main__&quot;:             daemon = ZabbixTeams('\/tmp\/zabbixteams.pid',stdout='\/tmp\/zabbixteams.log',stderr='\/tmp\/zabbixteamserr.log')             if len(sys.argv) == 2:                     if 'start' == sys.argv[1]:                             daemon.start()                     elif 'stop' == sys.argv[1]:                             daemon.stop()                     elif 'restart' == sys.argv[1]:                             daemon.restart()                     else:                             print &quot;Unknown command&quot;                             sys.exit(2)                     sys.exit(0)             else:                     print &quot;usage: %s start|stop|restart&quot; % sys.argv[0]                     sys.exit(2) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0430 \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c  <\/p>\n<pre><code class=\"bash\">python ZabbixTeams.py start <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e  <\/p>\n<pre><code class=\"bash\">python ZabbixTeams.py stop <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443  <\/p>\n<pre><code class=\"python\">sys.path.append(&quot;\/home\/fessae\/sh\/python&quot;) <\/code><\/pre>\n<p>  \u0438\u0437 ZabbixTeams.py, \u043e\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0440\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430.<br \/>  \u0418\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0435\u0451 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0432\u0430\u0448\u0435\u043c\u0443 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0434\u0435\u043c\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438, \u043f\u0440\u0438\u043b\u0438\u043f\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0434\u043b\u044f \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0430\u0432\u0441\u0442\u043e\u0441\u0442\u0430\u0440\u0442 DE \u0438\u043b\u0438 \u041e\u0421.<br \/>  \u042d\u0442\u043e \u0443\u0436\u0435 \u043a\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u041e\u0421 Windows.<br \/>  \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f\/\u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Python IDE PyCharm, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u043f\u043e \u043f\u0443\u0442\u0438:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/d7d\/8aa\/a78\/d7d8aaa7845c070ae706d9be0864d2ca.jpg\"\/><\/p>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u041e\u0421 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <a href=\"http:\/\/sourceforge.net\/projects\/pywin32\/\">pywin32<\/a>.<br \/>  \u041d\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u043a\u0435\u0442\u044b \u0438 \u043d\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u043d\u0438\u0445 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0441\u044f.<br \/>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0437\u0436\u0435 \u044f \u0432\u043e\u0437\u044c\u043c\u0443\u0441\u044c \u0437\u0430 <a href=\"http:\/\/docs.python.org\/2\/library\/asyncore.html\">asyncore<\/a> \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0443 \u0432\u0441\u0435 \u043d\u0430 twisted, \u043d\u043e \u043f\u043e\u043a\u0430 \u043c\u043d\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a \u0434\u0435\u043c\u043e\u043d\u0430 \u043d\u0430 Windows \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>\u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0444\u0430\u0439\u043b server.bat \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439:<br \/> \n<pre><code class=\"dos\"> c:\\Python27\\python.exe C:\\Users\\FessAectan\\PycharmProjects\\ZabbixTeams\\daemon.py <\/code><\/pre>\n<p>  <\/li>\n<li>daemon.py, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/> \n<pre><code class=\"python\">import sys import subprocess CREATE_NO_WINDOW = 0x8000000 subprocess.Popen([&quot;c:\\Python27\\python.exe&quot;, &quot;-O&quot;,&quot;C:\\Users\\FessAectan\\PycharmProjects\\ZabbixTeams\\server.py&quot;], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags = CREATE_NO_WINDOW) <\/code><\/pre>\n<p>  <\/li>\n<li>\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0441\u0430\u043c server.py<br \/> \n<pre><code class=\"python\">#!\/usr\/bin\/env python # -*- coding: utf-8 -*-  import socket import subprocess  OS = &quot;Windows&quot;  def main():     sock = socket.socket()     print &quot;Socket created&quot;     try:         sock.bind(('127.0.0.1', 9091))     except socket.error , msg:         print &quot;Bind failed. Error Code : &quot; + str(msg[0]) + &quot; Message &quot; + msg[1]         sys.exit()     print &quot;Socket bind complete&quot;     sock.listen(1)     print &quot;Socket now listening&quot;              while True:         conn, addr = sock.accept()         conn.sendall(OS)         data = conn.recv(1024)         print &quot;Connected with &quot; + addr[0] + &quot;:&quot; + str(addr[1])         if not data:             break         subprocess.Popen(data, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags = 0x00000008)     conn.close()   if __name__ == &quot;__main__&quot;:         main()  <\/code><\/pre>\n<p>  \u0414\u043b\u044f Windows subprocess.call \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 subprocess.Popen.  <\/li>\n<\/ul><\/div>\n<\/div>\n<p>  \u0418\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0432\u0438\u0434\u0435\u043e.<br \/>  *\u0441\u043e \u0437\u0432\u0443\u043a\u043e\u043c \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \ud83d\ude09<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/jxjz9H1zv_0?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  <b>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/b> <br \/>  by <a href=\"http:\/\/habrahabr.ru\/users\/fessaectan\/\" class=\"user_link\">FessAectan<\/a>    \t<\/p>\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\/company\/serverclub\/blog\/217161\/\"> http:\/\/habrahabr.ru\/company\/serverclub\/blog\/217161\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u0435\u043a, \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u043b\u043e\u0442\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438, \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 kvm&#8217;\u0430\u043c\u0438.<br \/>  \u041d\u0443\u0436\u0435\u043d \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0443\u043b\u0438\u0442\u044c \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0445\u043e\u0437\u0430\u0439\u0441\u0442\u0432\u043e\u043c, \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u0438 <br \/>  \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u041f\u0440\u044f\u043c\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u0440\u0430 \u043a\u043b\u0438\u043a\u043e\u0432 \u043c\u044b\u0448\u044c\u044e \u0438 \u043e\u043f \u2014 \u043f\u0435\u0440\u0435\u0434 \u0442\u043e\u0431\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0434\u043e\u043f\u0435\u0447\u043d\u044b\u0445 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Zabbix.<br \/>  \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0441\u0435\u0439 \u0434\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<br \/>  \u0412\u0435\u0434\u044c \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0442\u043a\u043d\u0443\u0442\u044c \u0432 \u043a\u0430\u0440\u0442\u0435 Zabbix \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0439\u043a\u0443, \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0435\u0451 \u043f\u043e\u0434\u043a\u0430\u0440\u0442\u0443 \u0438, \u0432\u044b\u0431\u0440\u0430\u0432 \u0436\u0435\u043b\u0435\u0437\u043a\u0443,<br \/>  \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ssh\/telnet\/vnc \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.<\/p>\n<p>  \u041e\u0437\u0430\u0434\u0430\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u0438\u0434\u0435\u0435\u0439, \u044f \u043d\u0430\u0447\u0430\u043b \u043c\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u0411\u044b\u043b \u043d\u0430\u0439\u0434\u0435\u043d <a href=\"https:\/\/www.zabbix.com\/forum\/showthread.php?t=12916\">\u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u0434<\/a> \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 Zabbix, \u043d\u043e \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u043c\u043e\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043a\u043b\u0438\u043a\u043e\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432 \u043a\u0430\u0440\u0442\u0435. <br \/>  \u0415\u0449\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u043b\u0443\u0442\u0430\u0432 \u043f\u043e \u0437\u0430\u043a\u043e\u0443\u043b\u043a\u0430\u043c \u0432\u0441\u0435\u043c\u0438\u0440\u043d\u043e\u0439 \u043f\u0430\u0443\u0442\u0438\u043d\u044b \u0438 \u043f\u043e\u043c\u0443\u0447\u0430\u0432 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0433\u043b\u0443\u043f\u044b\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u044f \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b \u043e\u2026 Python.<br \/>  \u0414\u0430, Python, \u043d\u0435 \u0440\u0430\u0437 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0439 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0432 \u0442\u0440\u0443\u0434\u043d\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443.<br \/>  \u041f\u0438\u0442\u0430\u044e \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0436\u043d\u044b\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0430 \u043a \u044d\u0442\u043e\u043c\u0443 \u044f\u0437\u044b\u043a\u0443 \u0437\u0430 \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0442\u0435\u043f\u043b\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441.<\/p>\n<p>  \u0418 \u0442\u0430\u043a, \u0432\u0435\u043a\u0442\u043e\u0440 \u0430\u0442\u0430\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0438 \u0437\u0430\u043c\u0435\u0440\u043b\u0438 \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u0431\u0440\u043e\u0441\u0430 \u043c\u044b\u0441\u043b\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u2026 <br \/>  \u0421\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0443\u0436\u0435 \u0447\u0435\u0442\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u043a\u0430\u043a \u0431\u0443\u0434\u0443 \u0440\u0435\u0448\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u043d\u0430\u043f\u0438\u0448\u0443 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435!<br \/>  \u041d\u0430 \u043c\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0436\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0438\u0437\u044b\u0441\u043a\u0430\u043d\u0438\u0439 \u0441\u0442\u0430\u043b\u043e \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430 Linux, \u0442\u0430\u043a \u0438 \u043d\u0430 Windows.<br \/>  \u042d\u043f\u043e\u043f\u0435\u044f \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043f\u0443\u0442\u0438 \u043a \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u0439 \u0446\u0435\u043b\u0438 \u0436\u0434\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u0434 \u0445\u0430\u0431\u0440\u0430\u043a\u0430\u0442\u043e\u043c.  <\/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-217161","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217161","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=217161"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217161\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}