{"id":89038,"date":"2020-07-17T19:42:30","date_gmt":"2020-07-17T17:42:30","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg"},"modified":"2020-07-17T19:42:30","modified_gmt":"2020-07-17T17:42:30","slug":"logirovanie-v-kubernetes-efk-protiv-plg","status":"publish","type":"post","link":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg","title":{"rendered":"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/0b7076a32f4c9a830bf6b765055510cc.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>A monitoring system has become a crucial component of growing cloud solutions due to the increasing complexity of distributed systems. It is essential for understanding their behavior. Scalable tools are needed to collect data from all services and provide specialists with a unified interface for performance analysis, error demonstration, availability, and logs. <\/p>\n<p><\/p>\n<p>These tools must also be efficient and productive. In this article, we will examine two popular technology stacks: EFK (Elasticsearch) and PLG (Loki), and explore their architectures and differences.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2 id=\"stek-efk\">EFK Stack<\/h2>\n<p><\/p>\n<p>You may have already heard of the very popular ELK or EFK. The stack consists of several separate components: Elasticsearch (object storage), Logstash or FluentD (log collection and aggregation), and Kibana for visualization.<\/p>\n<p><\/p>\n<p>A typical operational scheme looks like this:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/75a2b7d079064f7aa662d9e27f73c3f2.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p><strong>Elasticsearch<\/strong> \u2014 a distributed object storage with real-time search and analytics. An excellent solution for semi-structured data, such as logs. Information is stored as JSON documents, indexed in real-time, and distributed across cluster nodes. An inverted index is applied, containing all unique words and the documents associated with them for full-text search, which is based on the Apache Lucene search engine.<\/p>\n<p><\/p>\n<p><strong>FluentD<\/strong> \u2014 is a data collector that performs data unification during collection and consumption. It strives to organize data in JSON as much as possible. Its architecture is extensible, with over <noindex><a rel=\"nofollow\" href=\"https:\/\/www.fluentd.org\/plugins\/all\">hundreds of different extensions<\/a><\/noindex>, supported by the community, for all use cases.<\/p>\n<p><\/p>\n<p><strong>Kibana<\/strong> \u2014 a data visualization tool for Elasticsearch with various additional capabilities, such as time series analysis, graphs, machine learning, and more.<\/p>\n<p><\/p>\n<h3 id=\"arhitektura-elasticsearch\">Elasticsearch Architecture<\/h3>\n<p><\/p>\n<p>Data in the Elasticsearch cluster is stored distributed across all its nodes. The cluster consists of multiple nodes to improve availability and resilience. Any node can perform all roles in the cluster, but in large scalable deployments, nodes are usually assigned specific tasks.<\/p>\n<p><\/p>\n<p>Types of cluster nodes:<\/p>\n<p><\/p>\n<ul>\n<li>master node \u2014 manages the cluster, with a minimum of three needed, one always active;<\/li>\n<li>data node \u2014 stores indexed data and performs various tasks with it;<\/li>\n<li>ingest node \u2014 adatbek\u00fcld\u0151 csom\u00f3pont, amely \u00fczemelteti az adatfeldolgoz\u00e1si csatorn\u00e1kat az indexel\u00e9s el\u0151tt;<\/li>\n<li>coordinating node \u2014 lek\u00e9rdez\u00e9sek ir\u00e1ny\u00edt\u00e1sa, a keres\u00e9si feldolgoz\u00e1si f\u00e1zis cs\u00f6kkent\u00e9se, t\u00f6meges indexel\u00e9s koordin\u00e1l\u00e1sa;<\/li>\n<li>alerting node \u2014 figyelmeztet\u00e9si feladatok ind\u00edt\u00e1sa;<\/li>\n<li>machine learning node \u2014 g\u00e9pi tanul\u00e1si feladatok feldolgoz\u00e1sa.<\/li>\n<\/ul>\n<p><\/p>\n<p>Az al\u00e1bbi diagram bemutatja, hogyan t\u00e1rolj\u00e1k \u00e9s replik\u00e1lj\u00e1k az adatokat a csom\u00f3pontok k\u00f6z\u00f6tt a nagyobb adat-el\u00e9rhet\u0151s\u00e9g \u00e9rdek\u00e9ben.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/b476660dc60aca34fbe421b8eaf0ee31.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Minden replik\u00e1hoz tartoz\u00f3 adatot megford\u00edtott indexben t\u00e1rolnak, az al\u00e1bbi s\u00e9ma bemutatja, hogyan t\u00f6rt\u00e9nik ez:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/0341c127742a5e8fe787f2076be0464f.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<h3 id=\"ustanovka\">Telep\u00edt\u00e9s<\/h3>\n<p><\/p>\n<p>A r\u00e9szleteket itt tekintheti meg <noindex><a rel=\"nofollow\" href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-set-up-an-elasticsearch-fluentd-and-kibana-efk-logging-stack-on-kubernetes\">itt<\/a><\/noindex>, \u00e9n a helm chartot fogom haszn\u00e1lni:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">$ helm install efk-stack stable\/elastic-stack --set logstash.enabled=false --set fluentd.enabled=true --set fluentd-elastics<\/code><\/pre>\n<p><\/p>\n<h2 id=\"stek-plg\">PLG stack<\/h2>\n<p><\/p>\n<p>Ne lep\u0151dj\u00f6n meg, ha nem tal\u00e1lja ezt a mozaiksz\u00f3t, ugyanis ezt ink\u00e1bb Grafana Loki-k\u00e9nt ismerik. Mindenesetre ez a stack n\u00e9pszer\u0171s\u00e9gnek \u00f6rvend, mivel j\u00f3l megfontolt technikai megold\u00e1sokat alkalmaz. Tal\u00e1n m\u00e1r hallott a Grafan\u00e1r\u00f3l, amely egy n\u00e9pszer\u0171 vizualiz\u00e1l\u00f3 eszk\u00f6z. A k\u00e9sz\u00edt\u0151i, a Prometheus inspir\u00e1l\u00e1s\u00e1val, megalkott\u00e1k a Lokit, egy v\u00edzszintesen sk\u00e1l\u00e1zhat\u00f3, nagy teljes\u00edtm\u00e9ny\u0171 napl\u00f3k aggreg\u00e1l\u00e1si rendszert. A Loki csak a metaadatokat indexeli, magukat a napl\u00f3kat nem, ez a technikai megold\u00e1s lehet\u0151v\u00e9 tette, hogy k\u00f6nnyen \u00fczemeltethet\u0151 \u00e9s gazdas\u00e1gos legyen.<\/p>\n<p><\/p>\n<p><strong>Promtail<\/strong> \u2014 egy \u00fcgyn\u00f6k a napl\u00f3k oper\u00e1ci\u00f3s rendszerb\u0151l a Loki klaszterbe val\u00f3 tov\u00e1bb\u00edt\u00e1s\u00e1ra. <strong>Grafan\u00e1ba<\/strong> \u2014 vizualiz\u00e1l\u00f3 eszk\u00f6z a Loki-b\u00f3l sz\u00e1rmaz\u00f3 adatok alapj\u00e1n.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/3cc613eacf013723d46e7d31ff166dac.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>A Loki ugyanazon alapelveken \u00e9p\u00fcl fel, mint a Prometheus, ez\u00e9rt j\u00f3l illeszkedik a Kubernetes napl\u00f3k t\u00e1rol\u00e1s\u00e1hoz \u00e9s elemz\u00e9s\u00e9hez.<\/p>\n<p><\/p>\n<h3 id=\"arhitektura-loki\">Loki architekt\u00fara<\/h3>\n<p><\/p>\n<p>A Loki egyetlen folyamatk\u00e9nt vagy t\u00f6bb folyamat form\u00e1j\u00e1ban is futtathat\u00f3, amely v\u00edzszintes sk\u00e1l\u00e1z\u00e1st biztos\u00edt.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/82679c9a38f6115d0c8f3911533fb9f6.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Ezen k\u00edv\u00fcl m\u0171k\u00f6dhet monolitikus alkalmaz\u00e1sk\u00e9nt vagy mikroszolg\u00e1ltat\u00e1sk\u00e9nt. Az egy folyamatban val\u00f3 futtat\u00e1s hasznos lehet helyi fejleszt\u00e9shez vagy kisebb monitoroz\u00e1shoz. Ipari alkalmaz\u00e1s \u00e9s sk\u00e1l\u00e1zhat\u00f3 terhel\u00e9s eset\u00e9n a mikroszolg\u00e1ltat\u00e1s verzi\u00f3 aj\u00e1nlott. Az adatok \u00edr\u00e1si \u00e9s olvas\u00e1si \u00fatvonalai elk\u00fcl\u00f6n\u00fclnek, \u00edgy finoman be\u00e1ll\u00edthat\u00f3 \u00e9s ig\u00e9ny szerint sk\u00e1l\u00e1zhat\u00f3.<\/p>\n<p><\/p>\n<p>N\u00e9zz\u00fck meg a napl\u00f3gy\u0171jt\u0151 rendszer architekt\u00far\u00e1j\u00e1t r\u00e9szletez\u00e9s n\u00e9lk\u00fcl:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/f66b90693295acb723b01aecfd7381dd.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Itt pedig a le\u00edr\u00e1s (mikroszolg\u00e1ltat\u00e1s architekt\u00fara):<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/a2d74e86e75c4fb3ef39823ed2170517.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u00d6sszetev\u0151k:<\/p>\n<p><\/p>\n<p><strong>Promtail<\/strong> \u2014 \u00fcgyn\u00f6k, amely csomagszolg\u00e1ltat\u00e1sok form\u00e1j\u00e1ban telep\u00edtve van a csom\u00f3pontokra, napl\u00f3kat gy\u0171jt a feladatokb\u00f3l, \u00e9s a Kubernetes API-n kereszt\u00fcl lek\u00e9ri a napl\u00f3k c\u00edmk\u00e9z\u00e9s\u00e9hez sz\u00fcks\u00e9ges metadat\u00e1kat. Ezut\u00e1n a napl\u00f3t elk\u00fcldi a Loki f\u0151 szolg\u00e1ltat\u00e1s\u00e1nak. A metadat\u00e1k c\u00edmk\u00e9z\u00e9s\u00e9hez haszn\u00e1lt szab\u00e1lyok megegyeznek a Prometheus szab\u00e1lyaival.<\/p>\n<p><\/p>\n<p><strong>Forgalmaz\u00f3<\/strong> \u2014 eloszt\u00f3szolg\u00e1ltat\u00e1s, amely pufferk\u00e9nt m\u0171k\u00f6dik. Milli\u00f3 bejegyz\u00e9s feldolgoz\u00e1sa \u00e9rdek\u00e9ben \u00f6sszegy\u0171jti a bej\u00f6v\u0151 adatokat, \u00e9s blokkokba t\u00f6m\u00f6r\u00edti azokat. Egyszerre t\u00f6bb adatfogad\u00f3 m\u0171k\u00f6dik, de az azonos bej\u00f6v\u0151 adatfolyamhoz tartoz\u00f3 napl\u00f3knak mindegyik blokk eset\u00e9ben csak egyben kell megjelenni\u00fck. Ez egy adatfogad\u00f3k k\u00f6r\u00e9 szervezve \u00e9s soros hashel\u00e9ssel t\u00f6rt\u00e9nik. A megb\u00edzhat\u00f3s\u00e1g \u00e9s a redundancia \u00e9rdek\u00e9ben n-szer (3, ha nem konfigur\u00e1lj\u00e1k) t\u00f6rt\u00e9nik.<\/p>\n<p><\/p>\n<p><strong>Ingester<\/strong> \u2014 adatfogad\u00f3 szolg\u00e1ltat\u00e1s. Az adatharm\u00f3nikus blokkok t\u00f6m\u00f6r\u00edtve \u00e9rkeznek a hozz\u00e1adott napl\u00f3kkal. Amint egy blokk elegend\u0151 m\u00e9ret\u0171v\u00e9 v\u00e1lik, a blokkot a adatb\u00e1zisba mentik. A metadat\u00e1k az indexbe, a napl\u00f3blokk adatai pedig a Chunks-ba ker\u00fclnek (ez \u00e1ltal\u00e1ban egy objektumt\u00e1rol\u00f3). A ment\u00e9s ut\u00e1n a fogad\u00f3 \u00faj blokkot hoz l\u00e9tre, ahov\u00e1 \u00faj bejegyz\u00e9seket adnak hozz\u00e1.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/a277021b303ffa3eb924b4dfc617564a.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p><strong>Index<\/strong> \u2014 adatb\u00e1zis, DynamoDB, Cassandra, Google BigTable, \u00e9s egyebek.<\/p>\n<p><\/p>\n<p><strong>Chunks<\/strong> \u2014 napl\u00f3t\u00f6mb\u00f6k t\u00f6m\u00f6r\u00edtett form\u00e1ban, \u00e1ltal\u00e1ban objektumt\u00e1rol\u00f3ban t\u00e1rolva, p\u00e9ld\u00e1ul S3-ban.<\/p>\n<p><\/p>\n<p><strong>Lek\u00e9rdez\u0151<\/strong> \u2014 olvas\u00e1si \u00fatvonal, ami az \u00f6sszes neh\u00e9z munk\u00e1t elv\u00e9gzi. Megn\u00e9zi az id\u0151tartom\u00e1nyt \u00e9s a c\u00edmk\u00e9ket, majd az indexet ellen\u0151rzi a meccsek keres\u00e9s\u00e9re. Ezut\u00e1n olvassa a adatblokkokat, \u00e9s sz\u0171ri \u0151ket az eredm\u00e9nyek el\u00e9r\u00e9s\u00e9hez.<\/p>\n<p><\/p>\n<p>Most n\u00e9zz\u00fck meg, hogyan m\u0171k\u00f6dik mindez.<\/p>\n<p><\/p>\n<h3 id=\"ustanovka-1\">Telep\u00edt\u00e9s<\/h3>\n<p><\/p>\n<p>A Kubernetesben a legegyszer\u0171bb a helm haszn\u00e1lata. Feltehet\u0151en m\u00e1r telep\u00edtette \u00e9s be\u00e1ll\u00edtotta (<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/507656\/\">\u00e9s a harmadik verzi\u00f3t!<\/a><\/noindex> <em>jegyzet: ford\u00edt\u00f3<\/em>)<\/p>\n<p><\/p>\n<p>Hozz\u00e1adjuk a t\u00e1rol\u00f3t \u00e9s telep\u00edtj\u00fck a stack-et.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">$ helm repo add loki https:\/\/grafana.github.io\/loki\/charts\n$ helm repo update\n$ helm upgrade --install loki loki\/loki-stack --set grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=false<\/code><\/pre>\n<p><\/p>\n<p>Az al\u00e1bbiakban egy ir\u00e1ny\u00edt\u00f3pult p\u00e9ld\u00e1j\u00e1t l\u00e1thatjuk, ahol a Prometheus adatait mutatja az Etcd metrik\u00e1khoz \u00e9s a Lokihoz a podok napl\u00f3z\u00e1sa sz\u00e1m\u00e1ra.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Bejelentkez\u00e9s a Kubernetesbe: EFK vs. PLG\" src=\"\/wp-content\/uploads\/2020\/07\/36efc5b7abe7ad3c3f8869bd09a9e3e7.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Most n\u00e9zz\u00fck meg a k\u00e9t rendszer architekt\u00far\u00e1j\u00e1t, \u00e9s hasonl\u00edtsuk \u00f6ssze a k\u00e9pess\u00e9geiket.<\/p>\n<p><\/p>\n<h2 id=\"sravnenie\">\u00d6sszehasonl\u00edt\u00e1s<\/h2>\n<p><\/p>\n<h3 id=\"yazyk-zaprosov\">Lek\u00e9rdez\u0151nyelv<\/h3>\n<p><\/p>\n<p>Az Elasticsearch a Query DSL-t \u00e9s a Lucene lek\u00e9rdez\u00e9si nyelvet haszn\u00e1lja, amelyek lehet\u0151v\u00e9 teszik a teljes sz\u00f6veges keres\u00e9st. Ez egy megb\u00edzhat\u00f3 \u00e9s er\u0151teljes keres\u0151motor, amely sz\u00e9les k\u00f6r\u0171 oper\u00e1tor t\u00e1mogat\u00e1ssal rendelkezik. Seg\u00edts\u00e9g\u00e9vel kontextus szerint kereshet, \u00e9s relevancia alapj\u00e1n rendezheti az eredm\u00e9nyeket. <\/p>\n<p><\/p>\n<p>A m\u00e1sik oldalon a ringben ott van a LogQL, amelyet a Loki haszn\u00e1l, a PromQL (Prometheus lek\u00e9rdez\u00e9si nyelv) \u00f6r\u00f6k\u00f6se. Ez a napl\u00f3 c\u00edmk\u00e9ket haszn\u00e1l a napl\u00f3adatok sz\u0171r\u00e9s\u00e9re \u00e9s lek\u00e9rdez\u00e9s\u00e9re. Olyan oper\u00e1torok \u00e9s aritmetika alkalmaz\u00e1s\u00e1ra is lehet\u0151s\u00e9g van, ahogy azt le\u00edrt\u00e1k, <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/grafana\/loki\/blob\/master\/docs\/logql.md\">itt<\/a><\/noindex>, de lehet\u0151s\u00e9geit tekintve elmarad az Elastic nyelvt\u0151l.<\/p>\n<p><\/p>\n<p>Mivel a Loki lek\u00e9rdez\u00e9sek a c\u00edmk\u00e9khez kapcsol\u00f3dnak, ezeket k\u00f6nnyen \u00f6ssze lehet kapcsolni a metrik\u00e1kkal, ami megk\u00f6nny\u00edti az operat\u00edv fel\u00fcgyelet megszervez\u00e9s\u00e9t.<\/p>\n<p><\/p>\n<h3 id=\"masshtabiruemost\">Sk\u00e1l\u00e1zhat\u00f3s\u00e1g<\/h3>\n<p><\/p>\n<p>Mindk\u00e9t r\u00e9teg v\u00edzszintesen sk\u00e1l\u00e1zhat\u00f3, de a Lokin\u00e1l ez egyszer\u0171bb, mivel az adatolvas\u00e1si \u00e9s -\u00edr\u00e1si utak el vannak v\u00e1lasztva, emellett mikroszolg\u00e1ltat\u00e1s-architekt\u00far\u00e1val rendelkezik. A Loki a saj\u00e1t saj\u00e1toss\u00e1gaihoz igaz\u00edthat\u00f3, \u00e9s k\u00e9pes nagyon nagy mennyis\u00e9g\u0171 napl\u00f3adatok kezel\u00e9s\u00e9re.<\/p>\n<p><\/p>\n<h3 id=\"multiarendnost\">T\u00f6bbb\u00e9rletess\u00e9g<\/h3>\n<p><\/p>\n<p>A klaszter t\u00f6bbb\u00e9rletess\u00e9ge k\u00f6z\u00f6s t\u00e9ma az OPEX cs\u00f6kkent\u00e9s\u00e9ben, mindk\u00e9t r\u00e9teg biztos\u00edtja a t\u00f6bbb\u00e9rletess\u00e9get. Az Elasticsearch eset\u00e9ben t\u00f6bb <noindex><a rel=\"nofollow\" href=\"https:\/\/www.elastic.co\/blog\/found-multi-tenancy\">m\u00f3don<\/a><\/noindex> lehet \u00fcgyfelek sz\u00e9tv\u00e1laszt\u00e1s\u00e1t v\u00e9gezni: egyedi index minden \u00fcgyf\u00e9l sz\u00e1m\u00e1ra, \u00fcgyf\u00e9l alap\u00fa ir\u00e1ny\u00edt\u00e1s, egyedi \u00fcgyf\u00e9lmez\u0151k, keres\u00e9si sz\u0171r\u0151k. A Loki eset\u00e9ben pedig <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/grafana\/loki\/blob\/master\/docs\/operations\/multi-tenancy.md\">Passkey<\/a><\/noindex> a HTTP X-Scope-OrgID fejl\u00e9c seg\u00edts\u00e9g\u00e9vel.<\/p>\n<p><\/p>\n<h3 id=\"stoimost\">\u00c1r<\/h3>\n<p><\/p>\n<p>A Loki gazdas\u00e1gilag nagyon hat\u00e9kony, mivel nem indexeli az adatokat, csak a metaadatokat. Ezzel <noindex><a rel=\"nofollow\" href=\"https:\/\/grafana.com\/blog\/2020\/02\/19\/how-loki-reduces-log-storage\/\">takar\u00e9koskod\u00e1s \u00e9rhet\u0151 el a t\u00e1rol\u00f3n<\/a><\/noindex> \u00e9s a mem\u00f3ri\u00e1ban (gyors\u00edt\u00f3t\u00e1r), mivel az objektumt\u00e1rol\u00e1s olcs\u00f3bb, mint a blokkos t\u00e1rol\u00e1s, amely az Elasticsearch klaszterekben haszn\u00e1latos.<\/p>\n<p><\/p>\n<h2 id=\"zaklyuchenie\">Z\u00e1r\u00e1s<\/h2>\n<p><\/p>\n<p>Az EFK r\u00e9teg k\u00fcl\u00f6nf\u00e9le c\u00e9lokra haszn\u00e1lhat\u00f3, maxim\u00e1lis rugalmass\u00e1got biztos\u00edtva, \u00e9s sokoldal\u00fa Kibana fel\u00fclet \u00e1ll rendelkez\u00e9sre az elemz\u00e9shez, vizualiz\u00e1ci\u00f3hoz \u00e9s lek\u00e9rdez\u00e9sekhez. Ezt tov\u00e1bb lehet jav\u00edtani a g\u00e9pi tanul\u00e1s lehet\u0151s\u00e9geivel.<\/p>\n<p><\/p>\n<p>A Loki r\u00e9teg hasznos a Kubernetes \u00f6kosziszt\u00e9m\u00e1ban a metaadatok felfedez\u00e9si mechanizmusa miatt. K\u00f6nnyen \u00f6ssze lehet kapcsolni az id\u0151beli sorokban t\u00f6rt\u00e9n\u0151 monitoring adatait a Grafana-ban \u00e9s napl\u00f3kkal.<\/p>\n<p><\/p>\n<p>Ha a napl\u00f3k k\u00f6lts\u00e9g\u00e9r\u0151l \u00e9s hossz\u00fa t\u00e1v\u00fa t\u00e1rol\u00e1s\u00e1r\u00f3l van sz\u00f3, a Loki kiv\u00e1l\u00f3 v\u00e1laszt\u00e1s a felh\u0151megold\u00e1sokhoz val\u00f3 bel\u00e9p\u00e9shez.<\/p>\n<p><\/p>\n<p>A piacon t\u00f6bb alternat\u00edva is l\u00e9tezik \u2014 egyesek ak\u00e1r jobbak is lehetnek az \u00d6n sz\u00e1m\u00e1ra. P\u00e9ld\u00e1ul a GKE eset\u00e9ben el\u00e9rhet\u0151 a Stackdriver integr\u00e1ci\u00f3, amely kiv\u00e1l\u00f3 megold\u00e1st ny\u00fajt a monitoroz\u00e1sra. Ezeket nem vontuk be a cikk\u00fcnk elemz\u00e9s\u00e9be.<\/p>\n<p><\/p>\n<p>Linkek:<\/p>\n<p><\/p>\n<ul>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/grafana\/loki\/blob\/master\/docs\/overview\/comparisons.md\">https:\/\/github.com\/grafana\/loki\/blob\/master\/docs\/overview\/comparisons.md<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/www.elastic.co\/blog\/found-elasticsearch-from-the-bottom-up\">https:\/\/www.elastic.co\/blog\/found-elasticsearch-from-the-bottom-up<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/www.elastic.co\/blog\/found-elasticsearch-in-production\/\">https:\/\/www.elastic.co\/blog\/found-elasticsearch-in-production\/<\/a><\/noindex><\/li>\n<\/ul>\n<p><\/p>\n<p><em>A cikket a Habr sz\u00e1m\u00e1ra a Slurm oktat\u00f3k\u00f6zpont munkat\u00e1rsai ford\u00edtott\u00e1k \u00e9s k\u00e9sz\u00edtett\u00e9k el <noindex><a rel=\"nofollow\" href=\"http:\/\/to.slurm.io\/7x-vEQ\">\u2014 intenz\u00edv programok, vide\u00f3kurzusok \u00e9s v\u00e1llalati k\u00e9pz\u00e9s gyakorl\u00f3 szakemberekt\u0151l (Kubernetes, DevOps, Docker, Ansible, Ceph, SRE)<\/a><\/noindex> \u2014 intenz\u00edv kurzusok, vide\u00f3k\u00e9pz\u00e9sek \u00e9s c\u00e9ges oktat\u00e1s gyakorl\u00f3 szakemberekt\u0151l (Kubernetes, DevOps, Docker, Ansible, Ceph, SRE, Agile)<\/em><\/p>\n<p>Forr\u00e1s: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/510822\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u0442\u0430\u043b \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0430\u0436\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041e\u043d \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438\u0445 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041d\u0443\u0436\u043d\u044b \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u2014 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u043e\u0448\u0438\u0431\u043e\u043a, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0436\u0443\u0440\u043d\u0430\u043b\u0430\u043c\u0438. \u042d\u0442\u0438 \u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":89039,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-89038","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u0442\u0430\u043b \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0430\u0436\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"hu_HU\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Kubernetes: EFK \u043f\u0440\u043e\u0442\u0438\u0432 PLG | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u0442\u0430\u043b \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0430\u0436\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-17T17:42:30+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-17T17:42:30+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Loggol\u00e1s Kubernetesben: EFK vs. PLG | ProHoster","description":"A monitoroz\u00e1s rendk\u00edv\u00fcl fontos komponenss\u00e9 v\u00e1lt.","canonical_url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"hu_HU","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Kubernetes: EFK \u043f\u0440\u043e\u0442\u0438\u0432 PLG | ProHoster","og:description":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u0442\u0430\u043b \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0430\u0436\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c.","og:url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-17T17:42:30+00:00","article:modified_time":"2020-07-17T17:42:30+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"89038","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:17:22","updated":"2022-09-28 02:02:56","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/89038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/comments?post=89038"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/89038\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media\/89039"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media?parent=89038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/categories?post=89038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/tags?post=89038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}