Pracital application logging and monitoring

Practical Application
Logging and Monitoring
Laurynas Tretjakovas
laurynas.tretjakovas@gmail.com
GitHub @n3ziniuka5
DevOps Pro Vilnius - 2016 1
About Me
 Functional programming and DevOps
enthusiast
 Currently Scala/DevOps at iGeolise
 5 years of professional experience
 Kickboxing and Brazilian Jiu-Jitsu
practitioner
DevOps Pro Vilnius - 2016 2
iGeolise
 Main product – TravelTime platform
 Small team – 7 developers
 2 DevOps people
 About 20 managed servers
 Scala, Scala.js, Akka, Play, React, Ansible
DevOps Pro Vilnius - 2016 3
Sample Application Infrastructure
DevOps Pro Vilnius - 2016 4
Sample Application Infrastructure
DevOps Pro Vilnius - 2016 5
Sample Application Infrastructure
DevOps Pro Vilnius - 2016 6
Sample Application Infrastructure
DevOps Pro Vilnius - 2016 7
Sample Application Infrastructure
DevOps Pro Vilnius - 2016 8
Sample Application Infrastructure
DevOps Pro Vilnius - 2016 9
Elasticsearch
 NoSQL Database
 Full-text search and analytics engine
 Can handle complex search features and requirements
 Works great for log files and metrics
DevOps Pro Vilnius - 2016 10
Logstash
 Data collection engine
 Transform plain log lines into structure data with patterns
 Alerting
 Over 200 available plugins
DevOps Pro Vilnius - 2016 11
Kibana
 Flexible analytics and visualization platform
 Seamless integration with Elasticsearch
 Understand large volumes of data
 Dynamic dashboards with data interaction
DevOps Pro Vilnius - 2016 12
ELK Stack with Beaver
DevOps Pro Vilnius - 2016 13
ELK Stack with Filebeat
DevOps Pro Vilnius - 2016 14
ELK Stack at iGeolise
DevOps Pro Vilnius - 2016 15
Demo API
A single endpoint that accepts client, travel time and transportation mode as
input and simply logs the received input along with:
 Response time
 Status code
 Request body
 Request path
DevOps Pro Vilnius - 2016 16
Demo API
DevOps Pro Vilnius - 2016 17
Demo API
DevOps Pro Vilnius - 2016 18
Filebeat Config
DevOps Pro Vilnius - 2016 19
Logstash Config
DevOps Pro Vilnius - 2016 20
Logstash Config
DevOps Pro Vilnius - 2016 21
Elasticsearch Index Template
DevOps Pro Vilnius - 2016 22
Kibana
DevOps Pro Vilnius - 2016 23
Kibana
DevOps Pro Vilnius - 2016 24
Kibana
DevOps Pro Vilnius - 2016 25
Kibana
DevOps Pro Vilnius - 2016 26
Kibana
DevOps Pro Vilnius - 2016 27
Kibana
DevOps Pro Vilnius - 2016 28
Kibana
DevOps Pro Vilnius - 2016 29
Kibana
DevOps Pro Vilnius - 2016 30
Thank You!
DevOps Pro Vilnius - 2016 31
1 of 31

Recommended

Lambda architecture by
Lambda architectureLambda architecture
Lambda architectureIvan Kosianenko
203 views17 slides
Microservices and serverless in python projects by
Microservices and serverless in python projectsMicroservices and serverless in python projects
Microservices and serverless in python projectsJose Manuel Ortega Candel
1.4K views59 slides
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl... by
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...Flink Forward
1.1K views41 slides
Productionize spark structured streaming by
Productionize spark structured streamingProductionize spark structured streaming
Productionize spark structured streamingIvan Kosianenko
311 views27 slides
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j by
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jGraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4j
GraphConnect 2014 SF: How eBay and Shutl Deliver Even Faster Using Neo4jNeo4j
1.1K views43 slides
GraphQL Advanced by
GraphQL AdvancedGraphQL Advanced
GraphQL AdvancedLeanIX GmbH
1.2K views44 slides

More Related Content

