{"id":316426,"date":"2021-01-15T15:00:54","date_gmt":"2021-01-15T15:00:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=316426"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=316426","title":{"rendered":"\u0421\u0435\u0440\u0432\u0435\u0440 Prometheus \u0438 TLS"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/df\/ls\/kt\/dflskt2r_70txcer_3gcbvdfb4c.png\"><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a> \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 TLS \u0438 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0434\u043b\u044f HTTP \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0421\u043a\u0440\u0435\u0439\u043f\u0438\u043d\u0433 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 HTTPS \u0432\u043c\u0435\u0441\u0442\u043e HTTP \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e. \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTTPS, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443 <a href=\"https:\/\/github.com\/prometheus\/node_exporter\">Node Exporter<\/a> \u0441\u0442\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e HTTPS. \u0412\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 <a href=\"https:\/\/inuits.eu\/blog\/prometheus-tls\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435<\/a>. \u041d\u0430 \u044d\u0442\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u044b\u0448\u043b\u0430 6 \u044f\u043d\u0432\u0430\u0440\u044f 2021 \u0433\u043e\u0434\u0430<\/em>) \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c Prometheus <a href=\"https:\/\/github.com\/prometheus\/prometheus\/releases\/tag\/v2.24.0\">2.24.0<\/a>. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f Prometheus \u0440\u0430\u0434\u0443\u0435\u0442 \u043d\u0430\u0441 \u043a\u0440\u0443\u0442\u044b\u043c\u0438 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u2014 \u044d\u0442\u043e \u0438 TLS, \u0438 backfilling (\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0442\u043e\u0436\u0435 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 2.24) \u0438 \u0434\u0430\u0436\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 React.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e TLS \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<a name=\"habracut\"><\/a><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/prometheus.io\/docs\/operating\/security\/\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Prometheus \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u0432 Prometheus, \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0435 \u0438\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c, \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e, \u0430 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u0435 \u043d\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u0432\u0441\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"api-dlya-administrirovaniya-i-upravleniya-zhiznennym-ciklom\">API \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Prometheus \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b API \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0449\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c (\u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0432\u044b\u0445\u043e\u0434) \u0438 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432).<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043f\u043e\u0440\u0442 Prometheus, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"zaschita-dostupa-k-prometheus\">\u0417\u0430\u0449\u0438\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a Prometheus<\/h3>\n<p>  <\/p>\n<p>\u0420\u0430\u043d\u044c\u0448\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Prometheus \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5r\/vi\/ed\/5rvieda-boeotuvs5o7kgdbrfng.png\"><\/p>\n<p>  <\/p>\n<p>\u0421 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043d\u043e \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d (mangling) \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0417\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u0441\u0438 Prometheus \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u044d\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043f\u043e\u043f\u0440\u043e\u0449\u0435 \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 Prometheus, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e HTTP-\u0442\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cv\/xy\/bi\/cvxybizxjfarcpatz9u9vyhf_qm.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"kak-nastroit-tls\">\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c TLS<\/h3>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Prometheus \u043d\u0430 Linux.<\/p>\n<p>  <\/p>\n<h4 id=\"nastroyka-rabochego-kataloga\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430<\/h4>\n<p>  <\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ mkdir ~\/prometheus_tls_example $ cd ~\/prometheus_tls_example<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"sozdanie-tls-sertifikatov\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 TLS-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432<\/h4>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 TLS-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ cd ~\/prometheus_tls_example $ openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout prometheus.key -out prometheus.crt -subj &quot;\/C=BE\/ST=Antwerp\/L=Brasschaat\/O=Inuits\/CN=localhost&quot; -addext &quot;subjectAltName = DNS:localhost&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c localhost \u2014 \u044d\u0442\u043e \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Prometheus.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430: prometheus.crt \u0438 prometheus.key.<\/p>\n<p>  <\/p>\n<h4 id=\"veb-konfiguraciya-prometheus\">\u0412\u0435\u0431-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Prometheus<\/h4>\n<p>  <\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c Prometheus <a href=\"https:\/\/github.com\/prometheus\/prometheus\/releases\/tag\/v2.24.0\">v2.24.0<\/a>, \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c, \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432\u044b\u0448\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ cd ~\/prometheus_tls_example $ wget https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.24.0\/prometheus-2.24.0.linux-amd64.tar.gz $ tar xvf prometheus-2.24.0.linux-amd64.tar.gz $ cp prometheus.crt prometheus.key prometheus-2.24.0.linux-amd64 $ cd prometheus-2.24.0.linux-amd64<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c TLS \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 prometheus.yml. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043b\u0435\u0442\u0443 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0443\u0447\u0435\u0442\u043a\u0438 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b web.yml \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 TLS:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">tls_server_config:   cert_file: prometheus.crt   key_file: prometheus.key<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 Prometheus, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f &#8212;web.config.file \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ .\/prometheus --web.config.file=web.yml [...] enabled and it cannot be disabled on the fly.&quot; http2=true level=info ts=2021-01-05T13:27:53.677Z caller=tls_config.go:223 component=web msg=&quot;TLS is enabled.&quot; http2=true<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0441\u0435\u0440\u0432\u0435\u0440 Prometheus \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 TLS.<\/p>\n<p>  <\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em> \u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b TLS \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443\u0436 \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 TLS, \u0442\u043e \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 Prometheus \u0435\u0433\u043e \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0448\u044c.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/configuration\/https\/\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  <\/p>\n<h4 id=\"proverka-konfiguracii-tls-vruchnuyu\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 TLS \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/h4>\n<p>  <\/p>\n<p>\u0412 curl \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e TLS. \u0412 \u043d\u043e\u0432\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0430\u0440\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ cd ~\/prometheus_tls_example $ curl localhost:9090\/metrics Client sent an HTTP request to an HTTPS server. $ curl --cacert prometheus.crt https:\/\/localhost:9090\/metrics [...]<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e &#8212;cacert prometheus.crt \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c -k, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443<br \/>  \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432 curl.<\/p>\n<p>  <\/p>\n<h4 id=\"konfiguraciya-skreypa\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0441\u043a\u0440\u0435\u0439\u043f\u0430<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c TLS \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u2014 \u0435\u0441\u043b\u0438 \u043e\u043d \u0432\u043a\u043b\u044e\u0447\u0435\u043d, \u043e\u043d \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 Prometheus \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 TLS, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 HTTPS.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u043d\u0438\u0435 prometheus \u0432 \u0444\u0430\u0439\u043b\u0435 prometheus.yml:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">global:   scrape_interval:     15s   evaluation_interval: 15s scrape_configs:   - job_name: 'prometheus'     scheme: https     tls_config:       ca_file: prometheus.crt     static_configs:     - targets: ['localhost:9090']<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f tls_config \u0438 scheme \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c https. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/configuration\/configuration\/#tls_config\">\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 tls_config \u0441\u043c. \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Prometheus<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Prometheus:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ killall -HUP prometheus<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c <a href=\"https:\/\/localhost:9090\/targets\">https:\/\/localhost:9090\/targets<\/a> \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u0443\u0432\u0438\u0434\u0438\u043c <a href=\"https:\/\/localhost:9090\/metrics\">https:\/\/localhost:9090\/metrics<\/a> \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u0440\u0433\u0435\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 UP? \u0423\u0440\u0430! \u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 TLS \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Prometheus \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<h3 id=\"kak-nastroit-bazovuyu-autentifikaciyu\">\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0439\u0434\u0435\u043c \u0435\u0449\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0437\u0430\u0442\u0440\u0435\u0431\u0443\u0435\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. TLS \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u043d\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f (\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u044b \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u043c).<\/p>\n<p>  <\/p>\n<h4 id=\"veb-konfiguraciya\">\u0412\u0435\u0431-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/h4>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0445\u044d\u0448 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bcrypt). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 htpasswd (\u043f\u0430\u043a\u0435\u0442 apache2-utils \u0438\u043b\u0438 httpd-tools \u0435\u0441\u0442\u044c \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0435; \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/bcrypt-generator.com\/\">\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u044b bcrypt \u043e\u043d\u043b\u0430\u0439\u043d<\/a>).<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ htpasswd -nBC 10 &quot;&quot; | tr -d ':\\n' New password: Re-type new password: $2y$10$EYxs8IOG46m9CtpB\/XlPxO1ei7E4BjAen0SUv6di7mD4keR\/8JO6m<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c inuitsdemo.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u0430\u0439\u043b \u0432\u0435\u0431-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Prometheus web.yml:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">tls_server_config:   cert_file: prometheus.crt   key_file: prometheus.key basic_auth_users:   prometheus: $2y$10$EYxs8IOG46m9CtpB\/XlPxO1ei7E4BjAen0SUv6di7mD4keR\/8JO6m<\/code><\/pre>\n<p>  <\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em> \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 prometheus \u2014 \u044d\u0442\u043e \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 Prometheus \u0435\u0449\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/127.0.0.1:9090\/\">https:\/\/127.0.0.1:9090<\/a>, \u0438\u043d\u0430\u0447\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"https:\/\/localhost:9090\/targets\">targets<\/a> \u0434\u043b\u044f \u0442\u0430\u0440\u0433\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 401 Unauthorized.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/md\/ty\/d7\/mdtyd7w_0w07izsbpahwhqvozvq.png\"><\/p>\n<p>  <\/p>\n<h4 id=\"konfiguraciya-prometheus\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Prometheus<\/h4>\n<p>  <\/p>\n<p>\u0412\u043d\u0435\u0441\u0451\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 prometheus.yml, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0440\u0435\u0439\u043f\u0438\u043d\u0433 \u0448\u0451\u043b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">global:   scrape_interval:     15s   evaluation_interval: 15s scrape_configs:   - job_name: 'prometheus'     scheme: https     basic_auth:       username: prometheus       password: inuitsdemo     tls_config:       ca_file: prometheus.crt     static_configs:     - targets: ['localhost:9090']<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Prometheus \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c SIGHUP:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ killall -HUP prometheus<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, Prometheus \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <a href=\"https:\/\/localhost:9090\/targets\">targets<\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nl\/-y\/am\/nl-yamb7w_1wjssgslum1gqps88.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"promtool\">Promtool<\/h3>\n<p>  <\/p>\n<p>\u0423 Prometheus \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 promtool, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438 \u0444\u0430\u0439\u043b\u044b \u0432\u0435\u0431-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$ .\/promtool check web-config web.yml web.yml SUCCESS<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 web.yml.<\/p>\n<p>  <\/p>\n<h3 id=\"grafana\">Grafana<\/h3>\n<p>  <\/p>\n<p>Grafana \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Prometheus. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c CA (\u043d\u0430\u0448 prometheus.crt) \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5o\/bm\/rp\/5obmrpm5xbjtlp0qhhb-nrb_xck.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u0437\u043e\u0440. \u0412 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 CA \u0438 \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0434\u0435\u0442\u0430\u043b\u0435\u0439. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u043d\u043e \u0438\u0437 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439. \u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f TLS \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0430 \u0441 \u043d\u0435\u0439 \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u044d\u0442\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 HTTPS \u043f\u043e \u0432\u0441\u0435\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u0430\u043c Prometheus \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Alertmanager, Pushgateway.<\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0437\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433.<\/p>\n<p>  <\/p>\n<p><strong><em>\u041e\u0442 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438:<\/em><\/strong> <em>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 Prometheus \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u0430 \u043a\u0443\u0440\u0441\u0435 \u0421\u043b\u0451\u0440\u043c\u0430 <a href=\"https:\/\/slurm.io\/monitoring?utm_source=habr&amp;utm_medium=post&amp;utm_campaign=monitoring&amp;utm_content=post_15-01-2021&amp;utm_term=averina\">\u00ab\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 Kubernetes\u00bb<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u0443\u0440\u0441 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u0443\u043f\u0438\u0442\u044c \u043f\u043e \u0446\u0435\u043d\u0435 \u043f\u0440\u0435\u0434\u0437\u0430\u043a\u0430\u0437\u0430.<\/em><\/p>\n<p>  <\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/strong><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/prometheus\/prometheus\/releases\/tag\/v2.24.0\">Prometheus 2.24.0<\/a><br \/>  <a href=\"https:\/\/prometheus.io\/docs\/operating\/security\/\">\u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 Prometheus<\/a><br \/>  <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/configuration\/https\/\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 TLS-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/a> (\u0434\u043b\u044f Prometheus)<br \/>  <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/configuration\/configuration\/#tls_config\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 TLS-\u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/a> (\u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Prometheus)<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/537504\/\"> https:\/\/habr.com\/ru\/company\/southbridge\/blog\/537504\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/df\/ls\/kt\/dflskt2r_70txcer_3gcbvdfb4c.png\"><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a> \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 TLS \u0438 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0434\u043b\u044f HTTP \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0421\u043a\u0440\u0435\u0439\u043f\u0438\u043d\u0433 \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 HTTPS \u0432\u043c\u0435\u0441\u0442\u043e HTTP \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e. \u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTTPS, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443 <a href=\"https:\/\/github.com\/prometheus\/node_exporter\">Node Exporter<\/a> \u0441\u0442\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u043e HTTPS. \u0412\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 <a href=\"https:\/\/inuits.eu\/blog\/prometheus-tls\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435<\/a>. \u041d\u0430 \u044d\u0442\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u044b\u0448\u043b\u0430 6 \u044f\u043d\u0432\u0430\u0440\u044f 2021 \u0433\u043e\u0434\u0430<\/em>) \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c Prometheus <a href=\"https:\/\/github.com\/prometheus\/prometheus\/releases\/tag\/v2.24.0\">2.24.0<\/a>. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f Prometheus \u0440\u0430\u0434\u0443\u0435\u0442 \u043d\u0430\u0441 \u043a\u0440\u0443\u0442\u044b\u043c\u0438 \u043d\u043e\u0432\u0448\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u2014 \u044d\u0442\u043e \u0438 TLS, \u0438 backfilling (\u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u0442\u043e\u0436\u0435 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 2.24) \u0438 \u0434\u0430\u0436\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 React.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e TLS \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-316426","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316426","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=316426"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316426\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}