{"id":793,"date":"2026-09-17T22:33:19","date_gmt":"2026-09-17T19:33:19","guid":{"rendered":"https:\/\/imaxis.ru\/?p=793"},"modified":"2026-09-18T00:06:05","modified_gmt":"2026-09-17T21:06:05","slug":"ustanovka-i-nastroyka-alerta-na-ubuntu-server-alertov-i-veb-konsol","status":"publish","type":"post","link":"https:\/\/imaxis.ru\/?p=793","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Alerta \u043d\u0430 Ubuntu: \u0441\u0435\u0440\u0432\u0435\u0440 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0438 \u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c"},"content":{"rendered":"<h1>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Alerta \u043d\u0430 Ubuntu: \u0441\u0435\u0440\u0432\u0435\u0440 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0438 \u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/h1>\n<p>Alerta \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0440\u0435\u0432\u043e\u0436\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0445 \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u041e\u043d \u0443\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 Zabbix, Prometheus, Nagios \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443, \u044d\u0441\u043a\u0430\u043b\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 LDAP\/Active Directory.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Alerta Server (\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u2014 <strong>9.1.0<\/strong>), \u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u0438 (<strong>8.7.1<\/strong>), \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 PostgreSQL, \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 AD.<\/p>\n<hr \/>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>Alerta \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 MongoDB \u0438 PostgreSQL. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<pre><code class=\"language-bash\">apt-get update\n<\/code><\/pre>\n<h3>PostgreSQL (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f)<\/h3>\n<pre><code class=\"language-bash\">apt-get install postgresql postgresql-contrib\nsystemctl enable postgresql --now\n<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438:<\/p>\n<pre><code class=\"language-bash\">su postgres -c &quot;psql -Upostgres template1&quot;\n<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"language-sql\">=# CREATE USER alerta WITH ENCRYPTED PASSWORD 'alerta123';\n<\/code><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440: \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>alerta<\/code> \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <code>alerta123<\/code>.<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0431\u0430\u0437\u0443:<\/p>\n<pre><code class=\"language-sql\">=# CREATE DATABASE alerta WITH ENCODING='UTF-8';\n=# GRANT all ON DATABASE alerta TO alerta;\n=# q\n<\/code><\/pre>\n<p>\u041f\u0440\u0430\u0432\u0438\u043c <code>pg_hba.conf<\/code> (\u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438\u0449\u0435\u043c \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 postgres):<\/p>\n<pre><code class=\"language-bash\">ps aux | grep postgres | grep -- -D\n<\/code><\/pre>\n<pre><code>postgres 3356 ... \/usr\/lib\/postgresql\/16\/bin\/postgres -D \/var\/lib\/postgresql\/16\/main -c config_file=\/etc\/postgresql\/16\/main\/postgresql.conf\n<\/code><\/pre>\n<p><strong>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e <code>postgresql.conf<\/code> \u2014 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <code>\/etc\/postgresql\/16\/main<\/code>.<\/strong><\/p>\n<pre><code class=\"language-bash\">vi \/etc\/postgresql\/16\/main\/pg_hba.conf\n<\/code><\/pre>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code>local   all       all            peer\n<\/code><\/pre>\n<p>\u0438 <strong>\u0432\u044b\u0448\u0435 \u043d\u0435\u0451<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code>local   alerta    alerta         md5\n<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <code>alerta<\/code> \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 <code>alerta<\/code> \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c.<\/strong><\/p>\n<pre><code class=\"language-bash\">systemctl restart postgresql\npsql -d alerta -Ualerta -W\n<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 <code>alerta=&gt;<\/code>. \u0412\u044b\u0445\u043e\u0434\u0438\u043c:<\/p>\n<pre><code>alerta=&gt; q\n<\/code><\/pre>\n<h3>MongoDB<\/h3>\n<p>\u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445 Ubuntu \u043f\u0430\u043a\u0435\u0442\u0430 <code>mongodb<\/code> \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u2014 \u0441\u0442\u0430\u0432\u0438\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <code>mongodb-org<\/code> \u043f\u043e <a href=\"https:\/\/www.mongodb.com\/docs\/manual\/tutorial\/install-mongodb-on-ubuntu\/\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 MongoDB<\/a>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e:<\/p>\n<pre><code class=\"language-bash\">systemctl enable mongod --now\n<\/code><\/pre>\n<hr \/>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Alerta Server<\/h2>\n<pre><code class=\"language-bash\">apt-get install python3-pip\npip3 install --upgrade pip\n<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"language-bash\">pip3 install alerta-server\n<\/code><\/pre>\n<p>\u0414\u043b\u044f PostgreSQL \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"language-bash\">apt-get install libpq-dev python3-psycopg2\npip3 install psycopg2-binary\n<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"language-bash\">vi \/etc\/alertad.conf\n<\/code><\/pre>\n<pre><code class=\"language-python\">CORS_ORIGINS = [\n    'http:\/\/alerta.local',\n    'http:\/\/alerta.local:8000',\n    'http:\/\/alerta.local:8080',\n    'http:\/\/alerta.local:8081',\n    r'https?:\/\/w*.?local.alerta.io:?d*\/?.*'\n]\n<\/code><\/pre>\n<p><strong>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043c\u0435\u043d <code>alerta.local<\/code> \u2014 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439.<\/strong><\/p>\n<p>\u0414\u043b\u044f PostgreSQL \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"language-python\">DATABASE_URL = 'postgresql:\/\/alerta:alerta123@localhost'\nDATABASE_NAME = 'alerta'\n<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code class=\"language-bash\">alertad run --port 8080\n<\/code><\/pre>\n<pre><code>Running on http:\/\/127.0.0.1:8080\/ (Press CTRL+C to quit)\n<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 SSH-\u0441\u0435\u0441\u0441\u0438\u0438:<\/p>\n<pre><code class=\"language-bash\">ss -tunlp | grep 8080\n<\/code><\/pre>\n<pre><code>tcp LISTEN 0 128 127.0.0.1:8080 *:* users:((&quot;alertad&quot;,pid=7729,fd=4))\n<\/code><\/pre>\n<hr \/>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/h2>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430<\/h3>\n<pre><code class=\"language-bash\">mkdir -p \/var\/www\/alerta\nwget https:\/\/github.com\/alerta\/alerta-webui\/releases\/latest\/download\/alerta-webui.tar.gz\ntar zxvf alerta-webui.tar.gz -C \/var\/www\/alerta --strip-components 1\n<\/code><\/pre>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 NGINX<\/h3>\n<p>\u041f\u0440\u0430\u0432\u0438\u043c endpoint \u043a\u043e\u043d\u0441\u043e\u043b\u0438:<\/p>\n<pre><code class=\"language-bash\">vi \/var\/www\/alerta\/config.json\n<\/code><\/pre>\n<pre><code class=\"language-json\">{&quot;endpoint&quot;: &quot;http:\/\/alerta.local:8081&quot;}\n<\/code><\/pre>\n<p><strong>\u041c\u0435\u043d\u044f\u0435\u043c <code>localhost<\/code> \u043d\u0430 \u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d \u0438 \u043f\u043e\u0440\u0442 <code>8080<\/code> \u043d\u0430 <code>8081<\/code>.<\/strong><\/p>\n<pre><code class=\"language-bash\">apt-get install nginx\n<\/code><\/pre>\n<pre><code class=\"language-bash\">vi \/etc\/nginx\/conf.d\/alerta.conf\n<\/code><\/pre>\n<pre><code class=\"language-nginx\">server {\n    listen 80;\n    server_name alerta.local;\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:8000\/;\n        proxy_redirect     off;\n        proxy_set_header   Host             $host;\n        proxy_set_header   X-Real-IP        $remote_addr;\n        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;\n    }\n    rewrite \/alerts.* \/ permanent;\n}\n\nserver {\n    listen 8081;\n    server_name alerta.local;\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:8080\/;\n        proxy_redirect     off;\n        proxy_set_header   Host             $host;\n        proxy_set_header   X-Real-IP        $remote_addr;\n        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;\n    }\n}\n<\/code><\/pre>\n<p><strong>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>alerta.local<\/code> \u043d\u0430 \u0441\u0432\u043e\u0451 \u0438\u043c\u044f.<\/strong><\/p>\n<pre><code class=\"language-bash\">systemctl enable nginx\nsystemctl restart nginx\n<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/p>\n<pre><code class=\"language-bash\">cd \/var\/www\/alerta &amp;&amp; python3 -m http.server 8000\n<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <code>http:\/\/alerta.local<\/code> (\u0438\u043c\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c\u0441\u044f \u0432 DNS \u0438\u043b\u0438 \u0431\u044b\u0442\u044c \u0432 <code>hosts<\/code>) \u2014 \u0443\u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c Alerta.<\/p>\n<hr \/>\n<h2>\u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0442\u0440\u0435\u0432\u043e\u0433\u0438<\/h2>\n<pre><code class=\"language-bash\">pip3 install alerta\nalerta send -r server01 -e NotPing -E Production -S Website -s major -t &quot;Server01 is down.&quot; -v ERROR\n<\/code><\/pre>\n<p>\u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<hr \/>\n<h2>\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a<\/h2>\n<h3>Alertad<\/h3>\n<pre><code class=\"language-bash\">vi \/etc\/systemd\/system\/alertad.service\n<\/code><\/pre>\n<pre><code>[Unit]\nDescription=Alerta Service\nAfter=network.target\n\n[Service]\nType=simple\nExecStart=\/usr\/local\/bin\/alertad run --port 8080\nExecReload=\/bin\/kill -HUP $MAINPID\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n<\/code><\/pre>\n<pre><code class=\"language-bash\">systemctl daemon-reload\nsystemctl enable alertad\nsystemctl start alertad\n<\/code><\/pre>\n<h3>\u0412\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/h3>\n<pre><code class=\"language-bash\">vi \/etc\/systemd\/system\/alertaweb.service\n<\/code><\/pre>\n<pre><code>[Unit]\nDescription=Alerta Web Service\nAfter=network.target\n\n[Service]\nType=simple\nWorkingDirectory=\/var\/www\/alerta\nExecStart=\/usr\/bin\/python3 -m http.server 8000\nExecReload=\/bin\/kill -HUP $MAINPID\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n<\/code><\/pre>\n<pre><code class=\"language-bash\">systemctl daemon-reload\nsystemctl enable alertaweb\nsystemctl start alertaweb\n<\/code><\/pre>\n<hr \/>\n<h2>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 Active Directory<\/h2>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f python-ldap:<\/p>\n<pre><code class=\"language-bash\">apt-get install libpq-dev python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev\npip3 install python-ldap\n<\/code><\/pre>\n<pre><code class=\"language-bash\">vi \/etc\/alertad.conf\n<\/code><\/pre>\n<pre><code class=\"language-python\">AUTH_REQUIRED = True\nAUTH_PROVIDER = 'ldap'\nADMIN_USERS = ['mosk@imaxis.local']\nLDAP_URL = 'ldap:\/\/ldap-server:389'\nLDAP_DOMAINS = {\n    'imaxis.local': 'cn=%s,ou=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438,dc=imaxis,dc=local'\n}\nLDAP_DOMAINS_BASEDN = {\n    'imaxis.local': 'dc=imaxis,dc=local'\n}\n<\/code><\/pre>\n<p>\u0433\u0434\u0435:<\/p>\n<ul>\n<li><code>AUTH_REQUIRED<\/code> \u2014 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Alerta \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0432\u0445\u043e\u0434);<\/li>\n<li><code>AUTH_PROVIDER<\/code> \u2014 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438;<\/li>\n<li><code>ADMIN_USERS<\/code> \u2014 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430;<\/li>\n<li><code>LDAP_URL<\/code> \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 AD DS;<\/li>\n<li><code>LDAP_DOMAINS<\/code> \u2014 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e\u0438\u0441\u043a\u0430 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439;<\/li>\n<li><code>LDAP_DOMAINS_BASEDN<\/code> \u2014 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u043e\u043c\u0435\u043d\u0430.<\/li>\n<\/ul>\n<p><strong>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a <code>ldap-server<\/code>, \u043f\u043e\u0438\u0441\u043a \u043f\u043e <code>cn<\/code> (\u043b\u043e\u0433\u0438\u043d) \u0432 OU \u00ab\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438\u00bb \u0434\u043e\u043c\u0435\u043d\u0430 <code>imaxis.local<\/code>.<\/strong><\/p>\n<pre><code class=\"language-bash\">systemctl restart alertad\n<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 email \u0432\u0438\u0434\u0430 <code>&lt;\u043b\u043e\u0433\u0438\u043d&gt;@&lt;\u0434\u043e\u043c\u0435\u043d&gt;<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>master@imaxis.local<\/code>. \u0423\u0447\u0442\u0438\u0442\u0435: Alerta \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u0431\u0435\u0440\u0451\u0442 <code>cn<\/code> \u0438\u0437 AD, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 email \u2014 \u0438\u043c\u0435\u043d\u0430 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043b\u0430\u0442\u0438\u043d\u0438\u0446\u0435\u0439.<\/p>\n<hr \/>\n<h2>\u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<pre><code class=\"language-bash\">vi \/etc\/alertad.conf\n<\/code><\/pre>\n<pre><code class=\"language-python\">LOG_HANDLERS = ['console', 'file']\nLOG_FILE = '\/var\/log\/alertad.log'\nLOG_MAX_BYTES = 5*1024*1024\nLOG_BACKUP_COUNT = 2\nLOG_FORMAT = 'verbose'\n<\/code><\/pre>\n<pre><code class=\"language-bash\">systemctl restart alertad\ntail -f \/var\/log\/alertad.log\n<\/code><\/pre>\n<hr \/>\n<h2>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h2>\n<h3>Alerta Server<\/h3>\n<pre><code class=\"language-bash\">pip3 install --upgrade pip\npip3 install --upgrade alerta-server\nsystemctl restart alertad\n<\/code><\/pre>\n<h3>\u0412\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/h3>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <a href=\"https:\/\/github.com\/alerta\/alerta-webui\/releases\/latest\/\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0435\u043b\u0438\u0437\u043e\u0432<\/a>. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u0435\u0436\u0438\u0439 \u0430\u0440\u0445\u0438\u0432 (\u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c):<\/p>\n<pre><code class=\"language-bash\">rm alerta-webui.tar.gz\nwget https:\/\/github.com\/alerta\/alerta-webui\/releases\/latest\/download\/alerta-webui.tar.gz\n<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u0440\u0442\u0430\u043b:<\/p>\n<pre><code class=\"language-bash\">mkdir -p \/backup\/alerta_web\nmv \/var\/www\/alerta \/backup\/alerta_web\/alerta_old_`date +%Y-%m-%d`\nmkdir \/var\/www\/alerta\ntar zxvf alerta-webui.tar.gz -C \/var\/www\/alerta --strip-components 1\ncp \/backup\/alerta_web\/alerta_old_`date +%Y-%m-%d`\/config.json \/var\/www\/alerta\/\nsystemctl restart alertaweb\n<\/code><\/pre>\n<hr \/>\n<h2>\u0422\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438<\/h2>\n<ul>\n<li><strong>\u041f\u0430\u043a\u0435\u0442 <code>mongodb<\/code> \u0443\u0431\u0440\u0430\u043d \u0438\u0437 Ubuntu<\/strong> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>mongodb-org<\/code> \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f MongoDB.<\/li>\n<li><strong><code>python-psycopg2<\/code> \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442<\/strong> \u2014 \u0434\u043b\u044f Python 3 \u044d\u0442\u043e <code>python3-psycopg2<\/code> \u0438 <code>psycopg2-binary<\/code> \u0438\u0437 pip.<\/li>\n<li><strong>\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0442\u0440\u043e\u043a \u0432 <code>pg_hba.conf<\/code><\/strong> \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>md5<\/code> \u0434\u043b\u044f <code>alerta<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u0442\u043e\u044f\u0442\u044c <strong>\u0432\u044b\u0448\u0435<\/strong> <code>peer<\/code>, \u0438\u043d\u0430\u0447\u0435 \u043e\u043d\u043e \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/li>\n<li><strong>CORS \u0438 endpoint<\/strong> \u2014 \u0434\u043e\u043c\u0435\u043d \u0432 <code>CORS_ORIGINS<\/code> \u0438 <code>config.json<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c, \u0438\u043d\u0430\u0447\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u0442 API.<\/li>\n<li><strong>\u041d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438<\/strong> \u2014 <code>python3 -m http.server<\/code> \u043e\u0442\u0434\u0430\u0451\u0442 \u0441\u0442\u0430\u0442\u0438\u043a\u0443 \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438; \u043f\u0440\u044f\u0447\u044c\u0442\u0435 \u0437\u0430 NGINX.<\/li>\n<li><strong>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f AD<\/strong> \u2014 \u0438\u043c\u0435\u043d\u0430 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043b\u0430\u0442\u0438\u043d\u0438\u0446\u0435\u0439, \u0432\u0445\u043e\u0434 \u043f\u043e email.<\/li>\n<\/ul>\n<hr \/>\n<h2>\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430<\/h2>\n<pre><code class=\"language-bash\">apt-get install python3-pip nginx\npip3 install alerta-server\nvi \/etc\/alertad.conf          # DATABASE_URL, CORS_ORIGINS\nalertad run --port 8080\nmkdir -p \/var\/www\/alerta\nwget https:\/\/github.com\/alerta\/alerta-webui\/releases\/latest\/download\/alerta-webui.tar.gz\ntar zxvf alerta-webui.tar.gz -C \/var\/www\/alerta --strip-components 1\nsystemctl enable alertad alertaweb nginx --now\n<\/code><\/pre>\n<p><em>\u041f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430: Ubuntu 22.04\/24.04\/26.04 + Alerta Server 9.1.0, WebUI 8.7.1.<\/em><br \/>\n<em>\u0414\u0430\u0442\u0430: \u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c 2026.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Alerta \u043d\u0430 Ubuntu: \u0441\u0435\u0440\u0432\u0435\u0440 \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0438 \u0432\u0435\u0431-\u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-793","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"views":9,"_links":{"self":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=793"}],"version-history":[{"count":3,"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts\/793\/revisions"}],"predecessor-version":[{"id":850,"href":"https:\/\/imaxis.ru\/index.php?rest_route=\/wp\/v2\/posts\/793\/revisions\/850"}],"wp:attachment":[{"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imaxis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}