当前位置:网站首页>Kubernetes deploys Loki logging system
Kubernetes deploys Loki logging system
2022-07-02 08:42:00 【freesharer】
loki brief introduction
Loki Is subject to Prometheus Heuristic, horizontally scalable , Highly available multi tenant log aggregation system . It is designed to be very light, efficient and easy to operate . It doesn't index the contents of the log , Instead, set a set of labels for each log stream . A small index and highly compressed blocks simplify the operation , Significantly reduced Loki Cost of .

Loki The architecture of is very simple , Mainly by the following 3 Component composition :
- Loki Is the primary server , Responsible for storing logs and processing queries .
- Promtail Is the agent , Responsible for collecting logs and sending them to Loki .
- Grafana be used for UI Exhibition .
helm install loki
Reference resources :
https://grafana.github.io/loki/charts/
https://grafana.com/docs/loki/latest/installation/helm/
add to helm repo
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
install loki, If you enable persistence, you need to provide it yourself storageclass
helm upgrade --install loki grafana/loki-stack \
--namespace=loki-stack \
--create-namespace \
--set grafana.enabled=true \
--set loki.persistence.enabled=true \
--set loki.persistence.storageClassName=longhorn \
--set loki.persistence.size=5Gi
View the created pods
[[email protected] ~]# kubectl -n loki-stack get pods
NAME READY STATUS RESTARTS AGE
loki-0 1/1 Running 0 28m
loki-grafana-6886db999c-djnhz 1/1 Running 0 28m
loki-promtail-krkxl 1/1 Running 0 28m
loki-promtail-mgdxh 1/1 Running 0 28m
loki-promtail-z7wl2 1/1 Running 0 28m
see service
[[email protected] ~]# kubectl -n loki-stack get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
loki ClusterIP 10.101.148.142 <none> 3100/TCP 29m
loki-grafana NodePort 10.97.174.254 <none> 80:31451/TCP 29m
loki-headless ClusterIP None <none> 3100/TCP 29m
View persistent volumes
[[email protected] ~]# kubectl -n loki-stack get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
storage-loki-0 Bound pvc-854c0d90-266c-41fe-af13-33883b4da5e8 5Gi RWO longhorn 29m
loki Query log
obtain grafana admin User password
kubectl get secret --namespace loki-stack loki-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
modify grafana service The type is nodeport
kubectl -n loki-stack patch svc loki-grafana -p '{"spec": {"type": "NodePort"}}'
Use any node IP+nodePort Sign in loki
http://192.168.0.22:31451
To configure Grafana Loki data source , Default configured 
Switch to Explore Interface 
see pod journal 
Reference resources :
https://anoyi.com/p/474a5034a501
边栏推荐
- What is SQL injection
- How to build the alliance chain? How much is the development of the alliance chain
- IP protocol and IP address
- C language replaces spaces in strings with%20
- 整理秒杀系统的面试必备!!!
- Realize bidirectional linked list (with puppet node)
- Sqli labs level 12
- gocv opencv exit status 3221225785
- Jz-061-serialized binary tree
- File upload Labs
猜你喜欢

sqli-labs(POST类型注入)
![[blackmail virus data recovery] suffix Rook3 blackmail virus](/img/46/debc848d17767d021f3f41924cccfe.jpg)
[blackmail virus data recovery] suffix Rook3 blackmail virus

Gateway is easy to use

2022 Heilongjiang's latest eight member (Safety Officer) simulated test question bank and answers

sqli-labs第12关

Linux binary installation Oracle database 19C

How to build the alliance chain? How much is the development of the alliance chain

Method recursion (Fibonacci sequence, frog jumping steps, tower of Hanoi problem)

Linux安装Oracle Database 19c

sqli-labs第8关(布尔盲注)
随机推荐
Sqli labs Level 2
Minecraft群組服開服
Application of kotlin - higher order function
[blackmail virus data recovery] suffix Hydra blackmail virus
Web security -- Logical ultra vires
Linux安装Oracle Database 19c RAC
Linux安装Oracle Database 19c
STM32-新建工程(参考正点原子)
Benefits of ufcs of D
HackTheBox-Gunship
程序猿学英语-指令式编程
KubeSphere 虚拟化 KSV 安装体验
Makefile基本原理
Openshift build image
Minecraft空岛服开服
Tcp/ip - transport layer
HCIA—数据链路层
Linked list classic interview questions (reverse the linked list, middle node, penultimate node, merge and split the linked list, and delete duplicate nodes)
顺序表基本功能函数的实现
Qt QTimer类