{"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\/sq\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg","title":{"rendered":"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/0b7076a32f4c9a830bf6b765055510cc.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Monitorimi \u00ebsht\u00eb b\u00ebr\u00eb nj\u00eb komponent shum\u00eb i r\u00ebnd\u00ebsish\u00ebm i zgjidhjeve t\u00eb rritura cloud me rritjen e kompleksitetit t\u00eb sistemeve t\u00eb shp\u00ebrndara. Ai \u00ebsht\u00eb i nevojsh\u00ebm p\u00ebr t\u00eb kuptuar sjelljen e tyre. Nevojiten mjete t\u00eb shkall\u00ebzueshme q\u00eb mund t\u00eb mbledhin t\u00eb dh\u00ebna nga t\u00eb gjitha sh\u00ebrbimet - dhe t'u ofrojn\u00eb specialist\u00ebve nj\u00eb nd\u00ebrfaqe t\u00eb vetme me analiz\u00eb t\u00eb performanc\u00ebs, demostrimin e gabimeve, disponueshm\u00ebrin\u00eb dhe regjistrat. <\/p>\n<p><\/p>\n<p>K\u00ebto mjete gjithashtu duhet t\u00eb jen\u00eb efikase dhe t\u00eb shkall\u00ebzuara. N\u00eb k\u00ebt\u00eb artikull ne do t\u00eb shqyrtojm\u00eb dy stak\u00ebt e njohura t\u00eb teknologjis\u00eb: EFK (Elasticsearch) dhe PLG (Loki) dhe do t'i analizojm\u00eb arkitekturat dhe dallimet e tyre.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2 id=\"stek-efk\">Staku EFK<\/h2>\n<p><\/p>\n<p>Mund t\u00eb keni d\u00ebgjuar tashm\u00eb p\u00ebr ELK ose EFK, t\u00eb dyja jan\u00eb staka popullore q\u00eb p\u00ebrb\u00ebhen nga disa pjes\u00eb t\u00eb ve\u00e7anta: Elasticsearch (depo objektesh), Logstash ose FluentD (mbledhja dhe agregimi i regjistrave) dhe Kibana p\u00ebr vizualizimin.<\/p>\n<p><\/p>\n<p>Nj\u00eb skem\u00eb tipike e veprimit duket k\u00ebshtu:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr 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 nj\u00eb depo objektesh e shp\u00ebrndar\u00eb me k\u00ebrkim dhe analytic n\u00eb koh\u00eb reale. Nj\u00eb zgjidhje e shk\u00eblqyer p\u00ebr t\u00eb dh\u00ebna gjysm\u00eb t\u00eb strukturuara, si\u00e7 jan\u00eb regjistrat. Informacioni ruhet n\u00eb form\u00ebn e dokumenteve JSON, indikohet n\u00eb koh\u00eb reale dhe shp\u00ebrndahet n\u00eb nyjet e klasterit. P\u00ebrdoret nj\u00eb indeks i kthyer q\u00eb p\u00ebrmban t\u00eb gjitha fjal\u00ebt unike dhe dokumentet e lidhura me to p\u00ebr k\u00ebrkimin me tekst t\u00eb plot\u00eb, i cili bazohet n\u00eb motorin e k\u00ebrkimit Apache Lucene.<\/p>\n<p><\/p>\n<p><strong>FluentD<\/strong> \u2014 \u00ebsht\u00eb nj\u00eb mbledh\u00ebs t\u00eb dh\u00ebnash q\u00eb kryen unifikimin e t\u00eb dh\u00ebnave gjat\u00eb mbledhjes dhe konsumit. Ai p\u00ebrpiqet t\u00eb rendit\u00eb t\u00eb dh\u00ebnat n\u00eb JSON sa m\u00eb shum\u00eb q\u00eb t\u00eb jet\u00eb e mundur. Arkitektura e tij \u00ebsht\u00eb e shkall\u00ebzueshme, ka m\u00eb shum\u00eb se <noindex><a rel=\"nofollow\" href=\"https:\/\/www.fluentd.org\/plugins\/all\">qindra zgjatime t\u00eb ndryshme<\/a><\/noindex>, t\u00eb mb\u00ebshtetura nga komuniteti, p\u00ebr \u00e7do rast.<\/p>\n<p><\/p>\n<p><strong>Kibana<\/strong> \u2014 nj\u00eb mjet vizualizimi t\u00eb dh\u00ebnash p\u00ebr Elasticsearch me ve\u00e7ori t\u00eb ndryshme shtes\u00eb, si analiza e serive temporale, grafik\u00ebt, m\u00ebsimi automat, dhe t\u00eb tjera.<\/p>\n<p><\/p>\n<h3 id=\"arhitektura-elasticsearch\">Arkitektura e Elasticsearch<\/h3>\n<p><\/p>\n<p>T\u00eb dh\u00ebnat e klasterit Elasticsearch ruhen t\u00eb shp\u00ebrndara n\u00eb t\u00eb gjitha nyjet e tij. Klasteri p\u00ebrb\u00ebhet nga disa nyje p\u00ebr t\u00eb p\u00ebrmir\u00ebsuar disponueshm\u00ebrin\u00eb dhe q\u00ebndrueshm\u00ebrin\u00eb. \u00c7do nyje mund t\u00eb kryej\u00eb t\u00eb gjitha rolet e klasterit, por n\u00eb shp\u00ebrndarjet e m\u00ebdha t\u00eb shkall\u00ebzuara, nyjeve zakonisht u caktohen detyra t\u00eb ve\u00e7anta.<\/p>\n<p><\/p>\n<p>Llojet e nyjeve t\u00eb klasterit:<\/p>\n<p><\/p>\n<ul>\n<li>nyja master \u2014 menaxhon klasterin, jan\u00eb t\u00eb nevojshme t\u00eb pakt\u00ebn tre, nj\u00ebra \u00ebsht\u00eb gjithmon\u00eb aktive;<\/li>\n<li>nyja e dh\u00ebnave \u2014 ruan t\u00eb dh\u00ebna t\u00eb indeksuara dhe kryen detyra t\u00eb ndryshme me to;<\/li>\n<li>node i ngr\u00ebnies - organizon kanalet p\u00ebr konvertimin e t\u00eb dh\u00ebnave para indeksimit;<\/li>\n<li>node koordinues - rute k\u00ebrkesash, reduktim i faz\u00ebs s\u00eb p\u00ebrpunimit t\u00eb k\u00ebrkimeve, koordinimi i indeksimit masiv;<\/li>\n<li>node alarmimi - nisja e detyrave p\u00ebr njoftim;<\/li>\n<li>node m\u00ebsimi makinerik - p\u00ebrpunimi i detyrave t\u00eb m\u00ebsimit makinerik.<\/li>\n<\/ul>\n<p><\/p>\n<p>N\u00eb diagramin m\u00eb posht\u00eb tregohet si ruhet dhe riprodhohet t\u00eb dh\u00ebnat n\u00eb nodet p\u00ebr arritjen e nj\u00eb disponibiliteti m\u00eb t\u00eb lart\u00eb t\u00eb t\u00eb dh\u00ebnave.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/b476660dc60aca34fbe421b8eaf0ee31.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>T\u00eb dh\u00ebnat e \u00e7do replike ruhen n\u00eb indeksin e inverzituar, diagrami m\u00eb posht\u00eb tregon si ndodh kjo:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/0341c127742a5e8fe787f2076be0464f.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<h3 id=\"ustanovka\">Instalimi<\/h3>\n<p><\/p>\n<p>Detajet mund t\u00eb shihen <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\">k\u00ebtu<\/a><\/noindex>, do t\u00eb p\u00ebrdor helm chart:<\/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\">Steka PLG<\/h2>\n<p><\/p>\n<p>Nuk \u00ebsht\u00eb e \u00e7uditshme n\u00ebse nuk e gjeni k\u00ebt\u00eb akronim, pasi njihet m\u00eb shum\u00eb si Grafana Loki. N\u00eb \u00e7do rast, ky stek po fiton popullaritet, pasi aplikon zgjidhje teknike t\u00eb matur. Mund t\u00eb keni d\u00ebgjuar tashm\u00eb p\u00ebr Grafana, mjetin popullor p\u00ebr vizualizimin e t\u00eb dh\u00ebnave. Krijuesit e saj, duke u frym\u00ebzuar nga Prometheus, zhvilluan Loki, nj\u00eb sistem aggregimi log\u00ebsh me performanc\u00eb t\u00eb lart\u00eb, t\u00eb shkall\u00ebzuesh\u00ebm horizontalisht. Loki indekson vet\u00ebm metadat, por jo log\u00ebt vet\u00eb, kjo zgjidhje teknike e b\u00ebri at\u00eb t\u00eb leht\u00eb p\u00ebr t'u p\u00ebrdorur dhe ekonomik.<\/p>\n<p><\/p>\n<p><strong>Promtail<\/strong> - agjent p\u00ebr d\u00ebrgimin e log\u00ebve nga sistemi operativ n\u00eb klasterin Loki. <strong>N\u00ebse tashm\u00eb e dini se \u00e7far\u00eb \u00ebsht\u00eb analiza e grupeve dhe se si ta b\u00ebni n\u00eb SQL, kaloni menj\u00ebher\u00eb n\u00eb seksionin e fundit.<\/strong> - mjet vizualizimi bazuar n\u00eb t\u00eb dh\u00ebnat nga Loki.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/3cc613eacf013723d46e7d31ff166dac.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Loki \u00ebsht\u00eb nd\u00ebrtuar mbi t\u00eb nj\u00ebjtin parim si Prometheus, prandaj i p\u00ebrshtatet mir\u00eb ruajtjes dhe analiz\u00ebs s\u00eb log\u00ebve Kubernetes.<\/p>\n<p><\/p>\n<h3 id=\"arhitektura-loki\">Arkitektura e Loki<\/h3>\n<p><\/p>\n<p>Loki mund t\u00eb ekzekutohet si n\u00eb m\u00ebnyr\u00ebn e nj\u00eb procesi, ashtu edhe n\u00eb form\u00ebn e disa proceseve, q\u00eb siguron shkall\u00ebzim horizontal.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/82679c9a38f6115d0c8f3911533fb9f6.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Ai gjithashtu mund t\u00eb funksionoj\u00eb, si nj\u00eb aplikacion monolit, ashtu edhe si nj\u00eb mikrosh\u00ebrbim. Ekzekutimi n\u00eb form\u00ebn e nj\u00eb procesi mund t\u00eb jet\u00eb i dobish\u00ebm p\u00ebr zhvillimin lokal ose p\u00ebr monitorim t\u00eb vog\u00ebl. P\u00ebr zbatimin industrial dhe ngarkes\u00ebn e shkall\u00ebzueshme, rekomandohet t\u00eb p\u00ebrdoret varianti i mikrosh\u00ebrbimit. Rrug\u00ebt e regjistrimit dhe t\u00eb leximit t\u00eb t\u00eb dh\u00ebnave jan\u00eb t\u00eb ndara, k\u00ebshtu q\u00eb mund t\u00eb konfigurohet dhe t\u00eb shkall\u00ebzohet mjaft sakt\u00eb sipas nevoj\u00ebs.<\/p>\n<p><\/p>\n<p>Le t\u00eb shohim arkitektur\u00ebn e sistemit t\u00eb mbledhjes s\u00eb log\u00ebve pa detaje:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/f66b90693295acb723b01aecfd7381dd.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Dhe k\u00ebtu - p\u00ebrshkrimi (arkitektura mikrosh\u00ebrbimit):<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/a2d74e86e75c4fb3ef39823ed2170517.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Komponent\u00ebt:<\/p>\n<p><\/p>\n<p><strong>Promtail<\/strong> \u2014 agent, i instaluar n\u00eb nyje (si nj\u00eb grup sh\u00ebrbimesh), ai nxjerr loge nga detyrat dhe i drejtohet API-s\u00eb Kubernetes p\u00ebr t\u00eb marr\u00eb metadatat, me t\u00eb cilat do t\u00eb etiketohen loget. M\u00eb pas ai d\u00ebrgon logun n\u00eb sh\u00ebrbimin kryesor Loki. P\u00ebr p\u00ebrputhjen e metadataset, mbahen t\u00eb nj\u00ebjtat rregulla p\u00ebr etiketimin si n\u00eb Prometheus.<\/p>\n<p><\/p>\n<p><strong>Distributor<\/strong> \u2014 sh\u00ebrbim shp\u00ebrndar\u00ebs q\u00eb funksionon si nj\u00eb tampon. P\u00ebr t\u00eb p\u00ebrpunuar miliona regjistrime, ai paket loget e ardhshme, duke i ngjeshur ato n\u00eb blloqe sipas radh\u00ebs. Nj\u00ebkoh\u00ebsisht punojn\u00eb disa marr\u00ebs t\u00eb t\u00eb dh\u00ebnave, por loget q\u00eb i p\u00ebrkasin nj\u00eb rrjedhe t\u00eb vetme t\u00eb t\u00eb dh\u00ebnave duhet t\u00eb gjenden vet\u00ebm n\u00eb nj\u00eb prej tyre p\u00ebr t\u00eb gjith\u00eb blloqet e tij. Kjo organizohet n\u00eb form\u00ebn e nj\u00eb unaz\u00eb marr\u00ebsish dhe heshitjes sekondare. P\u00ebr q\u00ebndrueshm\u00ebri dhe tep\u00ebrsi, b\u00ebhet n her\u00eb (3, n\u00ebse nuk konfigurohen ndryshe).<\/p>\n<p><\/p>\n<p><strong>Ingester<\/strong> \u2014 sh\u00ebrbim marr\u00ebs. Blloqet e t\u00eb dh\u00ebnave vijn\u00eb t\u00eb ngjeshura me loget e shtuar. Sa her\u00eb q\u00eb blloku arrin nj\u00eb madh\u00ebsi t\u00eb mjaftueshme, ai shkarkohet n\u00eb baz\u00ebn e t\u00eb dh\u00ebnave. Metadat mbajn\u00eb indekse, nd\u00ebrsa t\u00eb dh\u00ebnat nga blloku me log mb\u00ebrrijn\u00eb n\u00eb Chunks (zakonisht kjo \u00ebsht\u00eb nj\u00eb ruajtje objektuale). Pas shkarkimit, marr\u00ebsi krijon nj\u00eb bllok t\u00eb ri, ku do t\u00eb shtohen regjistrimet e reja.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr 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 baz\u00eb t\u00eb dh\u00ebnash, DynamoDB, Cassandra, Google BigTable dhe t\u00eb tjera.<\/p>\n<p><\/p>\n<p><strong>Chunks<\/strong> \u2014 blloqe logesh n\u00eb form\u00eb t\u00eb ngjeshur, zakonisht ruhen n\u00eb ruajtje objektuale, p\u00ebr shembull, S3.<\/p>\n<p><\/p>\n<p><strong>Querier<\/strong> \u2014 rruga e leximit q\u00eb b\u00ebn gjith\u00eb pun\u00ebn e zez\u00eb. Ai shqyrton intervalin e koh\u00ebs dhe etiketat, m\u00eb pas shqyrton indekset p\u00ebr t\u00eb gjetur p\u00ebrputhje. M\u00eb pas lexon blloqet e t\u00eb dh\u00ebnave dhe i filtrojn\u00eb ato p\u00ebr t\u00eb marr\u00eb nj\u00eb rezultat.<\/p>\n<p><\/p>\n<p>Tani le t\u00eb shohim gjith\u00e7ka n\u00eb veprim.<\/p>\n<p><\/p>\n<h3 id=\"ustanovka-1\">Instalimi<\/h3>\n<p><\/p>\n<p>P\u00ebr t\u00eb instaluar n\u00eb Kubernetes, \u00ebsht\u00eb m\u00eb e leht\u00eb t\u00eb p\u00ebrdorim helm. Supozojm\u00eb se ju tashm\u00eb e keni vendosur dhe konfiguruar (<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/507656\/\">dhe versionin e tret\u00eb!<\/a><\/noindex> <em>sh\u00ebn. e p\u00ebrkthyesit<\/em>)<\/p>\n<p><\/p>\n<p>Shtojm\u00eb repozitorin dhe vendosim stek.<\/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>M\u00eb posht\u00eb \u00ebsht\u00eb nj\u00eb shembull i nj\u00eb paneli t\u00eb instrumenteve, ku jan\u00eb t\u00eb dh\u00ebnat nga Prometheus p\u00ebr metrikat Etcd dhe Loki p\u00ebr loget e podave Etcd.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Logimi n\u00eb Kubernetes: EFK kund\u00ebr PLG\" src=\"\/wp-content\/uploads\/2020\/07\/36efc5b7abe7ad3c3f8869bd09a9e3e7.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Tani le t\u00eb diskutojm\u00eb arkitektur\u00ebn e t\u00eb dyve, si dhe t\u00eb krahasojm\u00eb mund\u00ebsit\u00eb e tyre me nj\u00ebra-tjetr\u00ebn.<\/p>\n<p><\/p>\n<h2 id=\"sravnenie\">Krahasimi<\/h2>\n<p><\/p>\n<h3 id=\"yazyk-zaprosov\">Gjuha e pyetjeve<\/h3>\n<p><\/p>\n<p>N\u00eb Elasticsearch p\u00ebrdoret Query DSL dhe Lucene query language, t\u00eb cilat sigurojn\u00eb mund\u00ebsin\u00eb e k\u00ebrkimit me tekst t\u00eb plot\u00eb. Ky \u00ebsht\u00eb nj\u00eb motor k\u00ebrkimi i fuqish\u00ebm i konsoliduar me mb\u00ebshtetje t\u00eb gjer\u00eb p\u00ebr operator\u00eb. Me ndihm\u00ebn e tij, mund t\u00eb k\u00ebrkoni n\u00eb kontekst dhe t\u00eb renditni sipas relevanc\u00ebs. <\/p>\n<p><\/p>\n<p>N\u00eb an\u00ebn tjet\u00ebr t\u00eb ringut \u00ebsht\u00eb LogQL, i aplikuar n\u00eb Loki, pasardh\u00ebsi i PromQL (Prometheus query language). Ai p\u00ebrdor etiketat e log-eve p\u00ebr t\u00eb filtruar dhe marr\u00eb t\u00eb dh\u00ebnat e log-eve. Ka mund\u00ebsi t\u00eb p\u00ebrdoren disa operator\u00eb dhe aritmetik\u00eb, si\u00e7 p\u00ebrshkruhet <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/grafana\/loki\/blob\/master\/docs\/logql.md\">k\u00ebtu<\/a><\/noindex>, por n\u00eb mund\u00ebsi ai mbetet pas gjuh\u00ebs Elastic.<\/p>\n<p><\/p>\n<p>Duke qen\u00eb se k\u00ebrkesat n\u00eb Loki lidhen me etiketat, ato jan\u00eb t\u00eb lehta p\u00ebr t'u lidhur me metrikat, si rezultat \u00ebsht\u00eb m\u00eb e leht\u00eb t\u00eb organizoni monitorimin operativ me to.<\/p>\n<p><\/p>\n<h3 id=\"masshtabiruemost\">Shkall\u00ebzueshm\u00ebria<\/h3>\n<p><\/p>\n<p>T\u00eb dy stek\u00ebt jan\u00eb horizontalisht t\u00eb shkall\u00ebzuesh\u00ebm, por me Loki \u00ebsht\u00eb m\u00eb e thjesht\u00eb, pasi ka rrug\u00eb t\u00eb ndara p\u00ebr leximin dhe shkruan t\u00eb dh\u00ebnat, si dhe ka nj\u00eb arkitektur\u00eb mikrosh\u00ebrbimesh. Loki mund t\u00eb konfigurohet sipas karakteristikave tuaja dhe mund t\u00eb p\u00ebrdoret p\u00ebr volume shum\u00eb t\u00eb m\u00ebdha t\u00eb t\u00eb dh\u00ebnave t\u00eb log-eve.<\/p>\n<p><\/p>\n<h3 id=\"multiarendnost\">Multiaktorshm\u00ebria<\/h3>\n<p><\/p>\n<p>Multiaktorshm\u00ebria e klasterit \u00ebsht\u00eb nj\u00eb tem\u00eb e zakonshme p\u00ebr uljen e OPEX, t\u00eb dy stek\u00ebt ofrojn\u00eb multiaktorshm\u00ebri. P\u00ebr Elasticsearch ka disa <noindex><a rel=\"nofollow\" href=\"https:\/\/www.elastic.co\/blog\/found-multi-tenancy\">m\u00ebnyra<\/a><\/noindex> p\u00ebr ndarjen e klient\u00ebve: nj\u00eb indeks t\u00eb ve\u00e7ant\u00eb p\u00ebr \u00e7do klient, rrug\u00ebzim bazuar n\u00eb klientin, fusha unike t\u00eb klientit, filtre k\u00ebrkimi. N\u00eb Loki ka <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/grafana\/loki\/blob\/master\/docs\/operations\/multi-tenancy.md\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430<\/a><\/noindex> n\u00eb form\u00ebn e titullit HTTP X-Scope-OrgID.<\/p>\n<p><\/p>\n<h3 id=\"stoimost\">\u00c7mimi<\/h3>\n<p><\/p>\n<p>Loki \u00ebsht\u00eb shum\u00eb ekonomik p\u00ebr shkak se ai nuk b\u00ebn indeksimin e t\u00eb dh\u00ebnave, por vet\u00ebm t\u00eb metadatat. N\u00eb k\u00ebt\u00eb m\u00ebnyr\u00eb arrihet <noindex><a rel=\"nofollow\" href=\"https:\/\/grafana.com\/blog\/2020\/02\/19\/how-loki-reduces-log-storage\/\">kursim n\u00eb ruajtje<\/a><\/noindex> dhe memorje (cache), pasi ruajtja objektore \u00ebsht\u00eb m\u00eb e lir\u00eb se ajo blloku q\u00eb p\u00ebrdoret n\u00eb klasteret Elasticsearch.<\/p>\n<p><\/p>\n<h2 id=\"zaklyuchenie\">P\u00ebrfundim<\/h2>\n<p><\/p>\n<p>Steka EFK mund t\u00eb p\u00ebrdoret p\u00ebr q\u00ebllime t\u00eb ndryshme, duke ofruar fleksibilitet maksimal dhe nj\u00eb nd\u00ebrfaqe shum\u00ebfunksionale Kibana p\u00ebr analitik\u00eb, vizualizim dhe k\u00ebrkesa. Ai mund t\u00eb p\u00ebrmir\u00ebsohet m\u00eb tej me mund\u00ebsit\u00eb e m\u00ebsimit t\u00eb makinerive.<\/p>\n<p><\/p>\n<p>Steka Loki \u00ebsht\u00eb e dobishme n\u00eb ekosistemin Kubernetes p\u00ebr shkak t\u00eb mekanizmit t\u00eb zbulimit t\u00eb metadatat. Mund t\u00eb leht\u00ebsoj\u00eb p\u00ebrshtatjen e t\u00eb dh\u00ebnave p\u00ebr monitorimin e bazuar n\u00eb serit\u00eb e koh\u00ebs n\u00eb Grafana dhe log-e.<\/p>\n<p><\/p>\n<p>Kur flitet p\u00ebr koston dhe ruajtjen afatgjat\u00eb t\u00eb log-eve, Loki \u00ebsht\u00eb nj\u00eb zgjedhje e shk\u00eblqyer p\u00ebr hyrje n\u00eb zgjidhjet n\u00eb re.<\/p>\n<p><\/p>\n<p>N\u00eb treg ka m\u00eb shum\u00eb alternativa \u2014 disa mund t\u00eb jen\u00eb m\u00eb t\u00eb mira p\u00ebr ju. P\u00ebr shembull, p\u00ebr GKE ekziston integrimi me Stackdriver, i cili ofron nj\u00eb zgjidhje t\u00eb shk\u00eblqyer p\u00ebr monitorimin. Ne nuk i p\u00ebrfshim\u00eb ata n\u00eb analiz\u00ebn ton\u00eb n\u00eb k\u00ebt\u00eb artikull.<\/p>\n<p><\/p>\n<p>Lidhjet:<\/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>Artikulli \u00ebsht\u00eb p\u00ebrkthyer dhe p\u00ebrgatitur p\u00ebr Habr nga punonj\u00ebsit <noindex><a rel=\"nofollow\" href=\"http:\/\/to.slurm.io\/7x-vEQ\">e qendr\u00ebs m\u00ebsimore Slyrm<\/a><\/noindex> \u2014 intensiva, video-kurse dhe trajnime korporative nga specialist\u00eb praktik\u00eb (Kubernetes, DevOps, Docker, Ansible, Ceph, SRE, Agile)<\/em><\/p>\n<p>Burimi: <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.1.1 - 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\/sq\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\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\/sq\/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\udd47Regjistrimi n\u00eb Kubernetes: EFK ndaj PLG | ProHoster","description":"Monitorimi \u00ebsht\u00eb b\u00ebr\u00eb nj\u00eb komponent shum\u00eb i r\u00ebnd\u00ebsish\u00ebm.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/logirovanie-v-kubernetes-efk-protiv-plg","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","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\/sq\/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\/sq\/wp-json\/wp\/v2\/posts\/89038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=89038"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/89038\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/89039"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=89038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=89038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=89038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}