{"id":385457,"date":"2024-06-29T06:07:31","date_gmt":"2024-06-29T06:07:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=385457"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=385457","title":{"rendered":"<span>\u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c Prometheus, ChatGPT \u0438 Slack \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f Robusta<\/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\/8ac\/441\/dfb\/8ac441dfb4ffea116c43b05e29133c54.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ac\/441\/dfb\/8ac441dfb4ffea116c43b05e29133c54.png\"\/><\/figure>\n<p>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c Prometheus, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 Kubernetes, \u0443\u043c\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441 ChatGPT, \u0438 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u0442\u0438\u043f\u0430 Slack? \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Kubernetes \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Robusta.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Robusta \u043f\u043e\u0432\u0435\u0440\u0445 \u0441\u0442\u0435\u043a\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Prometheus \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0430\u043b\u0435\u0440\u0442\u044b \u0438 \u043a\u0430\u043a \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/015\/ba1\/2a3\/015ba12a371876c15cfb37d2499e5317.png\" alt=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a:\u00a0Robusta\" title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a:\u00a0Robusta\" width=\"3582\" height=\"1654\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/015\/ba1\/2a3\/015ba12a371876c15cfb37d2499e5317.png\"\/><\/p>\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a:\u00a0<a href=\"https:\/\/docs.robusta.dev\/master\/architecture.html\"><u>Robusta<\/u><\/a><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?<\/strong><\/p>\n<p>Robusta \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0430\u043a\u0446\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<ul>\n<li>\n<p>\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u043f\u043e \u0430\u043b\u0435\u0440\u0442\u0430\u043c, \u043b\u043e\u0433\u0430\u043c, \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435).<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c (\u0432 Robusta \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 50 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432). \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 ChatGPT \u0447\u0435\u0440\u0435\u0437 API-\u043a\u043b\u044e\u0447.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 Slack). <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 customPlaybooks \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>customPlaybooks: # Add the 'Ask ChatGPT' button to all Prometheus alerts - triggers:   - on_prometheus_alert:       alert_name: KubePodCrashLooping   actions:     - chat_gpt_enricher: {}   sinks:     - slack<\/code><\/pre>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043e\u0442 Robusta \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043a\u0443\u043b\u0438\u0441\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/009\/506\/31e\/00950631e09aadbe9940634cee7a4a60.gif\" width=\"1920\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/009\/506\/31e\/00950631e09aadbe9940634cee7a4a60.gif\"\/><\/figure>\n<p><strong>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Robusta \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes?<\/strong><\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c robusta-cli \u043d\u0430 python. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f helm-\u0447\u0430\u0440\u0442\u0430.<\/p>\n<p>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Robusta cli \u043d\u0430 python:<\/p>\n<pre><code>python3 -m pip install -U robusta-cli --no-cache<\/code><\/pre>\n<p>2. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0434\u043b\u044f Helm:<\/p>\n<p>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code>robusta gen-config<\/code><\/pre>\n<pre><code>Robusta reports its findings to external destinations (we call them \"sinks\"). Well define some of them now.  Configure Slack integration? This is HIGHLY recommended. [Y\/n]: Y If your browser does not automatically launch, open the below url: https:\/\/api.robusta.dev\/integrations\/slack?id=***** Youve just connected Robusta to the Slack of: poc-chatgpt-kubernetes Which slack channel should I send notifications to? # pocs Configure MsTeams integration? [y\/N]: n Configure Robusta UI sink? This is HIGHLY recommended. [Y\/n]: n   Robusta can use Prometheus as an alert source. If you havent installed it yet, Robusta can install a pre-configured Prometheus. Would you like to do so? [y\/N]: y Please read and approve our End User License Agreement: https:\/\/api.robusta.dev\/eula.html Do you accept our End User License Agreement? [y\/N]: y Last question! Would you like to help us improve Robusta by sending exception reports? [y\/N]: y Saved configuration to .\/generated_values.yaml - save this file for future use! Finish installing with Helm (see the Robusta docs). Then login to Robusta UI at https:\/\/platform.robusta.dev<\/code><\/pre>\n<p>2.1 \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 YAML-\u0444\u0430\u0439\u043b, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u044d\u0442\u043e\u043c\u0443:<\/p>\n<pre><code>clusterName: \"aks-development\" globalConfig:   signing_key: ea657a0b******   account_id: 7935371f****** sinksConfig: - slack_sink:     name: main_slack_sink     slack_channel: pocs     api_key: xoxb****** enablePrometheusStack: true enablePlatformPlaybooks: true runner:   sendAdditionalTelemetry: true rsa:   private: ******   public: ******<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b generated_values.yaml \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440.<\/p>\n<p>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Robusta \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Helm:<\/p>\n<pre><code>kubectl create ns robusta  helm repo add robusta https:\/\/robusta-charts.storage.googleapis.com &amp;&amp; helm repo update helm install robusta robusta\/robusta -f .\/generated_values.yaml<\/code><\/pre>\n<p>4. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (Prometheus) + \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (Logs-Enricher) + sink (Slack):<\/p>\n<pre><code>kubectl apply -f https:\/\/raw.githubusercontent.com\/robusta-dev\/kubernetes-demos\/main\/pending_pods\/pending_pod.yaml  robusta playbooks trigger prometheus_alert alert_name=KubePodCrashLooping namespace=robusta pod_name=example-pod<\/code><\/pre>\n<p>\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2df\/b7b\/835\/2dfb7b835e46fe3b128a1e516c7e10cd.webp\" width=\"1208\" height=\"497\"\/><\/figure>\n<p>5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (\u0430\u043b\u0435\u0440\u0442 Prometheus) + \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (ChatGPT) + Sink (Slack).<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 kubernetes-chatgpt-bot \u0441 robusta-dev \u0438 \u0438\u0437\u043c\u0435\u043d\u044e generated_values.yaml \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>clusterName: \"aks-development\" globalConfig:   chat_gpt_token: sk-dw******   signing_key: ea657a******   account_id: 7935371f****** sinksConfig: - slack_sink:     name: main_slack_sink     slack_channel: pocs     api_key: xoxb****** - robusta_sink:     name: robusta_ui_sink     token: eyJhY2NvdW****** enablePrometheusStack: true # This part is added to the default generated_values.yaml enablePlatformPlaybooks: true runner:   sendAdditionalTelemetry: true rsa:   private: ******   public: ******  # This part is added to the default generated_values.yaml playbookRepos:   chatgpt_robusta_actions:     url: \"https:\/\/github.com\/robusta-dev\/kubernetes-chatgpt-bot.git\"  # This part is added to the default generated_values.yaml customPlaybooks: # Add the 'Ask ChatGPT' button to all Prometheus alerts - triggers:   - on_prometheus_alert: {}   actions:   - chat_gpt_enricher: {}<\/code><\/pre>\n<p>\u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c sink, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u043d\u044b \u0432 sinksConfig, \u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f Prometheus.<\/p>\n<p>6. \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 Helm chart, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c customPlaybooks:<\/p>\n<pre><code>helm upgrade robusta robusta\/robusta --values=generated_values.yaml<\/code><\/pre>\n<p>7. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (Prometheus) + \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (ChatGPT) + Slack:<\/p>\n<pre><code>kubectl apply -f https:\/\/raw.githubusercontent.com\/robusta-dev\/kubernetes-demos\/main\/pending_pods\/pending_pod.yaml  robusta playbooks trigger prometheus_alert alert_name=KubePodCrashLooping namespace=robusta pod_name=example-pod<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 Slack \u043a\u043d\u043e\u043f\u043a\u0443 \u00abAsk ChatGPT\u00bb.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c91\/7cb\/c15\/c917cbc1563418e0d49f5de2046de6d9.webp\" width=\"1400\" height=\"468\"\/><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e03\/c6b\/b01\/e03c6bb0128640bd4ea158cb42c235fd.webp\" width=\"700\" height=\"675\"\/><\/figure>\n<p>Robusta \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0440\u0435\u043c\u044f \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Kubernetes<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0442\u0440\u0430\u0431\u043b\u0448\u0443\u0442\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 Robusta, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Prometheus, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f Kubernetes \u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u0430\u043b\u0435\u0440\u0442\u044b, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 Python, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 ChatGPT \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0432\u0438\u0436\u043a\u043e\u043c Robusta \u0432\u00a0 \u0441\u0440\u0435\u0434\u0435 Kubernetes.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0442 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 Kubernetes \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u0421\u043b\u0451\u0440\u043c\u0435. \u041c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043a\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f K8s \u2014 \u00ab<a href=\"https:\/\/slurm.io\/kubernetes-baza?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=kubernetes-baza&amp;utm_content=article_25-04-2023&amp;utm_term=assiaapa\">Kubernetes \u0431\u0430\u0437\u0430<\/a>\u00bb \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u00abKubernetes \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432\u00bb \u2014 \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 Kubernetes.<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442: \u00abKubernetes \u0431\u0430\u0437\u0430\u00bb + \u00ab\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043b\u043e\u0433\u0438 \u0432 Kubernetes\u00bb. \u0423\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f\u00a0\u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/slurm.io\/kubernetes-baza?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=kubernetes-baza&amp;utm_content=article_25-04-2023&amp;utm_term=assiaapa#komplekt\">\u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/731560\/\"> https:\/\/habr.com\/ru\/articles\/731560\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c Prometheus, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 Kubernetes, \u0443\u043c\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441 ChatGPT, \u0438 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u0442\u0438\u043f\u0430 Slack? \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 Kubernetes \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Robusta.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Robusta \u043f\u043e\u0432\u0435\u0440\u0445 \u0441\u0442\u0435\u043a\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Prometheus \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0430\u043b\u0435\u0440\u0442\u044b \u0438 \u043a\u0430\u043a \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a:\u00a0<a href=\"https:\/\/docs.robusta.dev\/master\/architecture.html\"><u>Robusta<\/u><\/a><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?<\/strong><\/p>\n<p>Robusta \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0430\u043a\u0446\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u0435\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.<\/p>\n<ul>\n<li>\n<p>\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u043f\u043e \u0430\u043b\u0435\u0440\u0442\u0430\u043c, \u043b\u043e\u0433\u0430\u043c, \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435).<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c (\u0432 Robusta \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 50 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432). \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 ChatGPT \u0447\u0435\u0440\u0435\u0437 API-\u043a\u043b\u044e\u0447.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 Slack). <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 customPlaybooks \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>customPlaybooks: # Add the 'Ask ChatGPT' button to all Prometheus alerts - triggers:   - on_prometheus_alert:       alert_name: KubePodCrashLooping   actions:     - chat_gpt_enricher: {}   sinks:     - slack<\/code><\/pre>\n<p>\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043e\u0442 Robusta \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043a\u0443\u043b\u0438\u0441\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Robusta \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Kubernetes?<\/strong><\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c robusta-cli \u043d\u0430 python. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f helm-\u0447\u0430\u0440\u0442\u0430.<\/p>\n<p>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Robusta cli \u043d\u0430 python:<\/p>\n<pre><code>python3 -m pip install -U robusta-cli --no-cache<\/code><\/pre>\n<p>2. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0434\u043b\u044f Helm:<\/p>\n<p>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code>robusta gen-config<\/code><\/pre>\n<pre><code>Robusta reports its findings to external destinations (we call them \"sinks\"). Well define some of them now.  Configure Slack integration? This is HIGHLY recommended. [Y\/n]: Y If your browser does not automatically launch, open the below url: https:\/\/api.robusta.dev\/integrations\/slack?id=***** Youve just connected Robusta to the Slack of: poc-chatgpt-kubernetes Which slack channel should I send notifications to? # pocs Configure MsTeams integration? [y\/N]: n Configure Robusta UI sink? This is HIGHLY recommended. [Y\/n]: n   Robusta can use Prometheus as an alert source. If you havent installed it yet, Robusta can install a pre-configured Prometheus. Would you like to do so? [y\/N]: y Please read and approve our End User License Agreement: https:\/\/api.robusta.dev\/eula.html Do you accept our End User License Agreement? [y\/N]: y Last question! Would you like to help us improve Robusta by sending exception reports? [y\/N]: y Saved configuration to .\/generated_values.yaml - save this file for future use! Finish installing with Helm (see the Robusta docs). Then login to Robusta UI at https:\/\/platform.robusta.dev<\/code><\/pre>\n<p>2.1 \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 YAML-\u0444\u0430\u0439\u043b, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u044d\u0442\u043e\u043c\u0443:<\/p>\n<pre><code>clusterName: \"aks-development\" globalConfig:   signing_key: ea657a0b******   account_id: 7935371f****** sinksConfig: - slack_sink:     name: main_slack_sink     slack_channel: pocs     api_key: xoxb****** enablePrometheusStack: true enablePlatformPlaybooks: true runner:   sendAdditionalTelemetry: true rsa:   private: ******   public: ******<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b generated_values.yaml \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440.<\/p>\n<p>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Robusta \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Helm:<\/p>\n<pre><code>kubectl create ns robusta  helm repo add robusta https:\/\/robusta-charts.storage.googleapis.com &amp;&amp; helm repo update helm install robusta robusta\/robusta -f .\/generated_values.yaml<\/code><\/pre>\n<p>4. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (Prometheus) + \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (Logs-Enricher) + sink (Slack):<\/p>\n<pre><code>kubectl apply -f https:\/\/raw.githubusercontent.com\/robusta-dev\/kubernetes-demos\/main\/pending_pods\/pending_pod.yaml  robusta playbooks trigger prometheus_alert alert_name=KubePodCrashLooping namespace=robusta pod_name=example-pod<\/code><\/pre>\n<p>\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>5. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (\u0430\u043b\u0435\u0440\u0442 Prometheus) + \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (ChatGPT) + Sink (Slack).<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 kubernetes-chatgpt-bot \u0441 robusta-dev \u0438 \u0438\u0437\u043c\u0435\u043d\u044e generated_values.yaml \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>clusterName: \"aks-development\" globalConfig:   chat_gpt_token: sk-dw******   signing_key: ea657a******   account_id: 7935371f****** sinksConfig: - slack_sink:     name: main_slack_sink     slack_channel: pocs     api_key: xoxb****** - robusta_sink:     name: robusta_ui_sink     token: eyJhY2NvdW****** enablePrometheusStack: true # This part is added to the default generated_values.yaml enablePlatformPlaybooks: true runner:   sendAdditionalTelemetry: true rsa:   private: ******   public: ******  # This part is added to the default generated_values.yaml playbookRepos:   chatgpt_robusta_actions:     url: \"https:\/\/github.com\/robusta-dev\/kubernetes-chatgpt-bot.git\"  # This part is added to the default generated_values.yaml customPlaybooks: # Add the 'Ask ChatGPT' button to all Prometheus alerts - triggers:   - on_prometheus_alert: {}   actions:   - chat_gpt_enricher: {}<\/code><\/pre>\n<p>\u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c sink, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u043d\u044b \u0432 sinksConfig, \u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f Prometheus.<\/p>\n<p>6. \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 Helm chart, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c customPlaybooks:<\/p>\n<pre><code>helm upgrade robusta robusta\/robusta --values=generated_values.yaml<\/code><\/pre>\n<p>7. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (Prometheus) + \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (ChatGPT) + Slack:<\/p>\n<pre><code>kubectl apply -f https:\/\/raw.githubusercontent.com\/robusta-dev\/kubernetes-demos\/main\/pending_pods\/pending_pod.yaml  robusta playbooks trigger prometheus_alert alert_name=KubePodCrashLooping namespace=robusta pod_name=example-pod<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 Slack \u043a\u043d\u043e\u043f\u043a\u0443 \u00abAsk ChatGPT\u00bb.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>Robusta \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0440\u0435\u043c\u044f \u043f\u0443\u043d\u043a\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Kubernetes<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u043e\u0433\u0430\u0449\u0435\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0442\u0440\u0430\u0431\u043b\u0448\u0443\u0442\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 Robusta, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 Prometheus, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f Kubernetes \u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u0430\u043b\u0435\u0440\u0442\u044b, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 Python, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 ChatGPT \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0432\u0438\u0436\u043a\u043e\u043c Robusta \u0432\u00a0 \u0441\u0440\u0435\u0434\u0435 Kubernetes.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0442 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 Kubernetes \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u0421\u043b\u0451\u0440\u043c\u0435. \u041c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043a\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f K8s \u2014 \u00ab<a href=\"https:\/\/slurm.io\/kubernetes-baza?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=kubernetes-baza&amp;utm_content=article_25-04-2023&amp;utm_term=assiaapa\">Kubernetes \u0431\u0430\u0437\u0430<\/a>\u00bb \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u00abKubernetes \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432\u00bb \u2014 \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 Kubernetes.<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442: \u00abKubernetes \u0431\u0430\u0437\u0430\u00bb + \u00ab\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043b\u043e\u0433\u0438 \u0432 Kubernetes\u00bb. \u0423\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f\u00a0\u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/slurm.io\/kubernetes-baza?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=kubernetes-baza&amp;utm_content=article_25-04-2023&amp;utm_term=assiaapa#komplekt\">\u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435<\/a>.<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/731560\/\"> https:\/\/habr.com\/ru\/articles\/731560\/<\/a><br \/><\/br><\/br><\/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-385457","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385457","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=385457"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/385457\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}