{"id":31382,"date":"2024-02-27T15:26:53","date_gmt":"2024-02-27T14:26:53","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=31382"},"modified":"2024-09-10T17:40:42","modified_gmt":"2024-09-10T15:40:42","slug":"monitor-kubernetes-with-zabbix","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/","title":{"rendered":"Monitor Kubernetes with Zabbix"},"content":{"rendered":"\n<p>Zabbix might not be the first monitoring tool that comes in mind when you want to monitor a Kubernetes cluster (Did you say Prometheus? \ud83d\ude42 ). Nevertheless, as an open-source project, Zabbix have affinities with others open-source projects.<\/p>\n\n\n\n<p>In this blog post, we will see how easy it is to monitor a Kubernetes cluster with Zabbix.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-monitoring-architecture\">Monitoring Architecture<\/h2>\n\n\n\n<p>As Kubernetes is a container orchestration system for automating software deployment [&#8230;] (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Kubernetes\" target=\"_blank\" rel=\"noreferrer noopener\">wikipedia<\/a>), you don&#8217;t want to manually install a Zabbix agent on each node of the cluster. With that in mind, Zabbix developed a helm chart to deploy what is required to monitor the cluster:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A DaemonSet on all cluster nodes for Zabbix agent (one agent per node)<\/li>\n\n\n\n<li>A single replica deployment for the Zabbix proxy who will act as a collection point for all Zabbix agents<\/li>\n<\/ul>\n\n\n\n<p>The Zabbix proxy will run in ActiveMode meaning that it will get configuration from Zabbix server and push data to it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-kubernetes-preparation\">Kubernetes Preparation<\/h2>\n\n\n\n<p>Among all the customizable values of the <a href=\"https:\/\/git.zabbix.com\/projects\/ZT\/repos\/kubernetes-helm\/browse\/values.yaml\" target=\"_blank\" rel=\"noreferrer noopener\">helm chart<\/a>, the most important is the Zabbix server IP\/hostname as Zabbix proxy requires it to push data to Zabbix server:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\n    - name: ZBX_SERVER_HOST\n      value: &quot;192.168.x.y&quot;\n<\/pre><\/div>\n\n\n<p>Once the chart has been installed in the dedicated monitoring namespace of your Kubernetes cluster, we should be able to see the pods:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ kubectl get pods -n monitoring\nNAME                                         READY   STATUS    RESTARTS   AGE\nzabbix-agent-lbwsg                           1\/1     Running   0          15m\nzabbix-kube-state-metrics-64aac65c45-g9n94   1\/1     Running   0          15m\nzabbix-proxy-5b4faaff64-xf8wk                1\/1     Running   0          15m\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-zabbix-web-ui\">Zabbix Web UI<\/h2>\n\n\n\n<p>On Zabbix side, we must create the zabbix proxy:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"325\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_01_08-Zabbix-server_-Configuration-of-proxies-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-31386\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_01_08-Zabbix-server_-Configuration-of-proxies-\u2014-Mozilla-Firefox.png 742w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_01_08-Zabbix-server_-Configuration-of-proxies-\u2014-Mozilla-Firefox-300x131.png 300w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>Next, we can create a &#8220;fake&#8221; host as it does not really correspond to any host. It is just a place holder for the configuration that must be provided to Zabbix proxy:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"653\" height=\"518\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_09_00-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-31387\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_09_00-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png 653w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_09_00-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-300x238.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<p>There is no need to set an interface as the selected template will not use it anyway. In the Macros tab, we must set two of them:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>{$KUBE.API.URL}<\/li>\n\n\n\n<li>{$KUBE.API.TOKEN}<\/li>\n<\/ul>\n\n\n\n<p>Thus, it will look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"247\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-31388\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png 944w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-300x78.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-768x201.png 768w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/figure>\n\n\n\n<p>After a couple of minutes, you will see a new host with Zabbix agent in green:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"83\" src=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-1024x83.png\" alt=\"\" class=\"wp-image-31389\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-1024x83.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-300x24.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox-768x62.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2024\/02\/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-\u2014-Mozilla-Firefox.png 1341w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The IP 192.168.49.2 is an IP internal the Kubernetes cluster (here provisioned with <a href=\"https:\/\/minikube.sigs.k8s.io\/docs\/\" target=\"_blank\" rel=\"noreferrer noopener\">minikube<\/a> on a raspberry pi 4).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zabbix might not be the first monitoring tool that comes in mind when you want to monitor a Kubernetes cluster (Did you say Prometheus? \ud83d\ude42 ). Nevertheless, as an open-source project, Zabbix have affinities with others open-source projects. In this blog post, we will see how easy it is to monitor a Kubernetes cluster with [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1320,1522],"tags":[2634,143,2430],"type_dbi":[],"class_list":["post-31382","post","type-post","status-publish","format-standard","hentry","category-devops","category-kubernetes","tag-kubernetes-2","tag-monitoring","tag-zabbix"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Monitor Kubernetes with Zabbix - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Monitor Kubernetes with Zabbix\" \/>\n<meta property=\"og:description\" content=\"Zabbix might not be the first monitoring tool that comes in mind when you want to monitor a Kubernetes cluster (Did you say Prometheus? \ud83d\ude42 ). Nevertheless, as an open-source project, Zabbix have affinities with others open-source projects. In this blog post, we will see how easy it is to monitor a Kubernetes cluster with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-27T14:26:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-10T15:40:42+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Monitor Kubernetes with Zabbix\",\"datePublished\":\"2024-02-27T14:26:53+00:00\",\"dateModified\":\"2024-09-10T15:40:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\"},\"wordCount\":329,\"commentCount\":0,\"keywords\":[\"kubernetes\",\"Monitoring\",\"Zabbix\"],\"articleSection\":[\"DevOps\",\"Kubernetes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\",\"name\":\"Monitor Kubernetes with Zabbix - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2024-02-27T14:26:53+00:00\",\"dateModified\":\"2024-09-10T15:40:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitor Kubernetes with Zabbix\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Monitor Kubernetes with Zabbix - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/","og_locale":"en_US","og_type":"article","og_title":"Monitor Kubernetes with Zabbix","og_description":"Zabbix might not be the first monitoring tool that comes in mind when you want to monitor a Kubernetes cluster (Did you say Prometheus? \ud83d\ude42 ). Nevertheless, as an open-source project, Zabbix have affinities with others open-source projects. In this blog post, we will see how easy it is to monitor a Kubernetes cluster with [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/","og_site_name":"dbi Blog","article_published_time":"2024-02-27T14:26:53+00:00","article_modified_time":"2024-09-10T15:40:42+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Monitor Kubernetes with Zabbix","datePublished":"2024-02-27T14:26:53+00:00","dateModified":"2024-09-10T15:40:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/"},"wordCount":329,"commentCount":0,"keywords":["kubernetes","Monitoring","Zabbix"],"articleSection":["DevOps","Kubernetes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/","url":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/","name":"Monitor Kubernetes with Zabbix - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2024-02-27T14:26:53+00:00","dateModified":"2024-09-10T15:40:42+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/monitor-kubernetes-with-zabbix\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Monitor Kubernetes with Zabbix"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/31382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=31382"}],"version-history":[{"count":5,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/31382\/revisions"}],"predecessor-version":[{"id":31391,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/31382\/revisions\/31391"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=31382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=31382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=31382"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=31382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}