What's hot

Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action" by
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"Flink Forward
1.5K views26 slides
Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ... by
Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ...Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ...
Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ...Flink Forward
1.5K views29 slides
Introduction to GraphQL & Serverless by
Introduction to GraphQL & ServerlessIntroduction to GraphQL & Serverless
Introduction to GraphQL & ServerlessElijah Astley
411 views27 slides
Social connections14: Super charge your API’s with Reactive streams by
Social connections14: Super charge your API’s with Reactive streamsSocial connections14: Super charge your API’s with Reactive streams
Social connections14: Super charge your API’s with Reactive streamsFrank van der Linden
1.3K views43 slides
Key alias dev standard final by
Key alias   dev standard finalKey alias   dev standard final
Key alias dev standard finalRaditya Alwafi Surachman
229 views22 slides
Apache flink by
Apache flinkApache flink
Apache flinkJanu Jahnavi
19 views13 slides

What's hot(20)

Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action" by Flink Forward
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
Flink Forward1.5K views
Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ... by Flink Forward
Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ...Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ...
Flink Forward Berlin 2018: Viktor Klang - Keynote "The convergence of stream ...
Flink Forward1.5K views
Introduction to GraphQL & Serverless by Elijah Astley
Introduction to GraphQL & ServerlessIntroduction to GraphQL & Serverless
Introduction to GraphQL & Serverless
Elijah Astley411 views
Social connections14: Super charge your API’s with Reactive streams by Frank van der Linden
Social connections14: Super charge your API’s with Reactive streamsSocial connections14: Super charge your API’s with Reactive streams
Social connections14: Super charge your API’s with Reactive streams
Apache Flink Online Training by Learntek1
Apache Flink Online TrainingApache Flink Online Training
Apache Flink Online Training
Learntek142 views
Deploying GraphQL Services as Managed APIs by WSO2
Deploying GraphQL Services as Managed APIsDeploying GraphQL Services as Managed APIs
Deploying GraphQL Services as Managed APIs
WSO2252 views
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire... by Icinga
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga2.1K views
OSMC 2017 | Ops and dev stories- Integrate everything into your monitoring st... by NETWAYS
OSMC 2017 | Ops and dev stories- Integrate everything into your monitoring st...OSMC 2017 | Ops and dev stories- Integrate everything into your monitoring st...
OSMC 2017 | Ops and dev stories- Integrate everything into your monitoring st...
NETWAYS274 views
Records Management - the api story by David Webster
Records Management -  the api storyRecords Management -  the api story
Records Management - the api story
David Webster132 views
Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ... by Flink Forward
Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...
Flink Forward Berlin 2018: Xiaowei Jiang - Keynote: "Unified Engine for Data ...
Flink Forward1.1K views
CONDG April 23 2020 - Baskar Rao - GraphQL by Matthew Groves
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQL
Matthew Groves79 views
Community App Catalog Introduction (Tokyo OpenStack Summit) by aedocw
Community App Catalog Introduction (Tokyo OpenStack Summit)Community App Catalog Introduction (Tokyo OpenStack Summit)
Community App Catalog Introduction (Tokyo OpenStack Summit)
aedocw235 views
Tuning Flink For Robustness And Performance by Stefan Richter
Tuning Flink For Robustness And PerformanceTuning Flink For Robustness And Performance
Tuning Flink For Robustness And Performance
Stefan Richter65 views
DevSecOps - Security in DevOps by Aarno Aukia
DevSecOps - Security in DevOpsDevSecOps - Security in DevOps
DevSecOps - Security in DevOps
Aarno Aukia146 views
Building real time serverless back ends with aws appsync by sterkje
Building real time serverless back ends with aws appsyncBuilding real time serverless back ends with aws appsync
Building real time serverless back ends with aws appsync
sterkje 88 views
Continuous Delivery Automation of Cloud Infrastructure and Applications at Ch... by Brian Mericle
Continuous Delivery Automation of Cloud Infrastructure and Applications at Ch...Continuous Delivery Automation of Cloud Infrastructure and Applications at Ch...
Continuous Delivery Automation of Cloud Infrastructure and Applications at Ch...
Brian Mericle304 views
Caribbean Developers Conference - 201K8s by Ravi Lachhman
Caribbean Developers Conference - 201K8sCaribbean Developers Conference - 201K8s
Caribbean Developers Conference - 201K8s
Ravi Lachhman95 views

