{"id":465518,"date":"2025-07-01T15:25:02","date_gmt":"2025-07-01T15:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=465518"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=465518","title":{"rendered":"<span>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u201c\u043f\u043e-\u0432\u0437\u0440\u043e\u0441\u043b\u043e\u043c\u0443\u201d: \u043e\u043f\u044b\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f OpenTelemetry<\/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<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/15e\/ce4\/c82\/15ece4c82d84e3d8db301dc80eaa67f5.jpg\" width=\"869\" height=\"874\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/15e\/ce4\/c82\/15ece4c82d84e3d8db301dc80eaa67f5.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/15e\/ce4\/c82\/15ece4c82d84e3d8db301dc80eaa67f5.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043c\u043e\u0438\u0445 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u2014 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u0437\u043e\u043d\u043e\u0439 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0431\u043e\u0440 \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u0438: \u043c\u0435\u0442\u0440\u0438\u043a, \u043b\u043e\u0433\u043e\u0432 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a. \u041f\u0440\u043e\u0441\u0442\u044b\u0435 Prometheus-\u0430\u0433\u0435\u043d\u0442\u044b \u0443\u0436\u0435 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c: \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0433\u0438\u0431\u043a\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0435\u0434\u0438\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0434\u0430 \u0438 \u0447\u0438\u0441\u043b\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0432 \u043d\u0438\u0445 \u0441\u0442\u0430\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043b\u044e\u0431\u044b\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u0441 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u2014 \u043a\u043d\u0438\u0433\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u044f\u0442 \u0447\u0430\u0441\u044b \u0433\u0443\u0433\u043b\u0438\u00ad\u043d\u0433\u0430 \u0438 \u0441\u043f\u0430\u0441\u0430\u044e\u0442 \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0443\u043f\u0430\u043b \u043d\u0430 \u0441\u0442\u0435\u043a OpenTelemetry \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c\u0438 open-source \u0431\u044d\u043a\u0435\u043d\u0434\u0430\u043c\u0438: Prometheus, Loki, Tempo \u0438 Grafana. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b2\/704\/616\/3b270461641a0248b974bb23821c2dbb.jpg\" alt=\"\u0421 \u0447\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u0442\u044c\" title=\"\u0421 \u0447\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u0442\u044c\" width=\"887\" height=\"1280\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3b2\/704\/616\/3b270461641a0248b974bb23821c2dbb.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b2\/704\/616\/3b270461641a0248b974bb23821c2dbb.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421 \u0447\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u0442\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/open-telemetry\/opentelemetry-collector-contrib\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u0443\u043c\u0430\u0445 \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443.<\/p>\n<h2>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f <\/h2>\n<ol>\n<li>\n<p><strong>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f<\/strong>: \u0432\u0441\u0451 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Collector-\u044b \u043d\u0430 \u0443\u0437\u043b\u0430\u0445<\/strong>: \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0433\u0435\u043d\u0442 \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u0430 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0433\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438 \u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 Ansible.<\/p>\n<\/li>\n<li>\n<p><strong>\u0415\u0434\u0438\u043d\u044b\u0439 \u0448\u043b\u044e\u0437 (Gateway)<\/strong>: \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u0442\u0438\u043f\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/strong>: Prometheus, Loki, Tempo.  <\/p>\n<\/li>\n<li>\n<p><strong>Grafana<\/strong>: \u0435\u0434\u0438\u043d\u044b\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u0438 \u0430\u043b\u0435\u0440\u0442\u044b.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<div class=\"persona\"><img decoding=\"async\" class=\"image persona__image\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bde\/d41\/6bb\/bded416bb2ec47a6b09d7c9838bb8d5d.jpg\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bde\/d41\/6bb\/bded416bb2ec47a6b09d7c9838bb8d5d.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bde\/d41\/6bb\/bded416bb2ec47a6b09d7c9838bb8d5d.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<h5 class=\"persona__heading\">\u041c\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043a\u0430\u043d\u0430\u043b &#8212; \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e, \u0433\u0434\u0435 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c<\/h5>\n<p class=\"persona__text\"><a href=\"https:\/\/t.me\/IT_Chuyana\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/t.me\/IT_Chuyana<\/strong> <\/a><\/p>\n<\/div>\n<hr\/>\n<h2>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430  <\/h2>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f77\/227\/677\/f772276773ee0fbe36b1e312f25829d1.jpg\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430\" title=\"\u0421\u0445\u0435\u043c\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430\" width=\"1477\" height=\"725\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f77\/227\/677\/f772276773ee0fbe36b1e312f25829d1.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f77\/227\/677\/f772276773ee0fbe36b1e312f25829d1.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0443\u0445 \u0430\u0433\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440-\u0430\u0433\u0435\u043d\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u0447\u0435\u0440\u0435\u0437 Ansible, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0445\u043e\u0441\u0442\u043e\u0432. \u041e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u044b \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/05e\/b2e\/f95\/05eb2ef95ea3a116d31adf7def042dcb.jpg\" alt=\"\u041b\u0438\u0447\u043d\u043e \u044f \u043b\u044e\u0431\u043b\u044e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043e\u0434\u043d\u0438\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c\" title=\"\u041b\u0438\u0447\u043d\u043e \u044f \u043b\u044e\u0431\u043b\u044e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043e\u0434\u043d\u0438\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c\" width=\"935\" height=\"677\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/05e\/b2e\/f95\/05eb2ef95ea3a116d31adf7def042dcb.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/05e\/b2e\/f95\/05eb2ef95ea3a116d31adf7def042dcb.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041b\u0438\u0447\u043d\u043e \u044f \u043b\u044e\u0431\u043b\u044e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043e\u0434\u043d\u0438\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440-\u0430\u0433\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043b\u043e\u0433\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0442\u0440\u0435\u0439\u0441\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0bd\/b74\/01d\/0bdb7401d7e64322d6c5edbe4b6db1df.png\" alt=\"\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0439\u0441\u044b \u0438 \u043b\u043e\u0433\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0441\u044a\u0435\u043c\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\" title=\"\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0439\u0441\u044b \u0438 \u043b\u043e\u0433\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0441\u044a\u0435\u043c\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\" width=\"936\" height=\"639\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0bd\/b74\/01d\/0bdb7401d7e64322d6c5edbe4b6db1df.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0bd\/b74\/01d\/0bdb7401d7e64322d6c5edbe4b6db1df.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0439\u0441\u044b \u0438 \u043b\u043e\u0433\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0441\u044a\u0435\u043c\u0435 \u043c\u0435\u0442\u0440\u0438\u043a<\/figcaption><\/div>\n<\/figure>\n<\/li>\n<\/ul>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">\u0423\u0440\u043e\u0432\u0435\u043d\u044c<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">\u042d\u043b\u0435\u043c\u0435\u043d\u0442<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">1.1<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Collector Agent<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0435\u0440\u0435\u0437 <strong>node-exporter<\/strong>, \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043b\u043e\u0433\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">1.2<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Collector Agent app<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>\/metrics<\/code> \u043e\u0442 SDK \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0438\u0442\u0430\u0435\u0442 \u043b\u043e\u0433\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0442\u0440\u0435\u0439\u0441\u044b.  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Collector Gateway  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0451 \u043f\u043e gRPC, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0435\u0439\u0431\u043b\u044b, \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430\u043c. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430  <\/p>\n<\/td>\n<td>\n<p align=\"left\">Prometheus \u2192 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, Loki \u2192 \u043b\u043e\u0433\u0438, Tempo \u2192 \u0442\u0440\u0435\u0439\u0441\u044b.  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Grafana  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0430\u0448\u0431\u043e\u0440\u0434\u044b, \u0430\u043b\u0435\u0440\u0442\u044b, \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0442\u0440\u0451\u0445 \u0432\u0438\u0434\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<hr\/>\n<h4>1.1 \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u044b \u0445\u043e\u0441\u0442\u0430 (Collector Agent)   <\/h4>\n<p><strong>Collector Agent<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0431\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0438 \u043b\u043e\u0433\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0441\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 <strong>Node Exporter<\/strong> (\u043c\u0435\u0442\u0440\u0438\u043a\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0441\u044f\u0442\u0441\u044f \u043b\u043e\u0433\u0438 <code>\/var\/log\/fail2ban.log<\/code> \u0438 <code>\/var\/log\/auth.log<\/code> \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.  \u041f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u043e\u0431\u043e\u0433\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043b\u0435\u0439\u0431\u043b\u0430\u043c\u0438\/\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0434\u0440.  <\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u043c\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker-Compose:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"> x-logging:  &amp;default-logging   driver: \"json-file\"   options:     max-size: \"10m\"     max-file: \"1\"     tag: \"{{.Name}}\"  x-common-labels: &amp;default-labels   logging: \"promtail\"   logging_jobname: \"containerlogs\"   stackname: \"docker-monitoring-stack-gpnc\"  services:  # --- monitoring   otel-collector-agent:     image: otel\/opentelemetry-collector-contrib:0.128.0     container_name: otel-collector-agent     restart: always     user: \"0:4\"     cpus: 0.15     mem_limit: 256m     ports:       - 4317:4317     volumes:       - \".\/configs\/otel-collector-agent\/config.yaml:\/etc\/otel-collector\/config.yaml:ro\"       - \"\/var\/log\/fail2ban.log:\/var\/log\/fail2ban.log:ro\"       - \"\/var\/log\/auth.log:\/var\/log\/auth.log:ro\"     command: [\"--config=\/etc\/otel-collector\/config.yaml\"]     environment:       - GATEWAY_ENDPOINT=${MONITOR_HOST}       - HOST_HOSTNAME=${HOST_HOSTNAME}     networks:       - monitor-net     depends_on:       - node-exporter     labels:       &lt;&lt;: *default-labels       component: \"otel-collector\"     logging: *default-logging    node-exporter:     image: prom\/node-exporter:v1.9.1     container_name: node-exporter     restart: always     cpus: 0.15     mem_limit: 256m     pid: \"host\"     volumes:       - \/proc:\/host\/proc:ro       - \/sys:\/host\/sys:ro       - \/:\/rootfs:ro     command:       - '--path.procfs=\/host\/proc'       - '--path.rootfs=\/rootfs'       - '--path.sysfs=\/host\/sys'       - '--collector.filesystem.ignored-mount-points=^\/(sys|proc|dev|host|etc)($$|\/)'     networks:       - monitor-net     labels:       &lt;&lt;: *default-labels       component: \"node-exporter\"     logging: *default-logging   networks:   monitor-net:     driver: bridge <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># configs\/otel-collector-agent\/config.yaml service:   pipelines:     metrics:       receivers: [prometheus]       processors: [batch]       exporters:          - otlp\/gateway         # - debug      logs:       receivers:          - filelog\/fail2ban         - filelog\/auth       processors:          - attributes\/custom         - attributes\/add_loki_label         - batch       exporters:          - otlp\/gateway         # - debug    # --- \u0442\u043e\u0447\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a exporters:   otlp\/gateway:     endpoint: \"${GATEWAY_ENDPOINT}:4317\"     tls:       insecure: true     timeout: 15s     sending_queue:       enabled: true       num_consumers: 10       queue_size: 5000     retry_on_failure:       enabled: true       initial_interval: 10s       max_interval: 30s       max_elapsed_time: 2m   # \u0443\u0440\u043e\u0432\u043d\u0438 \u0434\u0435\u0431\u0430\u0433\u0430 detailed, normal, basic   debug:     verbosity: detailed  receivers:   otlp:     protocols:       grpc:         endpoint: 0.0.0.0:4317       http:         endpoint: 0.0.0.0:4318    # \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435   filelog\/fail2ban:     include:       - \/var\/log\/fail2ban.log     poll_interval: 5s     start_at: end     include_file_path: true     include_file_name: true     operators:       # \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442       - type: add         field: attributes.service_name         value: fail2ban        - type: regex_parser         # ! \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 fail2ban-\u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438:         regex: '(?P&lt;timestamp&gt;\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}).*?(?P&lt;detected_level&gt;NOTICE|INFO)\\s+\\[(?P&lt;target&gt;[^\\]]+)\\] (?P&lt;msg&gt;.*)'         parse_to: attributes     filelog\/auth:     include:       - \/var\/log\/auth.log     poll_interval: 5s     start_at: end     include_file_path: true     include_file_name: true     operators:       # \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442       - type: add         field: attributes.service_name         value: auth        - type: regex_parser         regex: '.*New session\\s+(?P&lt;login_session&gt;\\d+)\\s+of user\\s+(?P&lt;login_user&gt;\\S+)'         parse_to: attributes    # --- prometheus node_exporter   prometheus:     config:       scrape_configs:         - job_name: node-exporter           scrape_interval: 30s           scrape_timeout: 20s           metrics_path: \/metrics           static_configs:             - targets: [\"node-exporter:9100\"]               labels:                 container: 'node-exporter'                 node: ${HOST_HOSTNAME}   processors:   batch:     timeout: 10s             # \u2190 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u0440\u0435\u0436\u0435, \u0447\u0435\u043c \u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434     send_batch_size: 200     # \u2190 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 200 \u043c\u0435\u0442\u0440\u0438\u043a\/\u043b\u043e\u0433\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0442\u0447 \u0441\u0440\u0430\u0437\u0443  # --- \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b   # --- \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435   attributes\/custom:     actions:       - action: insert         key: node         value: ${HOST_HOSTNAME}  # --- \u043b\u0435\u0439\u0431\u043b\u044b   attributes\/add_loki_label:     actions:       - action: insert         key: loki.attribute.labels         value: service_name, node, detected_level, login_session, login_user <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><strong>\u0412 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/strong><br \/>\u0421\u0431\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a <\/p>\n<ul>\n<li>\n<p>\u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0441\u0438\u0432\u0435\u0440 <code>prometheus<\/code> \u0441 Node Exporter, \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0431\u043e\u0440 \u043b\u043e\u0433\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 <code>\/var\/log\/fail2ban.log<\/code> \u0438 <code>\/var\/log\/auth.log<\/code> \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u044b <code>filelog\/fail2ban<\/code> \u0438 <code>filelog\/auth<\/code>. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043b\u043e\u0433\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u044b <code>regex_parser<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f fail2ban \u2014 <code>timestamp<\/code>, <code>detected_level<\/code>, <code>target<\/code>, <code>msg<\/code>; \u0434\u043b\u044f auth \u2014 <code>login_session<\/code>, <code>login_user<\/code>). <\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b (<code>service_name<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435). <\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b:   <\/p>\n<ul>\n<li>\n<p><code>batch<\/code>: \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 (batch), \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438.   <\/p>\n<\/li>\n<li>\n<p><code>attributes\/custom<\/code>: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>node<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0430.   <\/p>\n<\/li>\n<li>\n<p><code>attributes\/add_loki_label<\/code>: \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u043b\u0435\u0439\u0431\u043b\u043e\u0432 (<code>service_name<\/code>, <code>node<\/code>, <code>detected_level<\/code>, <code>login_session<\/code>, <code>login_user<\/code>) \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 Loki. <\/p>\n<\/li>\n<\/ul>\n<p> \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u044b:    <\/p>\n<p>\u0412\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 otlp\/gateway . \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0440\u0435\u0442\u0440\u0430\u0438 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0435\u0442\u0438.     <\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 <code>debug<\/code> \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438.  <\/p>\n<hr\/>\n<\/li>\n<\/ul>\n<h4>1.2 \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (Collector Agent app)   <\/h4>\n<p>Collector Agent \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>prometheus_fastapi_instrumentator<\/code>), \u0447\u0438\u0442\u0430\u0435\u0442 \u0438 \u043f\u0430\u0440\u0441\u0438\u0442 \u043b\u043e\u0433\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0440\u0435\u0439\u0441\u044b \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<code>opentelemetry.instrumentation.fastapi<\/code>).  <\/p>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f:<\/strong>   \u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 JSON. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b.  <\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># configs\/otel-collector-agent\/config.yaml service:   pipelines:     traces:       receivers: [otlp]       processors: [batch]       exporters:          - otlp\/gateway         # - debug      metrics:       receivers: [prometheus]       processors: [batch]       exporters: [otlp\/gateway]      logs:       receivers: [filelog\/docker]       processors:          - filter\/drop_unavailable         # - filter\/drop_service         # - filter\/drop_info         - attributes\/custom         - attributes\/add_loki_label          - attributes\/delete_attributes         - batch       exporters:          - otlp\/gateway         # - debug    # --- \u0442\u043e\u0447\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a exporters:   otlp\/gateway:     endpoint: \"${GATEWAY_ENDPOINT}:4317\"     tls:       insecure: true     timeout: 15s     sending_queue:       enabled: true       num_consumers: 10       queue_size: 5000     retry_on_failure:       enabled: true       initial_interval: 10s       max_interval: 30s       max_elapsed_time: 2m   # \u0443\u0440\u043e\u0432\u043d\u0438 \u0434\u0435\u0431\u0430\u0433\u0430 detailed, normal, basic   debug:     verbosity: detailed  # --- \u0442\u043e\u0447\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a receivers:   otlp:     protocols:       grpc:         endpoint: 0.0.0.0:4317       http:         endpoint: 0.0.0.0:4318   # --- docker logs via filelog   filelog\/docker:     include:       - \/var\/lib\/docker\/containers\/*\/*-json.log     poll_interval: 5s     start_at: end     include_file_path: true     include_file_name: true     operators:       - type: json_parser         id: parser-docker         parse_from: body         parse_to: attributes         on_error: drop       - type: json_parser         parse_from: attributes.log         parse_to: attributes         on_error: drop         if: 'attributes.log != nil and attributes.log matches \"^\\\\{\"'       # \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442       - type: add         field: attributes.app         value: chuyan   # --- prometheus \u0434\u043b\u044f \u043c\u0435\u0442\u0440\u0438\u043a   prometheus:     config:       scrape_configs:         - job_name: cadvisor           scrape_interval: 30s           scrape_timeout: 20s           static_configs:             - targets: [ 'cadvisor:8080' ]               labels:                 container: 'cadvisor'                 node: ${HOST_HOSTNAME}         - job_name: app           scrape_interval: 30s           scrape_timeout: 20s           metrics_path: \/metrics           static_configs:             - targets: [\"front0ui:8010\"]               labels:                 container: 'front0ui'                 node: ${HOST_HOSTNAME}   # --- \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 processors:   batch:     timeout: 10s             # \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u0440\u0435\u0436\u0435, \u0447\u0435\u043c \u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434     send_batch_size: 200     # \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 200 \u043c\u0435\u0442\u0440\u0438\u043a\/\u043b\u043e\u0433\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0442\u0447 \u0441\u0440\u0430\u0437\u0443  # --- \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b   # --- \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435   attributes\/custom:     actions:       - action: insert         key: node         value: ${HOST_HOSTNAME}   # --- \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043b\u0438\u0448\u043d\u0438\u0435    attributes\/delete_attributes:     actions:       - action: delete         key:  log.file.path       # - action: delete       #   key: log.file.path   # --- \u043b\u0435\u0439\u0431\u043b\u044b   attributes\/add_loki_label:     actions:       - action: insert         key: loki.attribute.labels         value: app, node, container_name, trace_id, span_id  # --- \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f   # --- \u041e\u0448\u0438\u0431\u043a\u0430  UNAVAILABLE   filter\/drop_unavailable:     error_mode: ignore     logs:       log_record:         - 'IsMatch(body, \"(?i)StatusCode\\\\.UNAVAILABLE\") or IsMatch(attributes[\"log\"], \"(?i)StatusCode\\\\.UNAVAILABLE\")'   # --- \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432   filter\/drop_service:     error_mode: ignore     logs:       log_record:         - 'IsMatch(attributes[\"log\"], \"(?i)(\/health|\/metrics)\")'   # --- \u043b\u043e\u0433\u043e\u0432 \u043f\u043e info   filter\/drop_info:     error_mode: ignore     logs:       log_record:         - 'IsMatch(attributes[\"level\"], \"(?i)(info)\")'   <\/code><\/pre>\n<\/div>\n<\/details>\n<p><strong>\u0412 \u044d\u0442\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/strong><br \/>\u041f\u0440\u0438\u0435\u043c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a:    <\/p>\n<ul>\n<li>\n<p>\u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0441\u0438\u0432\u0435\u0440 otlp, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f span-\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 OpenTelemetry SDK). \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u0430\u0436\u0434\u043e\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0435\u043c \u043b\u043e\u0433\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>filelog\/docker<\/strong>: \u0447\u0438\u0442\u0430\u0435\u0442 docker-\u043b\u043e\u0433\u0438 \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043f\u0443\u0442\u044c: <code>\/var\/lib\/docker\/containers\/<strong>\/<\/strong>-json.log<\/code>.     <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u043a\u0430\u0434 json_parser (\u0440\u0430\u0437\u0431\u043e\u0440 \u0442\u0435\u043b\u0430 \u043b\u043e\u0433\u0430 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 log) \u2014 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 OpenTelemetry.  <\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 <code>app: chuyan<\/code>.  <\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b:   <\/p>\n<ul>\n<li>\n<p><code>batch<\/code>: <em> <\/em>\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u0432 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 , \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b.  <\/p>\n<\/li>\n<li>\n<p><code>filter\/drop_unavailable<\/code> \u2014 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043b\u043e\u0433\u0438 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 UNAVAILABLE.  <\/p>\n<\/li>\n<li>\n<p><code>attributes\/loki_labels<\/code>: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043b\u0435\u0439\u0431\u043b\u044b (webapp_name, environment, response_code, request_method, error_level) \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 log-\u0441\u0442\u043e\u0440\u0435\u0434\u0436\u0430\u0445 \u0442\u0438\u043f\u0430 Loki \u0438\u043b\u0438 Elasticsearch. <\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 <code>log.file.path<\/code>.  <\/p>\n<\/li>\n<\/ul>\n<p> \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u044b:    <\/p>\n<ul>\n<li>\n<p>\u0412\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 otlp\/gateway. \u041f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430 \u0434\u0435\u0431\u0430\u0433 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h4>2 \u041a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440-\u0448\u043b\u044e\u0437 (Collector Gateway)   <\/h4>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0432\u0441\u0451 \u043f\u043e gRPC \u043e\u0442 \u0430\u0433\u0435\u043d\u0442\u043e\u0432. <\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b (\u043b\u0435\u0439\u0431\u043b\u044b \u0445\u043e\u0441\u0442\u0430, \u0441\u0435\u0440\u0432\u0438\u0441\u0430). <\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0431\u044d\u043a\u0435\u043d\u0434.  <\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430-\u0448\u043b\u044e\u0437\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># configs\/otelcol\/otelcol.yaml # --- \u0442\u043e\u0447\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a exporters:   prometheus:     endpoint: \"0.0.0.0:9464\"   loki:     endpoint: \"http:\/\/loki:3100\/loki\/api\/v1\/push\"   otlp\/tempo:      endpoint: tempo:4417     tls:       insecure: true   debug:     verbosity: detailed    # \u0443\u0440\u043e\u0432\u043d\u0438 \u0434\u0435\u0431\u0430\u0433\u0430 detailed, normal, basic  # --- \u0442\u043e\u0447\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a receivers:   otlp:     protocols:       grpc: { endpoint: 0.0.0.0:4317 }       http: { endpoint: 0.0.0.0:4318 }  processors:   batch: {}  service:   pipelines:     traces:       receivers: [otlp]       processors: [batch]       exporters:          - otlp\/tempo         # - debug     metrics:       receivers: [otlp]       processors: [batch]       exporters: [prometheus]     logs:       receivers: [otlp]       processors: [batch]       exporters: [loki]  <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u0435\u0439\u0431\u043b\u044b \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043a \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\n<hr\/>\n<h4>3 \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 + 4 Grafana <\/h4>\n<p>\u041d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:  <\/p>\n<ul>\n<li>\n<p><strong>grafana<\/strong> \u2014 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a, \u043b\u043e\u0433\u043e\u0432 \u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0434\u043b\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0437\u0430 \u0432\u0441\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. <\/p>\n<\/li>\n<li>\n<p><strong>prometheus<\/strong> \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0431\u043e\u0440\u0430 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a. \u041e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0451\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, node-exporter, cadvisor) \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438, \u0445\u0440\u0430\u043d\u0438\u0442 \u0438 \u043e\u0442\u0434\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430. <\/p>\n<\/li>\n<li>\n<p><strong>loki<\/strong> \u2014 c\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0431\u043e\u0440\u0430 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u0442\u0435\u0441\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 Grafana. <\/p>\n<\/li>\n<li>\n<p><strong>tempo<\/strong> \u2014 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (tracing), \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u044b (Distributed Tracing). <\/p>\n<\/li>\n<li>\n<p><strong>cadvisor<\/strong> \u2014 \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0435\u0442\u0440\u0438\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 Docker (CPU, \u043f\u0430\u043c\u044f\u0442\u044c, \u0434\u0438\u0441\u043a\u0438 \u0438 \u0434\u0440.). \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0434\u043b\u044f Prometheus. <\/p>\n<\/li>\n<li>\n<p><strong>node-exporter<\/strong> \u2014 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0445\u043e\u0441\u0442\u0430 (\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 CPU, \u043f\u0430\u043c\u044f\u0442\u044c, \u0434\u0438\u0441\u043a\u0438, \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0434\u0440.) \u0434\u043b\u044f Prometheus. <\/p>\n<\/li>\n<li>\n<p><strong>alertmanager<\/strong> \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0430\u043b\u0435\u0440\u0442\u043e\u0432 Prometheus, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b (\u0432 Slack, email \u0438 \u0442.\u0434.). <\/p>\n<\/li>\n<li>\n<p><strong>uncomplicated-alert-receiver<\/strong> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0435\u0431-\u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0438\u0437 alertmanager, \u0434\u0430\u043b\u0435\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u0438\u0445 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>promtail<\/strong> \u2014 \u0430\u0433\u0435\u043d\u0442, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043b\u043e\u0433\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u0432 Loki. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e opel-\u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440, \u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b  \u0435\u0433\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0432\u044b\u043a \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f  <\/h3>\n<p>\u0422\u0440\u0435\u0439\u0441\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 OTEL SDK \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0430\u0433\u0435\u043d\u0442. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0435 \u0432 \u0441\u0431\u043e\u0440\u0435, \u0430 \u0432 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:  <\/p>\n<ul>\n<li>\n<p>\u0412 \u043b\u043e\u0433\u0430\u0445 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>trace_id<\/code>.   <\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0412 Grafana \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u044f\u0437\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>Data Sources <\/strong>\u0434\u043b\u044f Loki \u0438 Tempo:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ff8\/454\/1c0\/ff84541c0ee355be881aa8472b8dfa86.png\" alt=\"\u0434\u043b\u044f Loki\" title=\"\u0434\u043b\u044f Loki\" width=\"902\" height=\"262\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ff8\/454\/1c0\/ff84541c0ee355be881aa8472b8dfa86.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ff8\/454\/1c0\/ff84541c0ee355be881aa8472b8dfa86.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0434\u043b\u044f Loki<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d66\/925\/218\/d669252185e29bf50edd45b0aa9e6adc.png\" alt=\"\u0434\u043b\u044f Tempo\" title=\"\u0434\u043b\u044f Tempo\" width=\"834\" height=\"332\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d66\/925\/218\/d669252185e29bf50edd45b0aa9e6adc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d66\/925\/218\/d669252185e29bf50edd45b0aa9e6adc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0434\u043b\u044f Tempo<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044f \u043d\u0443\u0436\u043d\u044b\u0439 \u043b\u043e\u0433 \u0432 Grafana, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0442\u0440\u0435\u0439\u0441y. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/546\/487\/377\/546487377e4b6171af735ee209b9b456.png\" alt=\"\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0442\u0440\u0435\u0439\u0441 \u043b\u043e\u0433\u0430\" title=\"\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0442\u0440\u0435\u0439\u0441 \u043b\u043e\u0433\u0430\" width=\"1046\" height=\"310\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/546\/487\/377\/546487377e4b6171af735ee209b9b456.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/546\/487\/377\/546487377e4b6171af735ee209b9b456.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0442\u0440\u0435\u0439\u0441 \u043b\u043e\u0433\u0430<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/37a\/b81\/abb\/37ab81abbfc398abba96681e81515e08.png\" alt=\"\u0438\u0437\u0443\u0447\u0430\u0435\u043c \u0442\u0440\u0435\u0439\u0441\" title=\"\u0438\u0437\u0443\u0447\u0430\u0435\u043c \u0442\u0440\u0435\u0439\u0441\" width=\"1038\" height=\"554\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/37a\/b81\/abb\/37ab81abbfc398abba96681e81515e08.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/37a\/b81\/abb\/37ab81abbfc398abba96681e81515e08.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0438\u0437\u0443\u0447\u0430\u0435\u043c \u0442\u0440\u0435\u0439\u0441<\/figcaption><\/div>\n<\/figure>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u2014 \u043e\u0442 \u0442\u0440\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043b\u043e\u0433\u0430\u043c.  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/489\/542\/ba1\/489542ba1f331d27859e29439ca99138.png\" width=\"1046\" height=\"541\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/489\/542\/ba1\/489542ba1f331d27859e29439ca99138.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/489\/542\/ba1\/489542ba1f331d27859e29439ca99138.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/556\/27e\/086\/55627e0863901dbcf75e64f32c1a02f3.png\" width=\"1043\" height=\"770\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/556\/27e\/086\/55627e0863901dbcf75e64f32c1a02f3.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/556\/27e\/086\/55627e0863901dbcf75e64f32c1a02f3.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u042d\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b.  <\/p>\n<hr\/>\n<h2>\u0418\u0442\u043e\u0433\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u044b <\/h2>\n<ol>\n<li>\n<p> <strong>\u0423\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f.<\/strong> OpenTelemetry Collector \u0441\u0442\u0430\u043b \u0435\u0434\u0438\u043d\u044b\u043c \u0448\u043b\u044e\u0437\u043e\u043c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0438\u0431\u043a\u0430\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f.<\/strong> \u041b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u0432 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. <\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/strong> \u0412\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Ansible \u0438\u043b\u0438 CI\/CD.<\/p>\n<\/li>\n<li>\n<p><strong>\u0428\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/strong> Grafana \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438 \u0438 \u0442\u0440\u0435\u0439\u0441\u044b \u0432 \u0435\u0434\u0438\u043d\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0441 \u0430\u043b\u0435\u0440\u0442\u0430\u043c\u0438.  <\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043f\u043e\u043b\u043d\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e observability-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443: \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0436\u0443, \u0433\u0434\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043a\u0430\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u00ab\u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0442\u00bb \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438. \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 OpenTelemetry \u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0442\u0435\u043a, \u043d\u043e \u0438 \u043f\u0440\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 DevOps-\u043a\u0443\u043b\u044c\u0442\u0443\u0440\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.  <\/p>\n<p>\u0412\u043d\u0435\u0434\u0440\u044f\u043b \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0435 \u00ab\u0440\u0430\u0434\u0438 \u043c\u043e\u0434\u044b\u00bb, \u0430 \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0437\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438, \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0440\u0430\u043d\u044c\u0448\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u044b.  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/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\/919214\/\"> https:\/\/habr.com\/ru\/articles\/919214\/<\/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<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043c\u043e\u0438\u0445 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u2014 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u0437\u043e\u043d\u043e\u0439 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0431\u043e\u0440 \u0442\u0435\u043b\u0435\u043c\u0435\u0442\u0440\u0438\u0438: \u043c\u0435\u0442\u0440\u0438\u043a, \u043b\u043e\u0433\u043e\u0432 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043e\u043a. \u041f\u0440\u043e\u0441\u0442\u044b\u0435 Prometheus-\u0430\u0433\u0435\u043d\u0442\u044b \u0443\u0436\u0435 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c: \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0433\u0438\u0431\u043a\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0435\u0434\u0438\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0434\u0430 \u0438 \u0447\u0438\u0441\u043b\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0432 \u043d\u0438\u0445 \u0441\u0442\u0430\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043b\u044e\u0431\u044b\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u0441 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u2014 \u043a\u043d\u0438\u0433\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u044f\u0442 \u0447\u0430\u0441\u044b \u0433\u0443\u0433\u043b\u0438\u00ad\u043d\u0433\u0430 \u0438 \u0441\u043f\u0430\u0441\u0430\u044e\u0442 \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0443\u043f\u0430\u043b \u043d\u0430 \u0441\u0442\u0435\u043a OpenTelemetry \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c\u0438 open-source \u0431\u044d\u043a\u0435\u043d\u0434\u0430\u043c\u0438: Prometheus, Loki, Tempo \u0438 Grafana. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421 \u0447\u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u0442\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/open-telemetry\/opentelemetry-collector-contrib\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u0443\u043c\u0430\u0445 \u043d\u0430 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443.<\/p>\n<h2>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f <\/h2>\n<ol>\n<li>\n<p><strong>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f<\/strong>: \u0432\u0441\u0451 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Collector-\u044b \u043d\u0430 \u0443\u0437\u043b\u0430\u0445<\/strong>: \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0433\u0435\u043d\u0442 \u0434\u043b\u044f \u0445\u043e\u0441\u0442\u0430 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0433\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043b\u043e\u0433\u0438 \u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 Ansible.<\/p>\n<\/li>\n<li>\n<p><strong>\u0415\u0434\u0438\u043d\u044b\u0439 \u0448\u043b\u044e\u0437 (Gateway)<\/strong>: \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u0442\u0438\u043f\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/strong>: Prometheus, Loki, Tempo.  <\/p>\n<\/li>\n<li>\n<p><strong>Grafana<\/strong>: \u0435\u0434\u0438\u043d\u044b\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u044b \u0438 \u0430\u043b\u0435\u0440\u0442\u044b.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<div class=\"persona\">\n<h5 class=\"persona__heading\">\u041c\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043a\u0430\u043d\u0430\u043b &#8212; \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e, \u0433\u0434\u0435 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c<\/h5>\n<p class=\"persona__text\"><a href=\"https:\/\/t.me\/IT_Chuyana\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/t.me\/IT_Chuyana<\/strong> <\/a><\/p>\n<\/div>\n<hr\/>\n<h2>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430  <\/h2>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0443\u0445 \u0430\u0433\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440-\u0430\u0433\u0435\u043d\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u0447\u0435\u0440\u0435\u0437 Ansible, \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0445\u043e\u0441\u0442\u043e\u0432. \u041e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043d\u0430 \u0445\u043e\u0441\u0442\u044b \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041b\u0438\u0447\u043d\u043e \u044f \u043b\u044e\u0431\u043b\u044e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043e\u0434\u043d\u0438\u043c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440-\u0430\u0433\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043b\u043e\u0433\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0442\u0440\u0435\u0439\u0441\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0439\u0441\u044b \u0438 \u043b\u043e\u0433\u0438, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0441\u044a\u0435\u043c\u0435 \u043c\u0435\u0442\u0440\u0438\u043a<\/figcaption><\/div>\n<\/figure>\n<\/li>\n<\/ul>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">\u0423\u0440\u043e\u0432\u0435\u043d\u044c<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">\u042d\u043b\u0435\u043c\u0435\u043d\u0442<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">1.1<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Collector Agent<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0435\u0440\u0435\u0437 <strong>node-exporter<\/strong>, \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u043b\u043e\u0433\u0438.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">1.2<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Collector Agent app<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <code>\/metrics<\/code> \u043e\u0442 SDK \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0438\u0442\u0430\u0435\u0442 \u043b\u043e\u0433\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0442\u0440\u0435\u0439\u0441\u044b.  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">2<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Collector Gateway  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0451 \u043f\u043e gRPC, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0435\u0439\u0431\u043b\u044b, \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430\u043c. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">3<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">\u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430  <\/p>\n<\/td>\n<td>\n<p align=\"left\">Prometheus \u2192 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, Loki \u2192 \u043b\u043e\u0433\u0438, Tempo \u2192 \u0442\u0440\u0435\u0439\u0441\u044b.  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"75\" width=\"75\">\n<p align=\"center\">4<\/p>\n<\/td>\n<td data-colwidth=\"166\" width=\"166\">\n<p align=\"center\">Grafana  <\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0430\u0448\u0431\u043e\u0440\u0434\u044b, \u0430\u043b\u0435\u0440\u0442\u044b, \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0442\u0440\u0451\u0445 \u0432\u0438\u0434\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.  <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<hr\/>\n<h4>1.1 \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u044b \u0445\u043e\u0441\u0442\u0430 (Collector Agent)   <\/h4>\n<p><strong>Collector Agent<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0431\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0438 \u043b\u043e\u0433\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0441\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 <strong>Node Exporter<\/strong> (\u043c\u0435\u0442\u0440\u0438\u043a\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0441\u044f\u0442\u0441\u044f \u043b\u043e\u0433\u0438 <code>\/var\/log\/fail2ban.log<\/code> \u0438 <code>\/var\/log\/auth.log<\/code> \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.  \u041f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0432\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u043e\u0431\u043e\u0433\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043b\u0435\u0439\u0431\u043b\u0430\u043c\u0438\/\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430, \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0434\u0440.  <\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0441\u0440\u0435\u0434\u0443 \u043c\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Docker-Compose:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"> x-logging:  &amp;default-logging   driver: \"json-file\"   options:     max-size: \"10m\"     max-file: \"1\"     tag: \"{{.Name}}\"  x-common-labels: &amp;default-labels   logging: \"promtail\"   logging_jobname: \"containerlogs\"   stackname: \"docker-monitoring-stack-gpnc\"  services:  # --- monitoring   otel-collector-agent:     image: otel\/opentelemetry-collector-contrib:0.128.0     container_name: otel-collector-agent     restart: always     user: \"0:4\"     cpus: 0.15     mem_limit: 256m     ports:       - 4317:4317     volumes:       - \".\/configs\/otel-collector-agent\/config.yaml:\/etc\/otel-collector\/config.yaml:ro\"       - \"\/var\/log\/fail2ban.log:\/var\/log\/fail2ban.log:ro\"       - \"\/var\/log\/auth.log:\/var\/log\/auth.log:ro\"     command: [\"--config=\/etc\/otel-collector\/config.yaml\"]     environment:       - GATEWAY_ENDPOINT=${MONITOR_HOST}       - HOST_HOSTNAME=${HOST_HOSTNAME}     networks:       - monitor-net     depends_on:       - node-exporter     labels:       &lt;&lt;: *default-labels       component: \"otel-collector\"     logging: *default-logging    node-exporter:     image: prom\/node-exporter:v1.9.1     container_name: node-exporter     restart: always     cpus: 0.15     mem_limit: 256m     pid: \"host\"     volumes:       - \/proc:\/host\/proc:ro       - \/sys:\/host\/sys:ro       - \/:\/rootfs:ro     command:       - '--path.procfs=\/host\/proc'       - '--path.rootfs=\/rootfs'       - '--path.sysfs=\/host\/sys'       - '--collector.filesystem.ignored-mount-points=^\/(sys|proc|dev|host|etc)($$|\/)'     networks:       - monitor-net     labels:       &lt;&lt;: *default-labels       component: \"node-exporter\"     logging: *default-logging   networks:   monitor-net:     driver: bridge <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># configs\/otel-collector-agent\/config.yaml service:   pipelines:     metrics:       receivers: [prometheus]       processors: [batch]       exporters:          - otlp\/gateway         # - debug      logs:       receivers:          - filelog\/fail2ban         - filelog\/auth       processors:          - attributes\/custom         - attributes\/add_loki_label         - batch       exporters:          - otlp\/gateway         # - debug    # --- \u0442\u043e\u0447\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a exporters:   otlp\/gateway:     endpoint: \"${GATEWAY_ENDPOINT}:4317\"     tls:       insecure: true     timeout: 15s     sending_queue:       enabled: true       num_consumers: 10       queue_size: 5000     retry_on_failure:       enabled: true       initial_interval: 10s       max_interval: 30s       max_elapsed_time: 2m   # \u0443\u0440\u043e\u0432\u043d\u0438 \u0434\u0435\u0431\u0430\u0433\u0430 detailed, normal, basic   debug:     verbosity: detailed  receivers:   otlp:     protocols:       grpc:         endpoint: 0.0.0.0:4317       http:         endpoint: 0.0.0.0:4318    # \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435   filelog\/fail2ban:     include:       - \/var\/log\/fail2ban.log     poll_interval: 5s     start_at: end     include_file_path: true     include_file_name: true     operators:       # \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442       - type: add         field: attributes.service_name         value: fail2ban        - type: regex_parser         # ! \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 fail2ban-\u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438:         regex: '(?P&lt;timestamp&gt;\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}).*?(?P&lt;detected_level&gt;NOTICE|INFO)\\s+\\[(?P&lt;target&gt;[^\\]]+)\\] (?P&lt;msg&gt;.*)'         parse_to: attributes     filelog\/auth:     include:       - \/var\/log\/auth.log     poll_interval: 5s     start_at: end     include_file_path: true     include_file_name: true     operators:       # \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442       - type: add         field: attributes.service_name         value: auth        - type: regex_parser         regex: '.*New session\\s+(?P&lt;login_session&gt;\\d+)\\s+of user\\s+(?P&lt;login_user&gt;\\S+)'         parse_to: attributes    # --- prometheus node_exporter   prometheus:     config:       scrape_configs:         - job_name: node-exporter           scrape_interval: 30s           scrape_timeout: 20s           metrics_path: \/metrics           static_configs:             - targets: [\"node-exporter:9100\"]               labels:                 container: 'node-exporter'                 node: ${HOST_HOSTNAME}   processors:   batch:     timeout: 10s             # \u2190 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 \u0440\u0435\u0436\u0435, \u0447\u0435\u043c \u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434     send_batch_size: 200     # \u2190 \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 200 \u043c\u0435\u0442\u0440\u0438\u043a\/\u043b\u043e\u0433\u043e\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0442\u0447 \u0441\u0440\u0430\u0437\u0443  # --- \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b   # --- \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435   attributes\/custom:     actions:       - action: insert         key: node         value: ${HOST_HOSTNAME}  # --- \u043b\u0435\u0439\u0431\u043b\u044b   attributes\/add_loki_label:     actions:       - action: insert         key: loki.attribute.labels         value: service_name, node, detected_level, login_session, login_user <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><strong>\u0412 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/strong><br \/>\u0421\u0431\u043e\u0440 \u043c\u0435\u0442\u0440\u0438\u043a <\/p>\n<ul>\n<li>\n<p>\u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0441\u0438\u0432\u0435\u0440 <code>prometheus<\/code> \u0441 Node Exporter, \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0431\u043e\u0440 \u043b\u043e\u0433\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 <code>\/var\/log\/fail2ban.log<\/code> \u0438 <code>\/var\/log\/auth.log<\/code> \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0441\u0438\u0432\u0435\u0440\u044b <code>filelog\/fail2ban<\/code> \u0438 <code>filelog\/auth<\/code>. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043b\u043e\u0433\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u044b <code>regex_parser<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u044e\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f fail2ban \u2014 <code>timestamp<\/code>, <code>detected_level<\/code>, <code>target<\/code>, <code>msg<\/code>; \u0434\u043b\u044f auth \u2014 <code>login_session<\/code>, <code>login_user<\/code>). <\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b (<code>service_name<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435). <\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b:   <\/p>\n<ul>\n<li>\n<p><code>batch<\/code>: \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 (batch), \u0447\u0442\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438.   <\/p>\n<\/li>\n<li>\n<p><code>attributes\/custom<\/code>: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>node<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0430.   <\/p>\n<\/li>\n<li>\n<p><code>attributes\/add_loki_label<\/code>: \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u043b\u0435\u0439\u0431\u043b\u043e\u0432 (<code>service_name<\/code>, <code>node<\/code>, <code>detected_level<\/code>, <code>login_session<\/code>, <code>login_user<\/code>) \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 Loki. <\/p>\n<\/li>\n<\/ul>\n<p> \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u044b:    <\/p>\n<p>\u0412\u0441\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043b\u043e\u0433\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 otlp\/gateway . \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0440\u0435\u0442\u0440\u0430\u0438 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0435\u0442\u0438.     <\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440 <code>debug<\/code> \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438.  <\/p>\n<hr\/>\n<\/li>\n<\/ul>\n<h4>1.2 \u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (Collector Agent app)   <\/h4>\n<p>Collector Agent \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>prometheus_fastapi_instrumentator<\/code>), \u0447\u0438\u0442\u0430\u0435\u0442 \u0438 \u043f\u0430\u0440\u0441\u0438\u0442 \u043b\u043e\u0433\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0442\u0440\u0435\u0439\u0441\u044b \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<code>opentelemetry.instrumentation.fastapi<\/code>).  <\/p>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f:<\/strong>   \u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u043b\u043e\u0433\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 JSON. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043d\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b.  <\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"yaml\"># configs\/otel-collector-agent\/config.yaml service:   pipelines:     traces:       receivers: [otlp]       processors: [batch]       exporters:          - otlp\/gateway         # - debug      metrics:       receivers: [prometheus]       processors: [batch]       exporters: [otlp\/gateway]      logs:       receivers: [filelog\/docker]       processors:          - filter\/drop_unavailable         # - filter\/drop_service         # - filter\/drop_info         - attributes\/custom         - attributes\/add_loki_label          - attributes\/delete_attributes         - batch       exporters:          - otlp\/gateway         # - debug    # --- \u0442\u043e\u0447\u043a\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a exporters:   otlp\/gateway:     endpoint: \"${GATEWAY_ENDPOINT}:4317\"     tls:       insecure: true     timeout: 15s     sending_queue:       enabled: true    <\/code><\/pre>\n<\/div>\n<\/details>\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-465518","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465518","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=465518"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465518\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}