{"id":340324,"date":"2022-10-27T15:00:23","date_gmt":"2022-10-27T15:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=340324"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=340324","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Prometheus + Alertmanager + Node Exporter \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 geo-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/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 loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/90c\/99b\/1c2\/90c99b1c297b2f2fdbd74c7e3c0eaf46.png\" width=\"1200\" height=\"628\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/90c\/99b\/1c2\/90c99b1c297b2f2fdbd74c7e3c0eaf46.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f <a href=\"https:\/\/hostkey.ru\/\"><strong><u>Hostkey<\/u><\/strong><\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0432 \u0430\u0440\u0435\u043d\u0434\u0443 \u2014 \u044d\u0442\u043e \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0430\u0441, \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043f\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u0431\u043e\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 <a href=\"https:\/\/prometheus.io\/\"><u>Prometheus<\/u><\/a>, <a href=\"https:\/\/prometheus.io\/docs\/alerting\/latest\/alertmanager\/\"><u>Alertmanager<\/u><\/a> \u0438 <a href=\"https:\/\/github.com\/prometheus\/node_exporter\/releases\"><u>Node Exporter<\/u><\/a>, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438\u0437 docker-compose \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0436\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445, \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0430\u043b\u0435\u0440\u0442\u044b. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Prometheus \u043f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d:\u00a0<\/p>\n<ul>\n<li>\n<p>\u044d\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043e\u0431\u0448\u0438\u0440\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Golang;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c c Docker \u0438 \u0442. \u0434.<\/p>\n<\/li>\n<\/ul>\n<p>Prometheus \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0441\u043b\u0443\u0436\u0431. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ansible-playbook.\u00a0<\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f geo-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430: <a href=\"https:\/\/hostkey.ru\/\"><strong><u>HOSTKEY<\/u><\/strong><\/a> \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0426\u041e\u0414\u0430\u0445 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435, \u0410\u043c\u0441\u0442\u0435\u0440\u0434\u0430\u043c\u0435 \u0438 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0435. \u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Prometheus \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u044f\u0434\u044b \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Prometheus, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0441\u0440\u0435\u0434 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0437\u043b\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u043e, \u0433\u0434\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b Prometheus \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f0d\/d1d\/817\/f0dd1d8174a87cb3b665fe6e155b6735.png\" width=\"851\" height=\"651\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f0d\/d1d\/817\/f0dd1d8174a87cb3b665fe6e155b6735.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n<pre><code>scrape_configs:   - job_name: 'federate'     scrape_interval: 15s      honor_labels: true     metrics_path: '\/federate'      params:       'match[]':         - '{job=\"prometheus\"}'         - '{__name__=~\"job:.*\"}'      static_configs:       - targets:         - 'ru-&lt;instance_address>:9090'         - 'nl-&lt;instance_address>:9090'         - 'us-&lt;instance_address>:9090'<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0434\u043b\u044f Prometheus \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Node Exporter \u2014 http-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>Prometheus \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 Node Exporter (\u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445). Node Exporter \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0441\u0442\u0435.\u00a0<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 9100 \u043f\u043e\u0440\u0442\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/231\/97b\/55e\/23197b55ee0a96406a5e7bc447598ee9.png\" width=\"1060\" height=\"610\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/231\/97b\/55e\/23197b55ee0a96406a5e7bc447598ee9.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 \u0431\u0430\u0437\u0443 Prometheus, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435:<br \/>ru-federation-app01a <strong>\/ # vim \/<\/strong>etc<strong>\/prometheus\/<\/strong>prometheus.yml<\/p>\n<pre><code> - job_name: 'infra.hostkey'     static_configs:       - targets:         - &lt;instance_address>:9100         - &lt;instance_address>:9100         - &lt;instance_address>:9100<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .yaml (\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445).<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Prometheus \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \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 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 &#171;&lt;server_address>:9090&#187;. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 &#171;\/targets&#187; \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0438\u0441\u0442\u0435\u043c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0aa\/c4e\/54a\/0aac4e54ac0e01ea214e16196ef72c53.png\" width=\"948\" height=\"129\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0aa\/c4e\/54a\/0aac4e54ac0e01ea214e16196ef72c53.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p><a href=\"https:\/\/grafana.com\/\"><u>Grafana<\/u><\/a> \u2014 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c time series db: <a href=\"https:\/\/graphiteapp.org\/\"><u>Graphite<\/u><\/a>, <a href=\"https:\/\/www.influxdata.com\/\"><u>InfluxDB<\/u><\/a>, Prometheus \u2014 \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u0430 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043b\u044f 90% \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0424\u043e\u0440\u043c\u0430\u0442 .json \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0440\u0442 Grafana \u0447\u0435\u0440\u0435\u0437 nginx \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c ldap-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Node Exporter \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434:\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1d6\/666\/114\/1d66661143f6b3b3a0e75557b9f494b3.png\" width=\"923\" height=\"535\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1d6\/666\/114\/1d66661143f6b3b3a0e75557b9f494b3.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f25\/f0e\/50f\/f25f0e50f469c508c0aa89f45a546963.png\" width=\"1600\" height=\"730\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f25\/f0e\/50f\/f25f0e50f469c508c0aa89f45a546963.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u043b\u0435\u0440\u0442\u043e\u0432  <\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0430\u0432\u0438\u043b \u0430\u043b\u0435\u0440\u0442\u043e\u0432 &lt;instance_address>.yml.<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u0438\u043d\u0433\u043e\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0432 node_exporter:<\/p>\n<pre><code>groups: - name: &lt;instance_address>   rules:   - alert: InstanceDown     expr: up{job=\"&lt;instance_address>\"} == 0     for: 5m     labels:       severity: page     annotations:       summary: \"Instance {{ .instance }} down\"       description: \"{{ .instance }} of job {{ .job }} has been down for more than 5 minutes.\"  #==========CPU==================================================================   - alert: NodeCPUUsage     expr: (100 - (irate(node_cpu{mode=\"idle\", job=\"&lt;instance_address>\"}[5m]) * 100)) > 50     for: 2m     labels:       severity: page     annotations:       summary: High CPU usage detected CPU usage is above 75% # ==============Memory==========================================================   - alert: NodeSwapUsageSwap     expr: (((node_memory_SwapTotal-node_memory_SwapFree{job=\"&lt;instance_address>\"})\/node_memory_SwapTotal{job=\"&lt;instance_address>\"})*100) > 30     for: 2m      labels:       severity: page     annotations:       summary: Swap usage detected Swap usage usage is above 50%   - alert: NodeMemoryUsageMemFree     expr: (((node_memory_MemTotal-node_memory_MemFree-node_memory_Cached{job=\"&lt;instance_address>\"})\/(node_memory_MemTotal{job=\"&lt;instance_address>\"})*100)) > 30     for: 2m     labels:       severity: page     annotations:       summary: High memory usage detected, Memory usage is above 50% #==============Load=============================================================    - alert: nodeLoad1     expr: node_load1{job=\"&lt;instance_address>\"} > 0.7     for: 1m     labels:       severity: page     annotations:       summary: Load #================Dis space Used ================================================   - alert: diskSpaceUsed     expr: (100.0 - 100 * (node_filesystem_avail{job=\"&lt;instance_address>\"} \/ node_filesystem_size{job=\"&lt;instance_address>\"})) > 80     for: 10m     labels:       severity: page     annotations:       summary: Disk space userd 80 #=============nodeContrack========================================   - alert: nodeContrack     expr: node_nf_conntrack_entries{job=\"&lt;instance_address>\"} > 200     for: 10m     labels:       severity: page     annotations:       summary: nodeContrack #=============nodeCntextSwitches ========================================   - alert: nodeCntextSwitches     expr: irate(node_context_switches{job=\"&lt;instance_address>\"}[5m]) > 100     for: 5m     labels:       severity: page     annotations:       summary: nodeCntextSwitches #=============Disk Utilization per Device ========================================   - alert: DiskUtilizationPerDevice     expr: irate(node_disk_io_time_ms{job=\"&lt;instance_address>\"}[5m])\/10 > 0.2     for: 5m     labels:       severity: page     annotations:       summary: DiskUtilizationPerDevice #============Disk IOs per Device ========================================   - alert: DiskIOsPerDeviceRead     expr: irate(node_disk_reads_completed{job=\"&lt;instance_address>\"}[5m]) >10     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice    - alert: DiskIOsPerDeviceWrite     expr: irate(node_disk_writes_completed{job=\"&lt;instance_address>\"}[5m]) > 10     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice #===========Disk Throughput per Device========================================   - alert: DiskThroughputPerDeviceReads     expr: irate(node_disk_sectors_read{job=\"&lt;instance_address>\"}[5m]) * 512 >10000000     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice   - alert: DiskThroughputPerDeviceWrites     expr: irate(node_disk_sectors_written{job=\"&lt;instance_address>u\"}[5m]) * 512 > 10000000     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice #===========Network Traffic========================================   - alert: NetworkTrafficReceive     expr: irate(node_network_receive_bytes{job=\"&lt;instance_address>\"}[5m])*8 > 5000     for: 5m     labels:       severity: page     annotations:       summary: NetworkTrafficReceive   - alert: NetworkTrafficTransmit     expr: irate(node_network_transmit_bytes{job=\"&lt;instance_address>\"}[5m])*8 > 5000     for: 5m     labels:       severity: page     annotations:       summary: NetworkTrafficTransmit  #===========Netstat========================================   - alert: Netstat     expr: node_netstat_Tcp_CurrEstab{job=\"&lt;instance_address>\"} > 20     for: 5m     labels:       severity: page     annotations:       summary: Netstat  #===========UDP Stats============================   - alert: UDPStatsInDatagrams     expr: irate(node_netstat_Udp_InDatagrams{job=\"&lt;instance_address>\"}[5m]) > 50     for: 5m     labels:       severity: page     annotations:       summary: UDPStats   - alert: UDPStatsInErrors     expr: irate(node_netstat_Udp_InErrors{job=\"&lt;instance_address>\"}[5m]) > 20     for: 5m     labels:       severity: page     annotations:       summary: UDPStats   - alert: UDPStatsOutDatagrams     expr: irate(node_netstat_Udp_OutDatagrams{job=\"&lt;instance_address>\"}[5m]) > 50     for: 5m     labels:       severity: page     annotations:       summary: UDPStats   - alert: UDPStatsNoPorts\u043b     expr: irate(node_netstat_Udp_NoPorts{job=\"&lt;instance_address>\"}[5m]) > 20     for: 5m     labels:       severity: page     annotations:       summary: UDPStats <\/code><\/pre>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0430\u043b\u0435\u0440\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432 prometheus.yml:<\/p>\n<p>rule_files:<br \/> \u00a0 &#8212; &#171;&lt;instance_address>.yml&#187;<\/p>\n<h2>Alertmanager<\/h2>\n<p>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u0432 \u043b\u044e\u0431\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443: email, Telegram, Slack, Rocket.Chat.<\/p>\n<pre><code>alerting:   alertmanagers:   - static_configs:     - targets:       - alertmamager-app01a.infra.hostkey.ru:9093<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f Rocket.Chat:  <\/p>\n<pre><code>alertmanager-app01a ~ # vin \/etc\/alertmanager\/alertmanager.yml  route:     repeat_interval: 5m     group_interval: 5m     receiver: 'rocketchat'  receivers:     - name: 'rocketchat'       webhook_configs:           - send_resolved: false             url: 'https:\/\/chat_address\/hooks\/devtest'  <\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code>global: route:   group_by: ['\u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430']   group_wait: \"\u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b\"   group_interval: \"\u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b\"   repeat_interval: \"\u0432\u0440\u0435\u043c\u044f \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\"   receiver: \"\u0438\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439\" receivers:   - name: \"\u0438\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439\"     \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0430\u043b\u0435\u0440\u0442\u044b, \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0432\u0448\u0438\u0435 \u0432 AlertManager, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <strong>group_by<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u043a \u0434\u0435\u043b\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>group_wait<\/strong>. \u041e\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u044e \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b, \u0430 \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u043b\u0435\u0440\u0442\u0430.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>group_interval<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0436\u0434\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0433\u0440\u0443\u043f\u043f\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u0435\u0449\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>repeat_interval<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0442\u043e\u0433\u043e \u0436\u0435 \u0430\u043b\u0435\u0440\u0442\u0430.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e2b\/82b\/2a0\/e2b82b2a0de5bfd6a8307c2cdbe99f31.png\" width=\"981\" height=\"515\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e2b\/82b\/2a0\/e2b82b2a0de5bfd6a8307c2cdbe99f31.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>Prometheus AlertManager<\/h2>\n<p>\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0434\u0435\u0436\u0443\u0440\u043d\u043e\u0439 \u0441\u043c\u0435\u043d\u043e\u0439:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72c\/469\/5c1\/72c4695c16914bdf29a84d133ed73c4a.png\" width=\"1600\" height=\"829\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72c\/469\/5c1\/72c4695c16914bdf29a84d133ed73c4a.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2d3\/e4b\/e17\/2d3e4be171786ffcb2723c1dfae627b4.png\" width=\"940\" height=\"255\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2d3\/e4b\/e17\/2d3e4be171786ffcb2723c1dfae627b4.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0434\u043b\u044f geo-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043a \u043d\u0430\u0448\u0435\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0435 (\u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445). \u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043d\u0443\u0436\u0434\u044b \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0442\u0440\u0443\u0434\u043e\u0437\u0430\u0442\u0440\u0430\u0442\u044b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0438 \u0438\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/company\/hostkey\/blog\/695726\/\"> https:\/\/habr.com\/ru\/company\/hostkey\/blog\/695726\/<\/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\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f <a href=\"https:\/\/hostkey.ru\/\"><strong><u>Hostkey<\/u><\/strong><\/a> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u0432 \u0430\u0440\u0435\u043d\u0434\u0443 \u2014 \u044d\u0442\u043e \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0430\u0441, \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043f\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u0431\u043e\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 <a href=\"https:\/\/prometheus.io\/\"><u>Prometheus<\/u><\/a>, <a href=\"https:\/\/prometheus.io\/docs\/alerting\/latest\/alertmanager\/\"><u>Alertmanager<\/u><\/a> \u0438 <a href=\"https:\/\/github.com\/prometheus\/node_exporter\/releases\"><u>Node Exporter<\/u><\/a>, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438\u0437 docker-compose \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0436\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 Kubernetes-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445, \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0430\u043b\u0435\u0440\u0442\u044b. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Prometheus \u043f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d:\u00a0<\/p>\n<ul>\n<li>\n<p>\u044d\u0442\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043e\u0431\u0448\u0438\u0440\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Golang;<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c c Docker \u0438 \u0442. \u0434.<\/p>\n<\/li>\n<\/ul>\n<p>Prometheus \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0441\u043b\u0443\u0436\u0431. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ansible-playbook.\u00a0<\/p>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f geo-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430: <a href=\"https:\/\/hostkey.ru\/\"><strong><u>HOSTKEY<\/u><\/strong><\/a> \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0426\u041e\u0414\u0430\u0445 \u0432 \u041c\u043e\u0441\u043a\u0432\u0435, \u0410\u043c\u0441\u0442\u0435\u0440\u0434\u0430\u043c\u0435 \u0438 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0435. \u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 Prometheus \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u044f\u0434\u044b \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Prometheus, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0441\u0440\u0435\u0434 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u0437\u043b\u043e\u0432. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u044f \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u043e, \u0433\u0434\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b Prometheus \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0434\u0447\u0438\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n<pre><code>scrape_configs:   - job_name: 'federate'     scrape_interval: 15s      honor_labels: true     metrics_path: '\/federate'      params:       'match[]':         - '{job=\"prometheus\"}'         - '{__name__=~\"job:.*\"}'      static_configs:       - targets:         - 'ru-&lt;instance_address>:9090'         - 'nl-&lt;instance_address>:9090'         - 'us-&lt;instance_address>:9090'<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0434\u043b\u044f Prometheus \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Node Exporter \u2014 http-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>Prometheus \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 Node Exporter (\u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0435\u0440, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445). Node Exporter \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0445\u043e\u0441\u0442\u0435.\u00a0<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 9100 \u043f\u043e\u0440\u0442\u0443:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 \u0431\u0430\u0437\u0443 Prometheus, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435:<br \/>ru-federation-app01a <strong>\/ # vim \/<\/strong>etc<strong>\/prometheus\/<\/strong>prometheus.yml<\/p>\n<pre><code> - job_name: 'infra.hostkey'     static_configs:       - targets:         - &lt;instance_address>:9100         - &lt;instance_address>:9100         - &lt;instance_address>:9100<\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .yaml (\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445).<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0441\u0442\u0430\u0440\u0442\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Prometheus \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \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 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 &#171;&lt;server_address>:9090&#187;. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 &#171;\/targets&#187; \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0438\u0441\u0442\u0435\u043c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p><a href=\"https:\/\/grafana.com\/\"><u>Grafana<\/u><\/a> \u2014 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c time series db: <a href=\"https:\/\/graphiteapp.org\/\"><u>Graphite<\/u><\/a>, <a href=\"https:\/\/www.influxdata.com\/\"><u>InfluxDB<\/u><\/a>, Prometheus \u2014 \u0441 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u0430 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043b\u044f 90% \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0424\u043e\u0440\u043c\u0430\u0442 .json \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0440\u0442 Grafana \u0447\u0435\u0440\u0435\u0437 nginx \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c ldap-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Node Exporter \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430. \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434:\u00a0<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u043b\u0435\u0440\u0442\u043e\u0432  <\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0430\u0432\u0438\u043b \u0430\u043b\u0435\u0440\u0442\u043e\u0432 &lt;instance_address>.yml.<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u0438\u043d\u0433\u043e\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0432 node_exporter:<\/p>\n<pre><code>groups: - name: &lt;instance_address>   rules:   - alert: InstanceDown     expr: up{job=\"&lt;instance_address>\"} == 0     for: 5m     labels:       severity: page     annotations:       summary: \"Instance {{ .instance }} down\"       description: \"{{ .instance }} of job {{ .job }} has been down for more than 5 minutes.\"  #==========CPU==================================================================   - alert: NodeCPUUsage     expr: (100 - (irate(node_cpu{mode=\"idle\", job=\"&lt;instance_address>\"}[5m]) * 100)) > 50     for: 2m     labels:       severity: page     annotations:       summary: High CPU usage detected CPU usage is above 75% # ==============Memory==========================================================   - alert: NodeSwapUsageSwap     expr: (((node_memory_SwapTotal-node_memory_SwapFree{job=\"&lt;instance_address>\"})\/node_memory_SwapTotal{job=\"&lt;instance_address>\"})*100) > 30     for: 2m      labels:       severity: page     annotations:       summary: Swap usage detected Swap usage usage is above 50%   - alert: NodeMemoryUsageMemFree     expr: (((node_memory_MemTotal-node_memory_MemFree-node_memory_Cached{job=\"&lt;instance_address>\"})\/(node_memory_MemTotal{job=\"&lt;instance_address>\"})*100)) > 30     for: 2m     labels:       severity: page     annotations:       summary: High memory usage detected, Memory usage is above 50% #==============Load=============================================================    - alert: nodeLoad1     expr: node_load1{job=\"&lt;instance_address>\"} > 0.7     for: 1m     labels:       severity: page     annotations:       summary: Load #================Dis space Used ================================================   - alert: diskSpaceUsed     expr: (100.0 - 100 * (node_filesystem_avail{job=\"&lt;instance_address>\"} \/ node_filesystem_size{job=\"&lt;instance_address>\"})) > 80     for: 10m     labels:       severity: page     annotations:       summary: Disk space userd 80 #=============nodeContrack========================================   - alert: nodeContrack     expr: node_nf_conntrack_entries{job=\"&lt;instance_address>\"} > 200     for: 10m     labels:       severity: page     annotations:       summary: nodeContrack #=============nodeCntextSwitches ========================================   - alert: nodeCntextSwitches     expr: irate(node_context_switches{job=\"&lt;instance_address>\"}[5m]) > 100     for: 5m     labels:       severity: page     annotations:       summary: nodeCntextSwitches #=============Disk Utilization per Device ========================================   - alert: DiskUtilizationPerDevice     expr: irate(node_disk_io_time_ms{job=\"&lt;instance_address>\"}[5m])\/10 > 0.2     for: 5m     labels:       severity: page     annotations:       summary: DiskUtilizationPerDevice #============Disk IOs per Device ========================================   - alert: DiskIOsPerDeviceRead     expr: irate(node_disk_reads_completed{job=\"&lt;instance_address>\"}[5m]) >10     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice    - alert: DiskIOsPerDeviceWrite     expr: irate(node_disk_writes_completed{job=\"&lt;instance_address>\"}[5m]) > 10     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice #===========Disk Throughput per Device========================================   - alert: DiskThroughputPerDeviceReads     expr: irate(node_disk_sectors_read{job=\"&lt;instance_address>\"}[5m]) * 512 >10000000     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice   - alert: DiskThroughputPerDeviceWrites     expr: irate(node_disk_sectors_written{job=\"&lt;instance_address>u\"}[5m]) * 512 > 10000000     for: 5m     labels:       severity: page     annotations:       summary: DiskIOsPerDevice #===========Network Traffic========================================   - alert: NetworkTrafficReceive     expr: irate(node_network_receive_bytes{job=\"&lt;instance_address>\"}[5m])*8 > 5000     for: 5m     labels:       severity: page     annotations:       summary: NetworkTrafficReceive   - alert: NetworkTrafficTransmit     expr: irate(node_network_transmit_bytes{job=\"&lt;instance_address>\"}[5m])*8 > 5000     for: 5m     labels:       severity: page     annotations:       summary: NetworkTrafficTransmit  #===========Netstat========================================   - alert: Netstat     expr: node_netstat_Tcp_CurrEstab{job=\"&lt;instance_address>\"} > 20     for: 5m     labels:       severity: page     annotations:       summary: Netstat  #===========UDP Stats============================   - alert: UDPStatsInDatagrams     expr: irate(node_netstat_Udp_InDatagrams{job=\"&lt;instance_address>\"}[5m]) > 50     for: 5m     labels:       severity: page     annotations:       summary: UDPStats   - alert: UDPStatsInErrors     expr: irate(node_netstat_Udp_InErrors{job=\"&lt;instance_address>\"}[5m]) > 20     for: 5m     labels:       severity: page     annotations:       summary: UDPStats   - alert: UDPStatsOutDatagrams     expr: irate(node_netstat_Udp_OutDatagrams{job=\"&lt;instance_address>\"}[5m]) > 50     for: 5m     labels:       severity: page     annotations:       summary: UDPStats   - alert: UDPStatsNoPorts\u043b     expr: irate(node_netstat_Udp_NoPorts{job=\"&lt;instance_address>\"}[5m]) > 20     for: 5m     labels:       severity: page     annotations:       summary: UDPStats <\/code><\/pre>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0430\u043b\u0435\u0440\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432 prometheus.yml:<\/p>\n<p>rule_files:<br \/> \u00a0 &#8212; &#171;&lt;instance_address>.yml&#187;<\/p>\n<h2>Alertmanager<\/h2>\n<p>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u0432 \u043b\u044e\u0431\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443: email, Telegram, Slack, Rocket.Chat.<\/p>\n<pre><code>alerting:   alertmanagers:   - static_configs:     - targets:       - alertmamager-app01a.infra.hostkey.ru:9093<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f Rocket.Chat:  <\/p>\n<pre><code>alertmanager-app01a ~ # vin \/etc\/alertmanager\/alertmanager.yml  route:     repeat_interval: 5m     group_interval: 5m     receiver: 'rocketchat'  receivers:     - name: 'rocketchat'       webhook_configs:           - send_resolved: false             url: 'https:\/\/chat_address\/hooks\/devtest'  <\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code>global: route:   group_by: ['\u043f\u043e \u043a\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-340324","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340324","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=340324"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340324\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}