Viewers also liked

Kibana Basics for Logfile Analysis at PhraseApp by
Kibana Basics for Logfile Analysis at PhraseAppKibana Basics for Logfile Analysis at PhraseApp
Kibana Basics for Logfile Analysis at PhraseAppPhraseApp
460 views18 slides
Shipping & Visualize Your Data With ELK by
Shipping  & Visualize Your Data With ELKShipping  & Visualize Your Data With ELK
Shipping & Visualize Your Data With ELKAdam Chen
1.3K views30 slides
Building with Gradle by
Building with GradleBuilding with Gradle
Building with GradleLaurynas Tretjakovas
211 views17 slides
Rainyday by
RainydayRainyday
Rainydayssdkolkata
368 views10 slides
Holmes / A2 / Lab Design by
Holmes / A2 / Lab DesignHolmes / A2 / Lab Design
Holmes / A2 / Lab DesignRama Chandra
521 views22 slides
Fluentdの使い方 by
Fluentdの使い方Fluentdの使い方
Fluentdの使い方Tomohiro Goya
2.4K views48 slides

Viewers also liked(20)

Kibana Basics for Logfile Analysis at PhraseApp by PhraseApp
Kibana Basics for Logfile Analysis at PhraseAppKibana Basics for Logfile Analysis at PhraseApp
Kibana Basics for Logfile Analysis at PhraseApp
PhraseApp460 views
Shipping & Visualize Your Data With ELK by Adam Chen
Shipping  & Visualize Your Data With ELKShipping  & Visualize Your Data With ELK
Shipping & Visualize Your Data With ELK
Adam Chen1.3K views
Holmes / A2 / Lab Design by Rama Chandra
Holmes / A2 / Lab DesignHolmes / A2 / Lab Design
Holmes / A2 / Lab Design
Rama Chandra521 views
Monitoramento com ELK - Elasticsearch - Logstash - Kibana by Waldemar Neto
Monitoramento com ELK - Elasticsearch - Logstash - KibanaMonitoramento com ELK - Elasticsearch - Logstash - Kibana
Monitoramento com ELK - Elasticsearch - Logstash - Kibana
Waldemar Neto965 views
Ch 14. weather forecasting ( application of data logging) by Khan Yousafzai
Ch 14. weather forecasting ( application of data logging)Ch 14. weather forecasting ( application of data logging)
Ch 14. weather forecasting ( application of data logging)
Khan Yousafzai1.5K views
In-Cluster Continuous Testing Framework for Docker Containers by Neil Gehani
In-Cluster Continuous Testing Framework for Docker ContainersIn-Cluster Continuous Testing Framework for Docker Containers
In-Cluster Continuous Testing Framework for Docker Containers
Neil Gehani5.7K views
Kibana + timelion: time series with the elastic stack by Sylvain Wallez
Kibana + timelion: time series with the elastic stackKibana + timelion: time series with the elastic stack
Kibana + timelion: time series with the elastic stack
Sylvain Wallez7.6K views
Logging Application Behavior to MongoDB by Robert Stewart
Logging Application Behavior to MongoDBLogging Application Behavior to MongoDB
Logging Application Behavior to MongoDB
Robert Stewart24.6K views
Logging with Elasticsearch, Logstash & Kibana by Amazee Labs
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & Kibana
Amazee Labs52.4K views
Data logger presentation by shidaaziri
Data logger presentationData logger presentation
Data logger presentation
shidaaziri5.1K views
Powerpoint presentation for data logging by Sufinah Ensian
Powerpoint presentation for data loggingPowerpoint presentation for data logging
Powerpoint presentation for data logging
Sufinah Ensian13K views
Procurement And Materials Management by pakreiki
Procurement And Materials ManagementProcurement And Materials Management
Procurement And Materials Management
pakreiki58.2K views
Data Logging by djastall
Data LoggingData Logging
Data Logging
djastall7.9K views
Attack monitoring using ElasticSearch Logstash and Kibana by Prajal Kulkarni
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
Prajal Kulkarni67.6K views
USE OF SOCIAL NETWORKS AND ITS EFFECTS ON STUDENTS by Mahesh Kodituwakku
USE OF SOCIAL NETWORKS AND ITS EFFECTS ON STUDENTS USE OF SOCIAL NETWORKS AND ITS EFFECTS ON STUDENTS
USE OF SOCIAL NETWORKS AND ITS EFFECTS ON STUDENTS
Mahesh Kodituwakku243.9K views

