SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
k8s monitoring & alert
with elasticsearch
Kubernetes Korea Group Meetup
2018.11.23
윤종원 (sabper@gmail.com)
...
• SI 

• 

• (?)
( ...) 

• ( ??!!)

• infra ... ,,

• k8s ...
...
• k8s ELK stack 

• k8s 

• k8s cpu, memory, disk resource 

• alarm …

• ELK k8s log / monitoring
prometheus !!!
• ...

• node-exporter, kube-state-metrics, …

• !! - ?

• ..

• ... ( ... )

• [OpenInfra Days Korea 2018] OpenInfra monitoring with Prometheus
ELK
• ELK stack .. 

• ES ELK stack 

• - ... 

• ...!!!

• (   )
for k8s pod
k8s application
?
• k8s ,

• kubectl logs -f pod-name

• - 

• ,

• ...

• ,,, (reponse time per sec, request per sec …)

-> -> ( ) -> ` ` !!
k8s filebeat to kafka
pod container log
system log
ingress-nginx log
with add_kubernetes_metadata
container_name, conatiner_label, node_name …
filebeat k8s deploy !!
https://github.com/elastic/examples/tree/master/MonitoringKubernetes
filebeat - k8s
,,,
... ...
filebeat multiline
java exception 1 row multi row -> filebeat multi row
2018-08-30 09:44:22.847 [pool-2-thread-1] INFO com.barogo.dispatch.util.Util:46 APIPoint getCall0Riders 0 141
Aug 31, 2018 5:52:48 PM com.amazonaws.http.AmazonHttpClient executeHelper
INFO: Unable to execute HTTP request: Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:209)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
ConfigMap - filebeat input 

- input type docker - docker log

- multiline pattern 

- java multiline example

- Test multiline pattern
filebeat drop_event
k8s pod healthcheck access log
2018-11-21T00:08:41.294Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.318 ms]
"Request-Body" :{}
"Response-Body" : ""
2018-11-21T00:08:41.485Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.317 ms]
"Request-Body" :{}
"Response-Body" : ""
2018-11-21T00:08:44.485Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.338 ms]
"Request-Body" :{}
"Response-Body" : ""
2018-11-21T00:08:47.485Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.371 ms]
"Request-Body" :{}
"Response-Body" : ""
ConfigMap - processors 

- drop_event 

- condition 

- 

- Test multiline pattern
Why? Logstash & Kafka
• metadata

• , id 

• logstash order_no, uid filed 

• 

• filebeat ,

• filebeat output logstash , filebeat -> kafka -> logstash -> elasticsearch cloud
kibana
logstash - json parsing
flask_response {"timestamp": 1533106987681, "gps": [{"lat": 37.5208423071, "lon": 127.0370946609}, {"lat": 37.5168702957094, "lon": 127.038314337406}], "route": [{"lat":
37.5208423071, "lon": 127.0370946609}, {"lat": 37.52101092506974, "lon": 127.037041062907}, {"lat": 37.5211672, "lon": 127.0375327}, {"lat": 37.5204709, "lon": 127.0376081},
{"lat": 37.5197674, "lon": 127.0377019}, {"lat": 37.5194147, "lon": 127.0377445}, {"lat": 37.5192907, "lon": 127.0377578}, {"lat": 37.5194287, "lon": 127.0383417}, {"lat":
37.5188587, "lon": 127.0385572}, {"lat": 37.5183706, "lon": 127.0387465}, {"lat": 37.5178821, "lon": 127.0389347}, {"lat": 37.5173377, "lon": 127.0391453}, {"lat": 37.5172205,
"lon": 127.0387591}, {"lat": 37.51708223867784, "lon": 127.03825608200496}, {"lat": 37.5168702957094, "lon": 127.038314337406}], "second": 135, "distance": 718,
"call_status": "rest", "order_no": 1, "uid": "uid", "platform": "PostmanRuntime", "endpoint": "route", "duplicates": "remove", "nearest_node_within": 150,
"smoothing_node_within": 2.5, "st_ed": 0.1368551254272461, "st_sp1": -2.5033950805664062e-05, "sp2_sp3": -0.026725292205810547, "sp3_sp4": -1.430511474609375e-06,
"sp4_sp5": -0.0015358924865722656, "sp5_sp6": -0.019712209701538086, "sp6_sp7": -0.08764910697937012}
{
"timestamp":1533106987681,
"gps":[
{
"lat":37.5208423071,
"lon":127.0370946609
},
{
"lat":37.5168702957094,
"lon":127.038314337406
}
],
"route":[
{
"lat":37.5208423071,
"lon":127.0370946609
},
{
"lat":37.52101092506974,
"lon":127.037041062907
},
{
"lat":37.5168702957094,
"lon":127.038314337406
}
],
"second":135,
"distance":718,
"call_status":"rest",
"order_no":1,
"uid":"uid",
"platform":"PostmanRuntime",
"endpoint":"route",
"duplicates":"remove",
"nearest_node_within":150,
"sp5_sp6":-0.019712209701538086,
"sp6_sp7":-0.08764910697937012
}
json prefix flask_response

