apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: quickstart
spec:
version: 7.12.1
count: 1
elasticsearchRef:
name: quickstart
[root@node1 ELK]# kubectl get kibanas.kibana.k8s.elastic.co 
NAME HEALTH NODES VERSION AGE
quickstart green 3 7.12.0 20d
[root@node1 ELK]# kubectl get svc 
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
quickstart-kb-http NodePort 10.98.175.63 <none> 5601:31259/TCP 20d
  • FileBeat : 말그대로 서버에 존재하는 Log file 수집하는 Beat
  • MetricBeat : 서버에 존재하는 자원 정보를 수집하는 Beat
#curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.12.0-x86_64.rpm 
#sudo rpm -vi filebeat-7.12.0-x86_64.rpm
#vi /etc/filebeat/filebeat.yml=========filebeat input===================
enabled: true -> (false이면 true로 바꿔줌)
paths:
- /var/log/*.log (수집할 경로 및 로그 확장자)
.......output.elasticsearch:
hosts: ["<es_url>"]
username: "elastic"
password: "<password>"
setup.kibana:
host: "<kibana_url>"
#filebeat setup
#systemctl start filebeat.service
Discover / Logs 탭
#curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.12.0-x86_64.rpm 
#sudo rpm -vi metricbeat-7.12.0-x86_64.rpm
#vi /etc/metricbeat/metricbeat.yml
output.elasticsearch:
hosts: ["<es_url>"]
username: "elastic"
password: "<password>"
setup.kibana:
host: "<kibana_url>"
#sudo metricbeat modules enable kubernetes
#metricbeat setup
#systemctl start metricbeat.service
env:        
- name: ELASTICSEARCH_HOST
value: elasticsearch
- name: ELASTICSEARCH_PORT
value: "9200"
- name: ELASTICSEARCH_USERNAME
value: elastic
- name: ELASTICSEARCH_PASSWORD
value: changeme
#kubectl apply -f metricbeat-kubernetes.yaml
Discover / Metric 탭

--

--

gooby goober yeah

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store