{"id":366711,"date":"2024-05-21T03:05:51","date_gmt":"2024-05-21T03:05:51","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=366711"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T03:05:51","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=366711","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Dokku, Loki \u0438 Grafana<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0449\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u043a Dokku, Loki \u0438 Grafana. \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u0443\u044e \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. <\/p>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0428\u0430\u0433 1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Dokku<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Loki<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtai<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 4. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Grafana<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtail \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 Loki<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 6. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Grafana<\/p>\n<\/li>\n<\/ul>\n<h3>\u0428\u0430\u0433 1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Dokku <\/h3>\n<p><strong>Dokku<\/strong>\u00a0&#8212; \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 Docker, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Dokku \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Dokku:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>wget -NP . https:\/\/dokku.com\/bootstrap.sh<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>sudo DOKKU_TAG=v0.32.3 bash bootstrap.sh<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u0430:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku domains:set-global dokku.me<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 SSH-\u043a\u043b\u044e\u0447\u0430: \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435\u00a0<code>\"your-public-key-contents-here\"<\/code>\u00a0\u043d\u0430 \u0432\u0430\u0448 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 SSH-\u043a\u043b\u044e\u0447.  <\/p>\n<\/li>\n<\/ol>\n<pre><code>echo \"your-public-key-contents-here\" | dokku ssh-keys:add admin<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0443\u0442 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Dokku \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Dokku, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Ubuntu 22.04. \u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 Dokku v0.32.3, \u043d\u043e \u043e\u043d\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445.<\/p>\n<p>\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b http-auth \u0438 tls, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b:<\/p>\n<pre><code>dokku plugin:install https:\/\/github.com\/dokku\/dokku-http-auth.git dokku plugin:install https:\/\/github.com\/dokku\/dokku-letsencrypt.git<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u044b \u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<strong>.<\/strong><\/p>\n<ol start=\"5\">\n<li>\n<p>\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c Docker \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u043e\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &#171;grafana-bridge&#187;:<\/p>\n<pre><code>dokku network:create grafana-bridge<\/code><\/pre>\n<h2>\u0428\u0430\u0433 2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Loki<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Loki \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Loki:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku apps:create loki<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f Loki, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043b\u0443\u0448\u0430\u043b HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 80 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u043b \u0438\u0445 \u043d\u0430 \u043f\u043e\u0440\u0442 3100, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c Loki:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku ports:add loki http:80:3100<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Loki, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 Loki \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku config:set --no-restart loki DOKKU_DOCKERFILE_START_CMD=\"-config.file=\/etc\/loki\/loki-config.yaml\"<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/loki\/config touch \/var\/lib\/dokku\/data\/storage\/loki\/config\/loki-config.yaml<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0438 \u0444\u0430\u0439\u043b\u0430\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code>chown -R nobody:nogroup \/var\/lib\/dokku\/data\/storage\/loki<\/code><\/pre>\n<ol start=\"6\">\n<li>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Loki \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku storage:mount loki \/var\/lib\/dokku\/data\/storage\/loki\/config:\/etc\/loki<\/code><\/pre>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Loki<\/h4>\n<ol start=\"7\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0443\u0442\u0438: <code>\/var\/lib\/dokku\/data\/storage\/loki\/config\/loki\u2011config.yaml<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">auth_enabled: false  server:   http_listen_port: 3100  ingester:   lifecycler:     address: 127.0.0.1     ring:       kvstore:         store: inmemory       replication_factor: 1     final_sleep: 0s   chunk_idle_period: 1h   max_chunk_age: 1h   chunk_target_size: 1048576   chunk_retain_period: 30s   max_transfer_retries: 0  schema_config:   configs:     - from: 2020-10-24       store: boltdb-shipper       object_store: filesystem       schema: v11       index:         prefix: index_         period: 24h  storage_config:   boltdb_shipper:     active_index_directory: \/tmp\/loki\/boltdb-shipper-active     cache_location: \/tmp\/loki\/boltdb-shipper-cache     cache_ttl: 24h     shared_store: filesystem   filesystem:     directory: \/tmp\/loki\/chunks  compactor:   working_directory: \/tmp\/loki\/boltdb-shipper-compactor   shared_store: filesystem  limits_config:   reject_old_samples: true   reject_old_samples_max_age: 168h  chunk_store_config:   max_look_back_period: 0s  table_manager:   retention_deletes_enabled: false   retention_period: 0s  ruler:   storage:     type: local     local:       directory: \/tmp\/loki\/rules   rule_path: \/tmp\/loki\/rules-temp   alertmanager_url: http:\/\/localhost:9093   ring:     kvstore:       store: inmemory   enable_api: true<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ol start=\"8\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki.  <\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0414\u043e\u043c\u0435\u043d\u0430:<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f Grafana:\u00a0 <code>dokku domains:set loki loki.dokku.me<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e DNS-\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f\u00a0<code>loki.dokku.me<\/code>\u00a0\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 Dokku.  <\/p>\n<\/li>\n<\/ul>\n<ol start=\"10\">\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 HTTPS:  <\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 HTTPS:  <\/p>\n<pre><code>dokku letsencrypt:enable loki<\/code><\/pre>\n<p>10. \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 HTTP-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Loki. \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435\u00a0<code>&lt;username><\/code>\u00a0\u0438\u00a0<code>&lt;password><\/code>\u00a0\u043d\u0430 \u0432\u0430\u0448\u0443 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044f:  <\/p>\n<pre><code>dokku http-auth:on loki &lt;username> &lt;password><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Loki \u0434\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0430 \u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Dokku.  <\/p>\n<h2>\u0428\u0430\u0433 3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtail<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Promtail \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:  <\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Promtail:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku apps:create promtail<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Promtail, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 Promtail \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku config:set --no-restart promtail DOKKU_DOCKERFILE_START_CMD=\"-config.file=\/etc\/promtail\/promtail-config.yaml\"<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/promtail\/config touch \/var\/lib\/dokku\/data\/storage\/promtail\/config\/promtail-config.yaml<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0438 \u0444\u0430\u0439\u043b\u0430\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code>chown -R nobody:nogroup \/var\/lib\/dokku\/data\/storage\/promtail<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Promtail:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku storage:mount promtail \/var\/lib\/dokku\/data\/storage\/promtail\/config:\/etc\/promtail<\/code><\/pre>\n<ol start=\"6\">\n<li>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432\u00a0<code>\/var\/log<\/code>\u00a0\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Promtail:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku storage:mount promtail \/var\/log:\/var\/log<\/code><\/pre>\n<ol start=\"7\">\n<li>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Promtail \u043a \u0441\u0435\u0442\u0438\u00a0<code>grafana-bridge<\/code>\u00a0\u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku network:set promtail attach-post-deploy grafana-bridge<\/code><\/pre>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Promtail<\/h4>\n<ol start=\"8\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0443\u0442\u0438: <code>\/var\/lib\/dokku\/data\/storage\/promtail\/config\/promtail-config.yaml<\/code>\u00a0  <\/p>\n<\/li>\n<\/ol>\n<p>\u00a0\u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">server:   http_listen_port: 9080   grpc_listen_port: 0  positions:   filename: \/tmp\/positions.yaml  clients:   - url: http:\/\/loki.web:3100\/loki\/api\/v1\/push  scrape_configs:   - job_name: system     static_configs:       - targets:           - localhost         labels:           job: varlogs           __path__: \/var\/log\/*log       - targets:           - localhost         labels:           job: nginx           __path__: \/var\/log\/nginx\/*log<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ol start=\"9\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail.  <\/p>\n<\/li>\n<\/ol>\n<h4>\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Promtail<\/h4>\n<ol start=\"11\">\n<li>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Promtail \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku git:from-image promtail grafana\/promtail<\/code><\/pre>\n<ol start=\"12\">\n<li>\n<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Promtail, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku domains:disable promtail<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Promtail \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Loki \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Dokku.  <\/p>\n<h2>\u0428\u0430\u0433 4. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Grafana<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Grafana \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:  <\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Grafana:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku apps:create grafana<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f Grafana, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043b\u0443\u0448\u0430\u043b HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 80 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u043b \u0438\u0445 \u043d\u0430 \u043f\u043e\u0440\u0442 3000, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c Grafana:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku ports:add grafana http:80:3000<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Grafana, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432:<\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/grafana\/{config,data,plugins}<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/grafana\/config\/provisioning\/datasources<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0438 \u0444\u0430\u0439\u043b\u0430\u043c:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>chown -R 472:472 \/var\/lib\/dokku\/data\/storage\/grafana<\/code><\/pre>\n<p>6.\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Grafana, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432:  <\/p>\n<pre><code>dokku storage:mount grafana \/var\/lib\/dokku\/data\/storage\/grafana\/config\/provisioning\/datasources:\/etc\/grafana\/provisioning\/datasources dokku storage:mount grafana \/var\/lib\/dokku\/data\/storage\/grafana\/data:\/var\/lib\/grafana dokku storage:mount grafana \/var\/lib\/dokku\/data\/storage\/grafana\/plugins:\/var\/lib\/grafana\/plugins<\/code><\/pre>\n<p>7.\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Loki:  <\/p>\n<pre><code>nano \/var\/lib\/dokku\/data\/storage\/grafana\/config\/provisioning\/datasources\/loki.yml<\/code><\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<pre><code class=\"yaml\">datasources:   - name: Loki     type: loki     access: proxy     orgId: 1     url: http:\/\/loki.web:3100     basicAuth: false     isDefault: false     version: 1     editable: true<\/code><\/pre>\n<ol start=\"8\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Grafana \u043a \u0441\u0435\u0442\u0438\u00a0<code>grafana-bridge<\/code>\u00a0\u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku network:set grafana attach-post-deploy grafana-bridge<\/code><\/pre>\n<ol start=\"10\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0414\u043e\u043c\u0435\u043d\u0430:  <\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f Grafana:  <\/p>\n<pre><code>dokku domains:set grafana grafana.dokku.me<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e DNS-\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f\u00a0<code>grafana.dokku.me<\/code>\u00a0\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 Dokku.  <\/p>\n<ol start=\"11\">\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 HTTPS:<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 HTTPS:<\/p>\n<pre><code>dokku letsencrypt:enable grafana<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Grafana \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c\u00a0<code>grafana.kaido.team<\/code>\u00a0\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c HTTPS \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c.  <\/p>\n<h2>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtail \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 Loki<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Promtail \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u0445 \u0432 Loki, \u0443\u0447\u0442\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:  <\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 Promtail \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">server:   http_listen_port: 9080   grpc_listen_port: 0  positions:   filename: \/tmp\/positions.yaml  clients:   - url: http:\/\/loki.dokku.me:3100\/loki\/api\/v1\/push     basic_auth_user: \u0432\u0430\u0448_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c     basic_auth_password: \u0432\u0430\u0448_\u043f\u0430\u0440\u043e\u043b\u044c  scrape_configs:   - job_name: json_logs     static_configs:       - targets:           - \/\u043f\u0443\u0442\u044c\/\u043a\/\u0444\u0430\u0439\u043b\u0443.json  # \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043f\u0443\u0442\u044c \u043a JSON-\u043b\u043e\u0433 \u0444\u0430\u0439\u043b\u0443 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435         labels:           job: json_logs<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p><code>http_listen_port<\/code>\u00a0\u0438\u00a0<code>grpc_listen_port<\/code>\u00a0&#8212; \u044d\u0442\u043e \u043f\u043e\u0440\u0442\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 Promtail \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u044c HTTP \u0438 gRPC \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><code>clients<\/code>\u00a0&#8212; \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 Loki, \u043a\u0443\u0434\u0430 Promtail \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043b\u043e\u0433\u0438. \u0423\u043a\u0430\u0436\u0438\u0442\u0435\u00a0<code>basic_auth_user<\/code>\u00a0\u0438\u00a0<code>basic_auth_password<\/code>\u00a0\u0434\u043b\u044f HTTP-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Loki.<\/p>\n<\/li>\n<li>\n<p><code>scrape_configs<\/code>\u00a0&#8212; \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043b\u043e\u0433\u043e\u0432. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c\u00a0<code>json_logs<\/code>\u00a0\u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433 \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<\/li>\n<li>\n<p><code>targets<\/code>\u00a0&#8212; \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435\u00a0<code>\/\u043f\u0443\u0442\u044c\/\u043a\/\u0444\u0430\u0439\u043b\u0443.json<\/code>\u00a0\u043d\u0430 \u043f\u0443\u0442\u044c \u043a JSON-\u043b\u043e\u0433 \u0444\u0430\u0439\u043b\u0443 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<\/li>\n<\/ul>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432  <code>\/etc\/promtail\/promtail-config.yaml<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c Promtail \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c JSON-\u043b\u043e\u0433 \u0444\u0430\u0439\u043b \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0432 Loki \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c HTTP-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Loki, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u043c \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Grafana.  <\/p>\n<h3>\u0428\u0430\u0433 6. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Grafana<\/h3>\n<h4>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u043e\u0432<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c72\/214\/230\/c72214230e2f147c3c8da05362935c88.png\" alt=\"\" title=\"\" width=\"1122\" height=\"428\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c72\/214\/230\/c72214230e2f147c3c8da05362935c88.png\"\/><\/figure>\n<ol>\n<li>\n<p>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Grafana\u00a0<code>https:\/\/grafana.dokku.me<\/code>.  <\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 Grafana \u0441 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 login: admin password: admin (\u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b &#171;Explore&#187; \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 Grafana.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;Explore&#187; \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 Loki \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0430\u0448\u0438\u0445 JSON-\u043b\u043e\u0433\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043f\u043e\u043b\u0435 &#171;Log labels&#187; \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c\u00a0<code>job<\/code>\u00a0\u0432 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u043f\u043e\u00a0<code>job_name<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Loki \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u0432\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Grafana \u0438 Loki. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u043f\u0430\u043d\u0435\u043b\u0438 \u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Dokku, Loki \u0438 Grafana \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u043e\u0449\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u042d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0427\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e Dokku \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, Loki \u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u043e\u0432 \u0438 Grafana \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0438\u0445 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435.<\/p>\n<p>\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Dokku \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 Grafana \u0438 Promtail. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043d\u043e \u0438 \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0433\u0434\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u044b \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b, \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0432 \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/789954\/\"> https:\/\/habr.com\/ru\/articles\/789954\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u0438\u0445 \u043c\u043e\u0449\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u043a Dokku, Loki \u0438 Grafana. \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u0443\u044e \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. <\/p>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0428\u0430\u0433 1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Dokku<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Loki<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtai<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 4. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Grafana<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtail \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 Loki<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433 6. \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Grafana<\/p>\n<\/li>\n<\/ul>\n<h3>\u0428\u0430\u0433 1. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Dokku <\/h3>\n<p><strong>Dokku<\/strong>\u00a0&#8212; \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 Docker, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Dokku \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Dokku:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>wget -NP . https:\/\/dokku.com\/bootstrap.sh<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>sudo DOKKU_TAG=v0.32.3 bash bootstrap.sh<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u0430:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku domains:set-global dokku.me<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 SSH-\u043a\u043b\u044e\u0447\u0430: \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435\u00a0<code>\"your-public-key-contents-here\"<\/code>\u00a0\u043d\u0430 \u0432\u0430\u0448 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 SSH-\u043a\u043b\u044e\u0447.  <\/p>\n<\/li>\n<\/ol>\n<pre><code>echo \"your-public-key-contents-here\" | dokku ssh-keys:add admin<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0443\u0442 \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Dokku \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Dokku, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Ubuntu 22.04. \u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 Dokku v0.32.3, \u043d\u043e \u043e\u043d\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445.<\/p>\n<p>\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b http-auth \u0438 tls, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b:<\/p>\n<pre><code>dokku plugin:install https:\/\/github.com\/dokku\/dokku-http-auth.git dokku plugin:install https:\/\/github.com\/dokku\/dokku-letsencrypt.git<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u044b \u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b<strong>.<\/strong><\/p>\n<ol start=\"5\">\n<li>\n<p>\u0421\u0435\u0442\u0435\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043d\u0443\u044e \u0441\u0435\u0442\u044c Docker \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u043e\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &#171;grafana-bridge&#187;:<\/p>\n<pre><code>dokku network:create grafana-bridge<\/code><\/pre>\n<h2>\u0428\u0430\u0433 2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Loki<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Loki \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Loki:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku apps:create loki<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f Loki, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043b\u0443\u0448\u0430\u043b HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 80 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u043b \u0438\u0445 \u043d\u0430 \u043f\u043e\u0440\u0442 3100, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c Loki:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku ports:add loki http:80:3100<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Loki, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 Loki \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku config:set --no-restart loki DOKKU_DOCKERFILE_START_CMD=\"-config.file=\/etc\/loki\/loki-config.yaml\"<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/loki\/config touch \/var\/lib\/dokku\/data\/storage\/loki\/config\/loki-config.yaml<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0438 \u0444\u0430\u0439\u043b\u0430\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code>chown -R nobody:nogroup \/var\/lib\/dokku\/data\/storage\/loki<\/code><\/pre>\n<ol start=\"6\">\n<li>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Loki \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku storage:mount loki \/var\/lib\/dokku\/data\/storage\/loki\/config:\/etc\/loki<\/code><\/pre>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Loki<\/h4>\n<ol start=\"7\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0443\u0442\u0438: <code>\/var\/lib\/dokku\/data\/storage\/loki\/config\/loki\u2011config.yaml<\/code><\/p>\n<\/li>\n<\/ol>\n<p>\u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">auth_enabled: false  server:   http_listen_port: 3100  ingester:   lifecycler:     address: 127.0.0.1     ring:       kvstore:         store: inmemory       replication_factor: 1     final_sleep: 0s   chunk_idle_period: 1h   max_chunk_age: 1h   chunk_target_size: 1048576   chunk_retain_period: 30s   max_transfer_retries: 0  schema_config:   configs:     - from: 2020-10-24       store: boltdb-shipper       object_store: filesystem       schema: v11       index:         prefix: index_         period: 24h  storage_config:   boltdb_shipper:     active_index_directory: \/tmp\/loki\/boltdb-shipper-active     cache_location: \/tmp\/loki\/boltdb-shipper-cache     cache_ttl: 24h     shared_store: filesystem   filesystem:     directory: \/tmp\/loki\/chunks  compactor:   working_directory: \/tmp\/loki\/boltdb-shipper-compactor   shared_store: filesystem  limits_config:   reject_old_samples: true   reject_old_samples_max_age: 168h  chunk_store_config:   max_look_back_period: 0s  table_manager:   retention_deletes_enabled: false   retention_period: 0s  ruler:   storage:     type: local     local:       directory: \/tmp\/loki\/rules   rule_path: \/tmp\/loki\/rules-temp   alertmanager_url: http:\/\/localhost:9093   ring:     kvstore:       store: inmemory   enable_api: true<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ol start=\"8\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Loki.  <\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0414\u043e\u043c\u0435\u043d\u0430:<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f Grafana:\u00a0 <code>dokku domains:set loki loki.dokku.me<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e DNS-\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f\u00a0<code>loki.dokku.me<\/code>\u00a0\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 Dokku.  <\/p>\n<\/li>\n<\/ul>\n<ol start=\"10\">\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 HTTPS:  <\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 HTTPS:  <\/p>\n<pre><code>dokku letsencrypt:enable loki<\/code><\/pre>\n<p>10. \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 HTTP-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Loki. \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435\u00a0<code>&lt;username><\/code>\u00a0\u0438\u00a0<code>&lt;password><\/code>\u00a0\u043d\u0430 \u0432\u0430\u0448\u0443 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044f:  <\/p>\n<pre><code>dokku http-auth:on loki &lt;username> &lt;password><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Loki \u0434\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0430 \u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Dokku.  <\/p>\n<h2>\u0428\u0430\u0433 3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtail<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Promtail \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:  <\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Promtail:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku apps:create promtail<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Promtail, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 Promtail \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku config:set --no-restart promtail DOKKU_DOCKERFILE_START_CMD=\"-config.file=\/etc\/promtail\/promtail-config.yaml\"<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/promtail\/config touch \/var\/lib\/dokku\/data\/storage\/promtail\/config\/promtail-config.yaml<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0438 \u0444\u0430\u0439\u043b\u0430\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code>chown -R nobody:nogroup \/var\/lib\/dokku\/data\/storage\/promtail<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Promtail:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku storage:mount promtail \/var\/lib\/dokku\/data\/storage\/promtail\/config:\/etc\/promtail<\/code><\/pre>\n<ol start=\"6\">\n<li>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432\u00a0<code>\/var\/log<\/code>\u00a0\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 Promtail:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku storage:mount promtail \/var\/log:\/var\/log<\/code><\/pre>\n<ol start=\"7\">\n<li>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Promtail \u043a \u0441\u0435\u0442\u0438\u00a0<code>grafana-bridge<\/code>\u00a0\u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku network:set promtail attach-post-deploy grafana-bridge<\/code><\/pre>\n<h4>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Promtail<\/h4>\n<ol start=\"8\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0443\u0442\u0438: <code>\/var\/lib\/dokku\/data\/storage\/promtail\/config\/promtail-config.yaml<\/code>\u00a0  <\/p>\n<\/li>\n<\/ol>\n<p>\u00a0\u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\">server:   http_listen_port: 9080   grpc_listen_port: 0  positions:   filename: \/tmp\/positions.yaml  clients:   - url: http:\/\/loki.web:3100\/loki\/api\/v1\/push  scrape_configs:   - job_name: system     static_configs:       - targets:           - localhost         labels:           job: varlogs           __path__: \/var\/log\/*log       - targets:           - localhost         labels:           job: nginx           __path__: \/var\/log\/nginx\/*log<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ol start=\"9\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail.  <\/p>\n<\/li>\n<\/ol>\n<h4>\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Promtail<\/h4>\n<ol start=\"11\">\n<li>\n<p>\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Promtail \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku git:from-image promtail grafana\/promtail<\/code><\/pre>\n<ol start=\"12\">\n<li>\n<p>\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Promtail, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku domains:disable promtail<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Promtail \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Loki \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Dokku.  <\/p>\n<h2>\u0428\u0430\u0433 4. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Grafana<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Grafana \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:  <\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Grafana:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku apps:create grafana<\/code><\/pre>\n<ol start=\"2\">\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f Grafana, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u043b\u0443\u0448\u0430\u043b HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 80 \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u043b \u0438\u0445 \u043d\u0430 \u043f\u043e\u0440\u0442 3000, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c Grafana:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku ports:add grafana http:80:3000<\/code><\/pre>\n<ol start=\"3\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0430\u0436\u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Grafana, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432:<\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/grafana\/{config,data,plugins}<\/code><\/pre>\n<ol start=\"4\">\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>mkdir -p \/var\/lib\/dokku\/data\/storage\/grafana\/config\/provisioning\/datasources<\/code><\/pre>\n<ol start=\"5\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0438 \u0444\u0430\u0439\u043b\u0430\u043c:  <\/p>\n<\/li>\n<\/ol>\n<pre><code>chown -R 472:472 \/var\/lib\/dokku\/data\/storage\/grafana<\/code><\/pre>\n<p>6.\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Grafana, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432:  <\/p>\n<pre><code>dokku storage:mount grafana \/var\/lib\/dokku\/data\/storage\/grafana\/config\/provisioning\/datasources:\/etc\/grafana\/provisioning\/datasources dokku storage:mount grafana \/var\/lib\/dokku\/data\/storage\/grafana\/data:\/var\/lib\/grafana dokku storage:mount grafana \/var\/lib\/dokku\/data\/storage\/grafana\/plugins:\/var\/lib\/grafana\/plugins<\/code><\/pre>\n<p>7.\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Loki:  <\/p>\n<pre><code>nano \/var\/lib\/dokku\/data\/storage\/grafana\/config\/provisioning\/datasources\/loki.yml<\/code><\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:  <\/p>\n<pre><code class=\"yaml\">datasources:   - name: Loki     type: loki     access: proxy     orgId: 1     url: http:\/\/loki.web:3100     basicAuth: false     isDefault: false     version: 1     editable: true<\/code><\/pre>\n<ol start=\"8\">\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Grafana \u043a \u0441\u0435\u0442\u0438\u00a0<code>grafana-bridge<\/code>\u00a0\u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f:<\/p>\n<\/li>\n<\/ol>\n<pre><code>dokku network:set grafana attach-post-deploy grafana-bridge<\/code><\/pre>\n<ol start=\"10\">\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0414\u043e\u043c\u0435\u043d\u0430:  <\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f Grafana:  <\/p>\n<pre><code>dokku domains:set grafana grafana.dokku.me<\/code><\/pre>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e DNS-\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043b\u044f\u00a0<code>grafana.dokku.me<\/code>\u00a0\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 Dokku.  <\/p>\n<ol start=\"11\">\n<li>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 HTTPS:<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 HTTPS:<\/p>\n<pre><code>dokku letsencrypt:enable grafana<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Grafana \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c\u00a0<code>grafana.kaido.team<\/code>\u00a0\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c HTTPS \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c.  <\/p>\n<h2>\u0428\u0430\u0433 5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Promtail \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 Loki<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Promtail \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 JSON-\u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u0445 \u0432 Loki, \u0443\u0447\u0442\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:  <\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 Promtail \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Promtail \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"yaml\">server:   http_listen_port:<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-366711","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366711","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=366711"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366711\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}