Similar to Pracital application logging and monitoring

DevOps from a developer perspective by
DevOps from a developer perspective DevOps from a developer perspective
DevOps from a developer perspective WSO2
1.4K views28 slides
apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach... by
apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach...apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach...
apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach...apidays
495 views31 slides
Rethinking Stream Processing with Apache Kafka, Kafka Streams and KSQL by
Rethinking Stream Processing with Apache Kafka, Kafka Streams and KSQLRethinking Stream Processing with Apache Kafka, Kafka Streams and KSQL
Rethinking Stream Processing with Apache Kafka, Kafka Streams and KSQLKai Wähner
11.8K views56 slides
DevOpsDays Amsterdam 2016 workshop by
DevOpsDays Amsterdam 2016 workshopDevOpsDays Amsterdam 2016 workshop
DevOpsDays Amsterdam 2016 workshopArnold Van Wijnbergen
308 views17 slides
Introducing Kafka's Streams API by
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams APIconfluent
4.9K views118 slides

Similar to Pracital application logging and monitoring(20)

DevOps from a developer perspective by WSO2
DevOps from a developer perspective DevOps from a developer perspective
DevOps from a developer perspective
WSO21.4K views
apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach... by apidays
apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach...apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach...
apidays LIVE Hong Kong 2021 - Event-driven APIs & Schema governance for Apach...
apidays495 views
Rethinking Stream Processing with Apache Kafka, Kafka Streams and KSQL by Kai Wähner
Rethinking Stream Processing with Apache Kafka, Kafka Streams and KSQLRethinking Stream Processing with Apache Kafka, Kafka Streams and KSQL
Rethinking Stream Processing with Apache Kafka, Kafka Streams and KSQL
Kai Wähner11.8K views
Introducing Kafka's Streams API by confluent
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams API
confluent4.9K views
What's new in Elasticsearch v5 by Idan Tohami
What's new in Elasticsearch v5What's new in Elasticsearch v5
What's new in Elasticsearch v5
Idan Tohami4.1K views
DevOps, PowerShell y Windows Containers - NET Conf UY v2016 by Victor Silva
DevOps, PowerShell y Windows Containers  - NET Conf UY v2016DevOps, PowerShell y Windows Containers  - NET Conf UY v2016
DevOps, PowerShell y Windows Containers - NET Conf UY v2016
Victor Silva165 views
What's New in Confluent Platform 5.5 by confluent
What's New in Confluent Platform 5.5What's New in Confluent Platform 5.5
What's New in Confluent Platform 5.5
confluent152 views
Flink in Zalando's World of Microservices by Zalando Technology
Flink in Zalando's World of Microservices  Flink in Zalando's World of Microservices
Flink in Zalando's World of Microservices
Zalando Technology5.1K views
Flink in Zalando's world of Microservices by ZalandoHayley
Flink in Zalando's world of Microservices   Flink in Zalando's world of Microservices
Flink in Zalando's world of Microservices
ZalandoHayley138 views
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration) by Surendar S
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration) SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
SnapLogic- iPaaS (Elastic Integration Cloud and Data Integration)
Surendar S621 views
AWS re:Invent 2016: Open Source at AWS—Contributions, Support, and Engagement... by Amazon Web Services
AWS re:Invent 2016: Open Source at AWS—Contributions, Support, and Engagement...AWS re:Invent 2016: Open Source at AWS—Contributions, Support, and Engagement...
AWS re:Invent 2016: Open Source at AWS—Contributions, Support, and Engagement...
Amazon Web Services1.6K views
Present and future of unified, portable, and efficient data processing with A... by DataWorks Summit
Present and future of unified, portable, and efficient data processing with A...Present and future of unified, portable, and efficient data processing with A...
Present and future of unified, portable, and efficient data processing with A...
DataWorks Summit319 views
Bringing Streaming Data To The Masses: Lowering The “Cost Of Admission” For Y... by confluent
Bringing Streaming Data To The Masses: Lowering The “Cost Of Admission” For Y...Bringing Streaming Data To The Masses: Lowering The “Cost Of Admission” For Y...
Bringing Streaming Data To The Masses: Lowering The “Cost Of Admission” For Y...
confluent2.2K views
API workshop by AWS and 3scale by 3scale
API workshop by AWS and 3scaleAPI workshop by AWS and 3scale
API workshop by AWS and 3scale
3scale3.1K views
NodeJS Serverless backends for your frontends by Carlos Santana
NodeJS Serverless backends for your frontendsNodeJS Serverless backends for your frontends
NodeJS Serverless backends for your frontends
Carlos Santana475 views
OW2con'14 - OpenPaaS, the open source collaboration platform, Linagora by OW2
OW2con'14 - OpenPaaS, the open source collaboration platform, LinagoraOW2con'14 - OpenPaaS, the open source collaboration platform, Linagora
OW2con'14 - OpenPaaS, the open source collaboration platform, Linagora
OW2784 views
2016 06 - design your api management strategy - axway - Api Management by SmartWave
2016 06 - design your api management strategy - axway - Api Management2016 06 - design your api management strategy - axway - Api Management
2016 06 - design your api management strategy - axway - Api Management
SmartWave332 views
Mobile, Open Source, & the Drive to the Cloud by Dev_Events
Mobile, Open Source, & the Drive to the CloudMobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the Cloud
Dev_Events367 views