json parsing dissect message 

`{` multiline pattern
logstash - custom field
, uid custom filed
2018-11-20T09:14:30.207Z - info: [1147] [WjZtOadDkhVsl0FpFnFaFJEMLAI3] [newcall-new-single] Dispatch Result From dispatch-Response SQS
{ order_no: '1147',
users:
[ { uid: 'WjZtOadDkhVsl0FpFnFaFJEMLAI3',
order_routes:
[ { order_no: '1147',
order_type: 'pickup',
order_status: 'pickup',
receiption_dt: '2018-11-20T09:14:28.448Z',
grok filter (grok test)

grok filter - order_no, uid, command 

message2
Log Data - kibana
• kubernetes metadata
• cloud metadata
• custom data
filebeat nginx-ingress
• pod nginx-ingress 

• response time per sec, request per sec 

• nginx-ingress acceess log !?!?!
ConfigMap filebeat autodiscover 

namespace ingress-nginx pod 

nginx module
logstash - nginx
• filebeat nginx module field filed 

• service container_name, response time 

• metadata ingress 

• pod, namespace,

• nginx 

• service_name, namespace, response / request time
logstash nginx
121.135.235.252 - - [22/Nov/2018:08:15:28 +0000] 1542874528.663 "POST /api/v1/location/group HTTP/1.1" 200 3823
"https://dev-admin.mvmt.delivery/rider/control" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36" 930 0.348 [staging-dev-node-admin-api-svc-80]
100.118.136.176:3500 44425 0.348 200
1. grok pattern nginx 

2. [staging-dev-node-admin-api-svc-80] namespace, service_name 

3. service_name namespace filed filed
Resource Monitoring
for k8s
resource
• k8s 

• 

• 

• k8s
- ,, 

• k8s 

• ,
!
metricbeat k8s to ES cloud
module - kubernetes metricset : fetch from kubelet, kube-stat-metrics
metricbeat - k8s
metricbeat k8s deploy !! - !!
https://github.com/elastic/examples/tree/master/MonitoringKubernetes
Monitoring k8s state_pod
metricset : state_deployment
Monitoring k8s node
metricset : node
Monitoring k8s container
metricset : container
Alert
for k8s
watcher - xpack
• alarm 

• ES cloud xpack - watcher

• xpack -> elastalert

• watcher 

• : trigger

• es query: input

• : condition

• slack, email noti : action
?
error message log -
metricbeat metricset : event

type: Warning -
• app / k8s resource , alarm ,

• - 

• aggregation ?

• ?

• logstash, filebeat, metribeat ?

• k8s ? - aws dns ? reigon ??

• 

• ( ) ...

• infra
K8s monitoring with elk

Más contenido relacionado

La actualidad más candente

[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker
[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker
[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with DockerOpenStack Korea Community
 
Micro services infrastructure with AWS and Ansible
Micro services infrastructure with AWS and AnsibleMicro services infrastructure with AWS and Ansible
Micro services infrastructure with AWS and AnsibleBamdad Dashtban
 
Storage based on_openstack_mariocho
Storage based on_openstack_mariochoStorage based on_openstack_mariocho
Storage based on_openstack_mariochoMario Cho
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with KubernetesDeivid Hahn Fração
 
Cisco UCS loves Kubernetes, Docker and OpenStack Kolla
Cisco UCS loves Kubernetes, Docker and OpenStack KollaCisco UCS loves Kubernetes, Docker and OpenStack Kolla
Cisco UCS loves Kubernetes, Docker and OpenStack KollaVikram G Hosakote
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in KubernetesDaniel Smith
 
CoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux ContainersCoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux ContainersRamit Surana
 
Implement Advanced Scheduling Techniques in Kubernetes
Implement Advanced Scheduling Techniques in Kubernetes Implement Advanced Scheduling Techniques in Kubernetes
Implement Advanced Scheduling Techniques in Kubernetes Kublr
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
Kubernetes 101 for Developers
Kubernetes 101 for DevelopersKubernetes 101 for Developers
Kubernetes 101 for DevelopersRoss Kukulinski
 
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob KaralusDistributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob KaralusJakob Karalus
 
Laying OpenStack Cinder Block Services
Laying OpenStack Cinder Block ServicesLaying OpenStack Cinder Block Services
Laying OpenStack Cinder Block ServicesKenneth Hui
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architectureOpenStack Korea Community
 

La actualidad más candente (20)

Intro to kubernetes
Intro to kubernetesIntro to kubernetes
Intro to kubernetes
 
OpenStack Storage Overview
OpenStack Storage OverviewOpenStack Storage Overview
OpenStack Storage Overview
 
[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker
[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker
[OpenStack Days Korea 2016] Track4 - Deep Drive: k8s with Docker
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Micro services infrastructure with AWS and Ansible
Micro services infrastructure with AWS and AnsibleMicro services infrastructure with AWS and Ansible
Micro services infrastructure with AWS and Ansible
 
Storage based on_openstack_mariocho
Storage based on_openstack_mariochoStorage based on_openstack_mariocho
Storage based on_openstack_mariocho
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
 
Cisco UCS loves Kubernetes, Docker and OpenStack Kolla
Cisco UCS loves Kubernetes, Docker and OpenStack KollaCisco UCS loves Kubernetes, Docker and OpenStack Kolla
Cisco UCS loves Kubernetes, Docker and OpenStack Kolla
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
 
CoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux ContainersCoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux Containers
 
Cloud data center and openstack
Cloud data center and openstackCloud data center and openstack
Cloud data center and openstack
 
Implement Advanced Scheduling Techniques in Kubernetes
Implement Advanced Scheduling Techniques in Kubernetes Implement Advanced Scheduling Techniques in Kubernetes
Implement Advanced Scheduling Techniques in Kubernetes
 
Kubernetes: My BFF
Kubernetes: My BFFKubernetes: My BFF
Kubernetes: My BFF
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
AKS
AKSAKS
AKS
 
Kubernetes 101 for Developers
Kubernetes 101 for DevelopersKubernetes 101 for Developers
Kubernetes 101 for Developers
 
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob KaralusDistributed Tensorflow with Kubernetes - data2day - Jakob Karalus
Distributed Tensorflow with Kubernetes - data2day - Jakob Karalus
 
Laying OpenStack Cinder Block Services
Laying OpenStack Cinder Block ServicesLaying OpenStack Cinder Block Services
Laying OpenStack Cinder Block Services
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 

Similar a K8s monitoring with elk

Elk for applications on k8s
Elk for applications on k8sElk for applications on k8s
Elk for applications on k8sChe-Chia Chang
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...DataWorks Summit/Hadoop Summit
 
KOCOON – KAKAO Automatic K8S Monitoring
KOCOON – KAKAO Automatic K8S MonitoringKOCOON – KAKAO Automatic K8S Monitoring
KOCOON – KAKAO Automatic K8S Monitoringissac lim
 
ELK stack at weibo.com
ELK stack at weibo.comELK stack at weibo.com
ELK stack at weibo.com琛琳 饶
 
Druid + Superset (資料的快速通道)
Druid + Superset (資料的快速通道)Druid + Superset (資料的快速通道)
Druid + Superset (資料的快速通道)二文 郭
 
DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
 DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and... DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...PROIDEA
 
Stream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETStream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETconfluent
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly SolarWinds Loggly
 
"How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics."How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics.Vladimir Pavkin
 
(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per Second(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per SecondAmazon Web Services
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performanceSteven Shim
 
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltStack
 
ログ収集プラットフォーム開発におけるElasticsearchの運用
ログ収集プラットフォーム開発におけるElasticsearchの運用ログ収集プラットフォーム開発におけるElasticsearchの運用
ログ収集プラットフォーム開発におけるElasticsearchの運用LINE Corporation
 
Elks for analysing performance test results - Helsinki QA meetup
Elks for analysing performance test results - Helsinki QA meetupElks for analysing performance test results - Helsinki QA meetup
Elks for analysing performance test results - Helsinki QA meetupAnoop Vijayan
 
Search and analyze data in real time
Search and analyze data in real timeSearch and analyze data in real time
Search and analyze data in real timeRohit Kalsarpe
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.Renzo Tomà
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackJakub Hajek
 

Similar a K8s monitoring with elk (20)

Elk for applications on k8s
Elk for applications on k8sElk for applications on k8s
Elk for applications on k8s
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
 
KOCOON – KAKAO Automatic K8S Monitoring
KOCOON – KAKAO Automatic K8S MonitoringKOCOON – KAKAO Automatic K8S Monitoring
KOCOON – KAKAO Automatic K8S Monitoring
 
ELK stack at weibo.com
ELK stack at weibo.comELK stack at weibo.com
ELK stack at weibo.com
 
Druid + Superset (資料的快速通道)
Druid + Superset (資料的快速通道)Druid + Superset (資料的快速通道)
Druid + Superset (資料的快速通道)
 
DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
 DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and... DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
 
Stream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETStream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NET
 
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
AWS re:Invent presentation: Unmeltable Infrastructure at Scale by Loggly
 
"How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics."How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics.
 
(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per Second(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per Second
 
How to improve ELK log pipeline performance
How to improve ELK log pipeline performanceHow to improve ELK log pipeline performance
How to improve ELK log pipeline performance
 
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
 
Logstash
LogstashLogstash
Logstash
 
ログ収集プラットフォーム開発におけるElasticsearchの運用
ログ収集プラットフォーム開発におけるElasticsearchの運用ログ収集プラットフォーム開発におけるElasticsearchの運用
ログ収集プラットフォーム開発におけるElasticsearchの運用
 
Elks for analysing performance test results - Helsinki QA meetup
Elks for analysing performance test results - Helsinki QA meetupElks for analysing performance test results - Helsinki QA meetup
Elks for analysing performance test results - Helsinki QA meetup
 
Search and analyze data in real time
Search and analyze data in real timeSearch and analyze data in real time
Search and analyze data in real time
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
Vinetalk: The missing piece for cluster managers to enable accelerator sharing
Vinetalk: The missing piece for cluster managers to enable accelerator sharingVinetalk: The missing piece for cluster managers to enable accelerator sharing
Vinetalk: The missing piece for cluster managers to enable accelerator sharing
 

Último

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Último (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

K8s monitoring with elk

  • 1. k8s monitoring & alert with elasticsearch Kubernetes Korea Group Meetup 2018.11.23 윤종원 (sabper@gmail.com)
  • 2. ... • SI • • (?) ( ...) • ( ??!!) • infra ... ,, • k8s ...
  • 3.
  • 4. ... • k8s ELK stack • k8s • k8s cpu, memory, disk resource • alarm … • ELK k8s log / monitoring
  • 5. prometheus !!! • ... • node-exporter, kube-state-metrics, … • !! - ? • .. • ... ( ... ) • [OpenInfra Days Korea 2018] OpenInfra monitoring with Prometheus
  • 6. ELK • ELK stack .. • ES ELK stack • - ... • ...!!! • (   )
  • 9. ? • k8s , • kubectl logs -f pod-name • - • , • ... • ,,, (reponse time per sec, request per sec …) -> -> ( ) -> ` ` !!
  • 10. k8s filebeat to kafka pod container log system log ingress-nginx log with add_kubernetes_metadata container_name, conatiner_label, node_name …
  • 11. filebeat k8s deploy !! https://github.com/elastic/examples/tree/master/MonitoringKubernetes filebeat - k8s
  • 13. filebeat multiline java exception 1 row multi row -> filebeat multi row 2018-08-30 09:44:22.847 [pool-2-thread-1] INFO com.barogo.dispatch.util.Util:46 APIPoint getCall0Riders 0 141 Aug 31, 2018 5:52:48 PM com.amazonaws.http.AmazonHttpClient executeHelper INFO: Unable to execute HTTP request: Connection reset java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:209) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930) ConfigMap - filebeat input - input type docker - docker log - multiline pattern - java multiline example - Test multiline pattern
  • 14. filebeat drop_event k8s pod healthcheck access log 2018-11-21T00:08:41.294Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.318 ms] "Request-Body" :{} "Response-Body" : "" 2018-11-21T00:08:41.485Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.317 ms] "Request-Body" :{} "Response-Body" : "" 2018-11-21T00:08:44.485Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.338 ms] "Request-Body" :{} "Response-Body" : "" 2018-11-21T00:08:47.485Z - info: GET 200 /healthz HTTP/1.1 kube-probe/1.10 [time 0.371 ms] "Request-Body" :{} "Response-Body" : "" ConfigMap - processors - drop_event - condition - - Test multiline pattern
  • 15. Why? Logstash & Kafka • metadata • , id • logstash order_no, uid filed • • filebeat , • filebeat output logstash , filebeat -> kafka -> logstash -> elasticsearch cloud kibana
  • 16. logstash - json parsing flask_response {"timestamp": 1533106987681, "gps": [{"lat": 37.5208423071, "lon": 127.0370946609}, {"lat": 37.5168702957094, "lon": 127.038314337406}], "route": [{"lat": 37.5208423071, "lon": 127.0370946609}, {"lat": 37.52101092506974, "lon": 127.037041062907}, {"lat": 37.5211672, "lon": 127.0375327}, {"lat": 37.5204709, "lon": 127.0376081}, {"lat": 37.5197674, "lon": 127.0377019}, {"lat": 37.5194147, "lon": 127.0377445}, {"lat": 37.5192907, "lon": 127.0377578}, {"lat": 37.5194287, "lon": 127.0383417}, {"lat": 37.5188587, "lon": 127.0385572}, {"lat": 37.5183706, "lon": 127.0387465}, {"lat": 37.5178821, "lon": 127.0389347}, {"lat": 37.5173377, "lon": 127.0391453}, {"lat": 37.5172205, "lon": 127.0387591}, {"lat": 37.51708223867784, "lon": 127.03825608200496}, {"lat": 37.5168702957094, "lon": 127.038314337406}], "second": 135, "distance": 718, "call_status": "rest", "order_no": 1, "uid": "uid", "platform": "PostmanRuntime", "endpoint": "route", "duplicates": "remove", "nearest_node_within": 150, "smoothing_node_within": 2.5, "st_ed": 0.1368551254272461, "st_sp1": -2.5033950805664062e-05, "sp2_sp3": -0.026725292205810547, "sp3_sp4": -1.430511474609375e-06, "sp4_sp5": -0.0015358924865722656, "sp5_sp6": -0.019712209701538086, "sp6_sp7": -0.08764910697937012} { "timestamp":1533106987681, "gps":[ { "lat":37.5208423071, "lon":127.0370946609 }, { "lat":37.5168702957094, "lon":127.038314337406 } ], "route":[ { "lat":37.5208423071, "lon":127.0370946609 }, { "lat":37.52101092506974, "lon":127.037041062907 }, { "lat":37.5168702957094, "lon":127.038314337406 } ], "second":135, "distance":718, "call_status":"rest", "order_no":1, "uid":"uid", "platform":"PostmanRuntime", "endpoint":"route", "duplicates":"remove", "nearest_node_within":150, "sp5_sp6":-0.019712209701538086, "sp6_sp7":-0.08764910697937012 } json prefix flask_response json parsing dissect message `{` multiline pattern
  • 17. logstash - custom field , uid custom filed 2018-11-20T09:14:30.207Z - info: [1147] [WjZtOadDkhVsl0FpFnFaFJEMLAI3] [newcall-new-single] Dispatch Result From dispatch-Response SQS { order_no: '1147', users: [ { uid: 'WjZtOadDkhVsl0FpFnFaFJEMLAI3', order_routes: [ { order_no: '1147', order_type: 'pickup', order_status: 'pickup', receiption_dt: '2018-11-20T09:14:28.448Z', grok filter (grok test) grok filter - order_no, uid, command message2
  • 18. Log Data - kibana • kubernetes metadata • cloud metadata • custom data
  • 19. filebeat nginx-ingress • pod nginx-ingress • response time per sec, request per sec • nginx-ingress acceess log !?!?! ConfigMap filebeat autodiscover namespace ingress-nginx pod nginx module
  • 20. logstash - nginx • filebeat nginx module field filed • service container_name, response time • metadata ingress • pod, namespace, • nginx • service_name, namespace, response / request time
  • 21. logstash nginx 121.135.235.252 - - [22/Nov/2018:08:15:28 +0000] 1542874528.663 "POST /api/v1/location/group HTTP/1.1" 200 3823 "https://dev-admin.mvmt.delivery/rider/control" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36" 930 0.348 [staging-dev-node-admin-api-svc-80] 100.118.136.176:3500 44425 0.348 200 1. grok pattern nginx 2. [staging-dev-node-admin-api-svc-80] namespace, service_name 3. service_name namespace filed filed
  • 22.
  • 24. resource • k8s • • • k8s - ,, • k8s • , !
  • 25. metricbeat k8s to ES cloud module - kubernetes metricset : fetch from kubelet, kube-stat-metrics
  • 26. metricbeat - k8s metricbeat k8s deploy !! - !! https://github.com/elastic/examples/tree/master/MonitoringKubernetes
  • 31. watcher - xpack • alarm • ES cloud xpack - watcher • xpack -> elastalert • watcher • : trigger • es query: input • : condition • slack, email noti : action
  • 32. ? error message log - metricbeat metricset : event type: Warning -
  • 33. • app / k8s resource , alarm , • - • aggregation ? • ? • logstash, filebeat, metribeat ? • k8s ? - aws dns ? reigon ?? • • ( ) ... • infra