Recently uploaded

Vertical User Stories by
Vertical User StoriesVertical User Stories
Vertical User StoriesMoisés Armani Ramírez
14 views16 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
26 views45 slides
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
31 views35 slides
Mini-Track: Challenges to Network Automation Adoption by
Mini-Track: Challenges to Network Automation AdoptionMini-Track: Challenges to Network Automation Adoption
Mini-Track: Challenges to Network Automation AdoptionNetwork Automation Forum
12 views27 slides
Serverless computing with Google Cloud (2023-24) by
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)wesley chun
11 views33 slides
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
37 views69 slides

Recently uploaded(20)

Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker37 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2217 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views

Pracital application logging and monitoring

Editor's Notes

  1. Hello everyone, My name is Laurynas, I will speak about practical application logging and monitoring. If there is something you want to ask me, but won’t be able to do that today or you think of some questions later, you can drop me an email at this address. You can also visit my github profile, where you can find the example application using the tools we are about to discuss.
  2. So, a little bit about me first. I am 24 years old, I work and live in Kaunas. I am a functional programming and DevOps enthusiast. I currently work at iGeolise where we are building TravelTime platform, an API that makes maps searchable by time. I have about 5 years of professional experience. Also, I am very active in sports, I do kickboxing and jiu jitsu, usually 5-6 times a week and I suggest anyone who has zero sports activity to take something up. It is very important in our line of work, sitting in front of a monitor for at least 8 hours a day.
  3. I am currently working at iGeolise where we are building TravelTime platform, an API that makes maps searchable by time. For example, imagine that you are looking for a new place to live. The property listing you are looking at has an integration with out api. Now, instead of searching for places that are within 10 miles from your work, you could search for places that are reachable within 15 minutes by public transport, or driving. So you can get the results that are relevant to you, so that's the kind of service that we provide. The picture shows what places you can reach by tube in central London, versus a simple radius search. We are a relatively small team, we only have 7 developers and 2 of them, myself included, are responsible for operations. I personally like to not be 100% devops all the time because I cannot imagine myself doing just one, devops or programming. I enjoy both of these things and our structure allows it to happen. Also, there are two of us and that’s plenty for the 20-something servers that we have to manage. Our platform consists of several services written in Scala using Akka and Play framework. We also have some single page web applications, those are written in Scala.js and using the React framework from Facebook. We use ansible heavily, all of our servers are managed with it and we also do deployments with ansible.
  4. Let’s start off with an example application. This is of course very simple, you have your load balancers, application servers and database. As you know load balancers can be configured to use sticky sessions, meaning that when you visit a website for the first time, the load balancer picks a server for you and all your following requests for a certain period of time will be routed to that same server. This can help solve issue regarding sessions, session information is stored on each server separately so if you hit another server each time the server will create a new session for you and you will have to relogin. However, sticky sessions have some downsides as well, for example in case of rolling deploy you will be redirected to another server and will lose session information as well. To combat this you can store sessions in some database which of course is slower than just having it in memory, or have some kind of session replication. Play framework also offers the option to store session information on the client side, but encrypted of course, so zero setup. For single page applications that only do background ajax calls to the servers, a common practice is to not have sessions at all and authenticate during each request. That is of course slower, but not significantly as the database can cache such requests. So, for the sake of our example, lets assume that the loadbalancers do not have sticky sessions and that each request hits a separate server.
  5. You have setup logging and you capture when someone searches for an item, views an item, adds or removes an item from the cart, enters the checkout and completes the purchase. Each server logs into a separate file.
  6. So imagine that an exception is thrown and you are emailed the stacktrace. It did include the client ID and you want to find out what exactly happened so you are trying to reproduce the bug by doing the exact same steps. The issue is that each action was logged into a separate server so now you have to scavenge for logs in all of the servers. This may not be an issue if you have just a couple of servers, but it gets really painful as you scale. My talk will focus on how to solve the problem and also how to capture meaningful metrics and visualize the captured data.
  7. So let's talk about the tools that we are going to use. We will store our logs in ElasticSearch. It is a full-text search and analytics engine, it is often used with applications that have complex search features and requirements, most common use case probably being a web shop so that it can provide search autocompletion and enables complex item filtering. It works great for logs files and metrics too.
  8. In log storing case elastic search is usually accomandied by logstash, a data collection engine that can read the log files, extract some values from it and then store it in elastic search so it can be analyzed later. For example at Geolise at the end of request we capture and log the following information: what client made the request, how long did the request take, what transportation mode was used and what api method was called. So instead just storing plain log lines in elastic search it extracts the patterns. You should store the plain log files as well, so you easily find all actions done by specific client, like I described with the web shop example previously. This requires logstash to run on the same node as where the log files are stored meaning we would have to run it on each node, it runs on jvm and has some overhead it's not what you usually want to do.
  9. And the last piece of the puzzle is Kibana. It is an analytics and visualization platform designed to work with elastic search. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and even maps. It makes it easy to understand large volumes of data. It features a browser-based interface that allows you to create dynamic dashboards and interact with the data.
  10. Usually you have a small service running on each node that ships the logs to a redis database and then logstash can read from redis. So you have a single elastic search, logstash and redis installation and on each of the nodes you run beaver, which is a service that ships those logs.
  11. However, elastic recently released a tool called filebeat that can ship logs straight to logstash, no need for a redis server. Filebeat would also have to be run on each server.
  12. So we started off with this simple setup, however, there were some problems. I wasn't a part of the company yet but the guys said that Logstash was just randomly crashing once in a while and were unable to diagnose the problem. Now we have a small in-hosue built application that does a small portion of what the logstash is capable of. Logstash has many plugins and pipelining capabilities, but our needs are very simple, just to extract some fields and store the data into appropriate indices so the application that we've build reads from redis and indexes to elastic. Going forward, if we ever need more features, we may go back to logstash, maybe it's ok now. So now we have the metrics and dashboards in place, but we don't have any kind of monitoring yet. Monitoring of system ram/cpu disk activity and reporting when values get high is pretty easy, but we want to measure our business metrics. We have developed another small application that queries entries indexed in elastic search for the last 10 minutes. it monitors average response time, requests per minute, status codes returned and the amount of requests per minute per client, so if the average response time gets very high for some reason we are alerted immediately by a hipchat notification. We are also alerted if there have been no requests at all which means something may be down or if a single client starts making a lot of requests. It also alerts if it hasn't received any logs from a server for a certain period of time, that way know that log shipping tool beaver works. We had a few occasions were it stopped working because we used it together with logrotate so we were happy we had this monitoring in place.
  13. I’ve created a simple endpoint to demonstrate the functionality. It’s similar to what our travel time platform accepts, of course usually you would receive an api key instead of client name and you would search coordinates and much more other stuff.