SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Senacor Technologies AG 04.05.2019 1
Application performances
monitoring with
Elastic APM
And the ELK stack
Alain Lompo
Senacor Technologies AG
#DevOps PRO Europe alain.lompo@senacor.com @alainlompo
Senacor Technologies AG 04.05.2019 2
Plan
 Motivation
 Introducing the ELK Stack
 Setting up the ELK Stack
 Introducing Elastic APM
 Setting up Elastic APM
 Monitoring Spring-boot apps with Elastic APM
Senacor Technologies AG 04.05.2019 3
Motivation
Senacor Technologies AG 04.05.2019 4
The increased complexity of software development
Programming
Language(s)
Methodology
Team
IDE
Application server
Frameworks
And Dev technologies
Integration with
External services
Orchestration
Virtualisation
Containairization
Build tools
Versioning system
Qualimetry tools
Dev Environment
Commit Environment
Acceptance Environment
PRE-PROD Environment
PROD Environment
Solution
architecture
Application
architecture
Senacor Technologies AG 04.05.2019 5
Monitoring complex apps is…complex
Internet
Web server Email server Database server Search server
Application server Application server
Application server Application server
SAN
?
?
?
Senacor Technologies AG 04.05.2019 6
Elastic APM to the rescue
Senacor Technologies AG 04.05.2019 7
Elastic makes APM simple and beautiful
Senacor Technologies AG 04.05.2019 8
Introducing the ELK stack
Senacor Technologies AG 04.05.2019 9
Introducing Elasticsearch
 Elasticsearch is an open source search server based
on the Apache Lucene server
 It is cross-platform (build in Java)
 It is designed from origin to be scalable and distributed
 It is data source agnostic (can take any data source and
search through it)
Senacor Technologies AG 04.05.2019 10
Elasticsearch’s role in the ELK stack
Kibana Elasticsearch Logstash / Beats
UI for Datas and
Dashboard visualisation
Powerful and flexible
Search server
Collection, transformation
And shipment of Log datas
http (S) http (S)
/ REST
Elastic
Transport
Senacor Technologies AG 04.05.2019 11
Other interesting Elasticsearch features
 Real time analytics
 Full text search
 Document oriented
 Restful API
Senacor Technologies AG 04.05.2019 12
Introducing Logstash
Analysis
Archiving
Monitoring
Alerting
Senacor Technologies AG 04.05.2019 13
Introducing Kibana
Senacor Technologies AG
Application Tier
(container)
04.05.2019 14
ELK Big picture
Database Tier
(container)
Logging/Monitoring Tier (ELK)
nodejs
WebServer
JBOSS EAP
Application server
Traders Admin
Portal
WebApplication
logstash
ELK component
Container
log_endpoint
logstash_server
Compute
Container
elasticsearch
ELK component
Container
search_endpoint
elasticsearch
_server
Compute
kibana
ELK component
s
Container
kibana_server
Compute
search_endpoint
ConnectsTo
HostedOn HostedOn HostedOn
ConnectsTo
search_endpoint
ContainerContainer
ConnectsTo
Senacor Technologies AG 04.05.2019 15
Setting up the ELK stack
Senacor Technologies AG 04.05.2019 16
Starting simple
GET _search
{
"query": {
"match_all": {}
}
}
Senacor Technologies AG 04.05.2019 17
Starting simple
POST /talks/devops
{
"title": "Application monitoring with ELK stack
and Elastic APM",
"speaker": "Alain Lompo",
"category": "APM",
"tags": ["Elastic", "Search", "Monitoring", "APM"],
"duration_in_minutes": 45
}
Senacor Technologies AG 04.05.2019 18
Sample configuration for logstash (in a .conf file)
input {
stdin {}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
}
stdout { codec => rubydebug }
}
Senacor Technologies AG 04.05.2019 19
Connecting Kibana to Elasticsearch server (in kibana.yml)
elasticsearch.hosts: ["http://localhost:9200"]
Senacor Technologies AG 04.05.2019 20
Connecting apm-server to elasticsearch server (in apm-server.yml)
output.elasticsearch:
hosts: ["localhost:9200"]
Senacor Technologies AG 04.05.2019 21
Introducing Elastic APM
Senacor Technologies AG 04.05.2019 22
On top of the stack…
Elastic APM is built on top of the ELK stack:
 Uses Elasticsearch as its datastore
 Uses logstash to collect, parse and transform logs
 Uses Kibana to render and visualise all kinds
of metrics related dashboards
Senacor Technologies AG 04.05.2019 23
Other interesting features of Elastic APM
Elastic APM…
 Can monitor in real time the performances
of thousands of applications.
 Automatically gathers performance relevant
informations.
 Automatically instrumentalise our apps and
measure response times for requests
Senacor Technologies AG 04.05.2019 24
How does Elastic APM fits into the Elastic ecosystem?
Logs
Metrics
Packets
Beats
Logstash
Datastore JMX
Elasticsearch Kibana
APM agent APM server
Senacor Technologies AG 04.05.2019 25
Setting up Elastic APM
Senacor Technologies AG 04.05.2019 26
Setting up Elastic APM
Senacor Technologies AG 04.05.2019 27
What’s an agent?
APM agents are…
 Open source libraries written in the same
language as our application.
 Agents are hooks in your application that
collect performance metrics and errors.
 All collected datas are sent to the APM server
Senacor Technologies AG 04.05.2019 28
Deep diving into the APM server…
The APM server is…
 An application written in GO that runs on your
server just like the elasticsearch server.
 Listens by default on port 8200.
 Expose a simple json based Restfull http Api
Senacor Technologies AG 04.05.2019 29
Deep diving into the APM server…
The APM server …
 Receives datas from agents periodically.
 Builds Elasticsearch documents from the
datas collected by agents.
 The documents are stored in the
Elasticsearch cluster
Senacor Technologies AG 04.05.2019 30
Extended visualisation capabilities with Kibana and Xpack…
Using Kibana you can…
 Visualize the collected datas
 Create Dashboards
 Detect anomalies and create alerts
Senacor Technologies AG 04.05.2019 31
Drilling down into traces…
With Kibana’s APM UI you can…
 Drill-down into transaction traces
to see executed methods
Senacor Technologies AG 04.05.2019 32
Monitoring applications
Senacor Technologies AG 04.05.2019 33
Analysing results in Kibana
Elastic APM will provide us out of the box informations
about:
 The web request
 The background jobs
 The errors
Senacor Technologies AG 04.05.2019 34
Analysing results in Kibana
Elastic APM will provide us out of the box informations
about:
 The average for any measure
 The 95th percentile
 The 99th percentile
 The number of requests per minute
Senacor Technologies AG 04.05.2019 35
Analysing results in Kibana
It is also possible to:
 Create customized dashboard
 Choose your indexes
 Choose the datas to visualize
Senacor Technologies AG 04.05.2019 36
Monitoring applications
Senacor Technologies AG 04.05.2019 37
Handling identified issues
The analysis result:
 Will highlight bottlenecks, errors and issues that are
deeply rooted in the code
 Elastic APM allows us to zoom in and pinpoint precisely
the origin of problems
Senacor Technologies AG 04.05.2019 38
Monitoring applications
Senacor Technologies AG 04.05.2019 39
Setting up notifications and alerts
Notifications and alerts are very usefull and:
 Will periodically inform us when a metrics value exceeds
a specified threshold
 Elastic APM and the ELK stack allows us to configure
them with a great degree of flexibility
Senacor Technologies AG 04.05.2019 40
Wrapping up
Senacor Technologies AG 04.05.2019 41
Wrapping up
 Software development and lifecycle has grown complex
over time
 We can properly monitor our application with Elastic APM
 Elastic APM makes APM simple and beautful
 It is built on top of the ELK stack: which provides a
powerful and flexible search server, datasource agnostic
data collecting and transformation pipeline and a
fantastic report and dashboard generation capabilities
Senacor Technologies AG 04.05.2019 42
Senacor Technologies AG 04.05.2019 43
Senacor Technologies AG 04.05.2019 44
Resources
Images are from:
https://unsplash.com/:
 photo-1531956656798-56686eeef3d4.jpg
 candice-picard-800024-unsplash.jpg
https://pixabay.com/
 coast-guard-training-1138169_1280.jpg
 computer-159830_640.png
 computer-23261_640.png
 firewall-37925_640.png
 server-146615_640.png
 wifi-891896_640.png
 pebbles-796943_1920.jpg
https://github.com/kubernetes/kubernetes/tree/master/logo
 Logo.png
https://iconscout.com/
 Elasticsearch.png
https://www.iconfinder.com/icons/202809/redis_icon
 iconfinder_Untitled-2_202809.png
https://www.freeiconspng.com/img/3705
 computer-server-icon-png-19.png
https://icons8.com/:
 icons8-cloud-storage-64.png
 icons8-code-file-64.png
 icons8-conference-48.png
 icons8-connected-64.png
 icons8-docker-48.png
 icons8-edit-property-64.png
 icons8-email-64.png
 icons8-gears-48.png
 icons8-globe-earth-64.png
 icons8-jenkins-48.png
 icons8-new-file-64.png
 icons8-onedrive-48.png
 icons8-scatter-plot-48.png
 icons8-signal-40.png
 icons8-skyatlas-48.png
 icons8-steam-64.png
 icons8-web-shield-64.png
 icons8-website-64.png
https://www.elastic.co/brand
Senacor Technologies AG 04.05.2019 45
Licences
 https://unsplash.com/license
 https://pixabay.com/service/license/
 https://github.com/kubernetes/kubernetes/blob/master/logo/LICENSE
 https://support.iconscout.com/hc/en-us/articles/360007897374-Licensing
 https://www.freeiconspng.com/copyright-policy.html
 http://support.iconfinder.com/ownership-and-licenses/license-basic
 http://support.iconfinder.com/ownership-and-licenses/license-extended
 https://icons8.com/license
 https://www.elastic.co/brand

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Observability For Modern Applications
Observability For Modern ApplicationsObservability For Modern Applications
Observability For Modern Applications
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Elastic Observability keynote
Elastic Observability keynoteElastic Observability keynote
Elastic Observability keynote
 
Application Rationalization with LeanIX
Application Rationalization with LeanIXApplication Rationalization with LeanIX
Application Rationalization with LeanIX
 
Elastic SIEM (Endpoint Security)
Elastic SIEM (Endpoint Security)Elastic SIEM (Endpoint Security)
Elastic SIEM (Endpoint Security)
 
Real-time Twitter Sentiment Analysis and Image Recognition with Apache NiFi
Real-time Twitter Sentiment Analysis and Image Recognition with Apache NiFiReal-time Twitter Sentiment Analysis and Image Recognition with Apache NiFi
Real-time Twitter Sentiment Analysis and Image Recognition with Apache NiFi
 
Data ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFiData ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFi
 
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes EverythingThe Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
 
Apigee Edge Overview and Roadmap
Apigee Edge Overview and RoadmapApigee Edge Overview and Roadmap
Apigee Edge Overview and Roadmap
 
DevOps for Databricks
DevOps for DatabricksDevOps for Databricks
DevOps for Databricks
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
Apigee Products Overview
Apigee Products OverviewApigee Products Overview
Apigee Products Overview
 
How to Move from Monitoring to Observability, On-Premises and in a Multi-Clou...
How to Move from Monitoring to Observability, On-Premises and in a Multi-Clou...How to Move from Monitoring to Observability, On-Premises and in a Multi-Clou...
How to Move from Monitoring to Observability, On-Premises and in a Multi-Clou...
 
.conf Go 2022 - Observability Session
.conf Go 2022 - Observability Session.conf Go 2022 - Observability Session
.conf Go 2022 - Observability Session
 
Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
 
Dataflow with Apache NiFi
Dataflow with Apache NiFiDataflow with Apache NiFi
Dataflow with Apache NiFi
 
Meetup OpenTelemetry Intro
Meetup OpenTelemetry IntroMeetup OpenTelemetry Intro
Meetup OpenTelemetry Intro
 
Apache Kafka and API Management / API Gateway – Friends, Enemies or Frenemies?
Apache Kafka and API Management / API Gateway – Friends, Enemies or Frenemies?Apache Kafka and API Management / API Gateway – Friends, Enemies or Frenemies?
Apache Kafka and API Management / API Gateway – Friends, Enemies or Frenemies?
 
Spring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise PlatformSpring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise Platform
 
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and LogstashKeeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
Keeping Up with the ELK Stack: Elasticsearch, Kibana, Beats, and Logstash
 

Ähnlich wie Application performance monitoring with Elastic APM and the ELK stack

Ähnlich wie Application performance monitoring with Elastic APM and the ELK stack (20)

Combining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityCombining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observability
 
OSMC 2018 | Monitor your application performances using InspectIT APM by Alai...
OSMC 2018 | Monitor your application performances using InspectIT APM by Alai...OSMC 2018 | Monitor your application performances using InspectIT APM by Alai...
OSMC 2018 | Monitor your application performances using InspectIT APM by Alai...
 
Monitor your spring boot application performances using inspectit apm
Monitor your spring boot application performances using inspectit apmMonitor your spring boot application performances using inspectit apm
Monitor your spring boot application performances using inspectit apm
 
Combinación de logs, métricas y seguimiento para una visibilidad centralizada
Combinación de logs, métricas y seguimiento para una visibilidad centralizadaCombinación de logs, métricas y seguimiento para una visibilidad centralizada
Combinación de logs, métricas y seguimiento para una visibilidad centralizada
 
Combinación de logs, métricas y seguimiento para una visibilidad centralizada
Combinación de logs, métricas y seguimiento para una visibilidad centralizadaCombinación de logs, métricas y seguimiento para una visibilidad centralizada
Combinación de logs, métricas y seguimiento para una visibilidad centralizada
 
Combining Logs, Metrics, and Traces for Unified Observability
Combining Logs, Metrics, and Traces for Unified ObservabilityCombining Logs, Metrics, and Traces for Unified Observability
Combining Logs, Metrics, and Traces for Unified Observability
 
Determining the Deployment Model that Fits Your Organization's Needs
Determining the Deployment Model that Fits Your Organization's NeedsDetermining the Deployment Model that Fits Your Organization's Needs
Determining the Deployment Model that Fits Your Organization's Needs
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
ArcSight Management Center 2.5 Release Notes
ArcSight Management Center 2.5 Release NotesArcSight Management Center 2.5 Release Notes
ArcSight Management Center 2.5 Release Notes
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
 
Application Modernization with PKS / Kubernetes
Application Modernization with PKS / KubernetesApplication Modernization with PKS / Kubernetes
Application Modernization with PKS / Kubernetes
 
Software Architecture in Process Automation: UML & the "Smart Factory"
Software Architecture in Process Automation: UML & the "Smart Factory"Software Architecture in Process Automation: UML & the "Smart Factory"
Software Architecture in Process Automation: UML & the "Smart Factory"
 
ArcMC 2.5.1 Release Notes
ArcMC 2.5.1 Release Notes	ArcMC 2.5.1 Release Notes
ArcMC 2.5.1 Release Notes
 
ArcMC 2.6 Release Notes
ArcMC 2.6 Release NotesArcMC 2.6 Release Notes
ArcMC 2.6 Release Notes
 
Architecting presentational and container components in React apps using Redux
Architecting presentational and container components in React apps using ReduxArchitecting presentational and container components in React apps using Redux
Architecting presentational and container components in React apps using Redux
 
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan GoksuSpring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Application performance monitoring with Elastic APM and the ELK stack

  • 1. Senacor Technologies AG 04.05.2019 1 Application performances monitoring with Elastic APM And the ELK stack Alain Lompo Senacor Technologies AG #DevOps PRO Europe alain.lompo@senacor.com @alainlompo
  • 2. Senacor Technologies AG 04.05.2019 2 Plan  Motivation  Introducing the ELK Stack  Setting up the ELK Stack  Introducing Elastic APM  Setting up Elastic APM  Monitoring Spring-boot apps with Elastic APM
  • 3. Senacor Technologies AG 04.05.2019 3 Motivation
  • 4. Senacor Technologies AG 04.05.2019 4 The increased complexity of software development Programming Language(s) Methodology Team IDE Application server Frameworks And Dev technologies Integration with External services Orchestration Virtualisation Containairization Build tools Versioning system Qualimetry tools Dev Environment Commit Environment Acceptance Environment PRE-PROD Environment PROD Environment Solution architecture Application architecture
  • 5. Senacor Technologies AG 04.05.2019 5 Monitoring complex apps is…complex Internet Web server Email server Database server Search server Application server Application server Application server Application server SAN ? ? ?
  • 6. Senacor Technologies AG 04.05.2019 6 Elastic APM to the rescue
  • 7. Senacor Technologies AG 04.05.2019 7 Elastic makes APM simple and beautiful
  • 8. Senacor Technologies AG 04.05.2019 8 Introducing the ELK stack
  • 9. Senacor Technologies AG 04.05.2019 9 Introducing Elasticsearch  Elasticsearch is an open source search server based on the Apache Lucene server  It is cross-platform (build in Java)  It is designed from origin to be scalable and distributed  It is data source agnostic (can take any data source and search through it)
  • 10. Senacor Technologies AG 04.05.2019 10 Elasticsearch’s role in the ELK stack Kibana Elasticsearch Logstash / Beats UI for Datas and Dashboard visualisation Powerful and flexible Search server Collection, transformation And shipment of Log datas http (S) http (S) / REST Elastic Transport
  • 11. Senacor Technologies AG 04.05.2019 11 Other interesting Elasticsearch features  Real time analytics  Full text search  Document oriented  Restful API
  • 12. Senacor Technologies AG 04.05.2019 12 Introducing Logstash Analysis Archiving Monitoring Alerting
  • 13. Senacor Technologies AG 04.05.2019 13 Introducing Kibana
  • 14. Senacor Technologies AG Application Tier (container) 04.05.2019 14 ELK Big picture Database Tier (container) Logging/Monitoring Tier (ELK) nodejs WebServer JBOSS EAP Application server Traders Admin Portal WebApplication logstash ELK component Container log_endpoint logstash_server Compute Container elasticsearch ELK component Container search_endpoint elasticsearch _server Compute kibana ELK component s Container kibana_server Compute search_endpoint ConnectsTo HostedOn HostedOn HostedOn ConnectsTo search_endpoint ContainerContainer ConnectsTo
  • 15. Senacor Technologies AG 04.05.2019 15 Setting up the ELK stack
  • 16. Senacor Technologies AG 04.05.2019 16 Starting simple GET _search { "query": { "match_all": {} } }
  • 17. Senacor Technologies AG 04.05.2019 17 Starting simple POST /talks/devops { "title": "Application monitoring with ELK stack and Elastic APM", "speaker": "Alain Lompo", "category": "APM", "tags": ["Elastic", "Search", "Monitoring", "APM"], "duration_in_minutes": 45 }
  • 18. Senacor Technologies AG 04.05.2019 18 Sample configuration for logstash (in a .conf file) input { stdin {} } output { elasticsearch { hosts => ["http://localhost:9200"] } stdout { codec => rubydebug } }
  • 19. Senacor Technologies AG 04.05.2019 19 Connecting Kibana to Elasticsearch server (in kibana.yml) elasticsearch.hosts: ["http://localhost:9200"]
  • 20. Senacor Technologies AG 04.05.2019 20 Connecting apm-server to elasticsearch server (in apm-server.yml) output.elasticsearch: hosts: ["localhost:9200"]
  • 21. Senacor Technologies AG 04.05.2019 21 Introducing Elastic APM
  • 22. Senacor Technologies AG 04.05.2019 22 On top of the stack… Elastic APM is built on top of the ELK stack:  Uses Elasticsearch as its datastore  Uses logstash to collect, parse and transform logs  Uses Kibana to render and visualise all kinds of metrics related dashboards
  • 23. Senacor Technologies AG 04.05.2019 23 Other interesting features of Elastic APM Elastic APM…  Can monitor in real time the performances of thousands of applications.  Automatically gathers performance relevant informations.  Automatically instrumentalise our apps and measure response times for requests
  • 24. Senacor Technologies AG 04.05.2019 24 How does Elastic APM fits into the Elastic ecosystem? Logs Metrics Packets Beats Logstash Datastore JMX Elasticsearch Kibana APM agent APM server
  • 25. Senacor Technologies AG 04.05.2019 25 Setting up Elastic APM
  • 26. Senacor Technologies AG 04.05.2019 26 Setting up Elastic APM
  • 27. Senacor Technologies AG 04.05.2019 27 What’s an agent? APM agents are…  Open source libraries written in the same language as our application.  Agents are hooks in your application that collect performance metrics and errors.  All collected datas are sent to the APM server
  • 28. Senacor Technologies AG 04.05.2019 28 Deep diving into the APM server… The APM server is…  An application written in GO that runs on your server just like the elasticsearch server.  Listens by default on port 8200.  Expose a simple json based Restfull http Api
  • 29. Senacor Technologies AG 04.05.2019 29 Deep diving into the APM server… The APM server …  Receives datas from agents periodically.  Builds Elasticsearch documents from the datas collected by agents.  The documents are stored in the Elasticsearch cluster
  • 30. Senacor Technologies AG 04.05.2019 30 Extended visualisation capabilities with Kibana and Xpack… Using Kibana you can…  Visualize the collected datas  Create Dashboards  Detect anomalies and create alerts
  • 31. Senacor Technologies AG 04.05.2019 31 Drilling down into traces… With Kibana’s APM UI you can…  Drill-down into transaction traces to see executed methods
  • 32. Senacor Technologies AG 04.05.2019 32 Monitoring applications
  • 33. Senacor Technologies AG 04.05.2019 33 Analysing results in Kibana Elastic APM will provide us out of the box informations about:  The web request  The background jobs  The errors
  • 34. Senacor Technologies AG 04.05.2019 34 Analysing results in Kibana Elastic APM will provide us out of the box informations about:  The average for any measure  The 95th percentile  The 99th percentile  The number of requests per minute
  • 35. Senacor Technologies AG 04.05.2019 35 Analysing results in Kibana It is also possible to:  Create customized dashboard  Choose your indexes  Choose the datas to visualize
  • 36. Senacor Technologies AG 04.05.2019 36 Monitoring applications
  • 37. Senacor Technologies AG 04.05.2019 37 Handling identified issues The analysis result:  Will highlight bottlenecks, errors and issues that are deeply rooted in the code  Elastic APM allows us to zoom in and pinpoint precisely the origin of problems
  • 38. Senacor Technologies AG 04.05.2019 38 Monitoring applications
  • 39. Senacor Technologies AG 04.05.2019 39 Setting up notifications and alerts Notifications and alerts are very usefull and:  Will periodically inform us when a metrics value exceeds a specified threshold  Elastic APM and the ELK stack allows us to configure them with a great degree of flexibility
  • 40. Senacor Technologies AG 04.05.2019 40 Wrapping up
  • 41. Senacor Technologies AG 04.05.2019 41 Wrapping up  Software development and lifecycle has grown complex over time  We can properly monitor our application with Elastic APM  Elastic APM makes APM simple and beautful  It is built on top of the ELK stack: which provides a powerful and flexible search server, datasource agnostic data collecting and transformation pipeline and a fantastic report and dashboard generation capabilities
  • 42. Senacor Technologies AG 04.05.2019 42
  • 43. Senacor Technologies AG 04.05.2019 43
  • 44. Senacor Technologies AG 04.05.2019 44 Resources Images are from: https://unsplash.com/:  photo-1531956656798-56686eeef3d4.jpg  candice-picard-800024-unsplash.jpg https://pixabay.com/  coast-guard-training-1138169_1280.jpg  computer-159830_640.png  computer-23261_640.png  firewall-37925_640.png  server-146615_640.png  wifi-891896_640.png  pebbles-796943_1920.jpg https://github.com/kubernetes/kubernetes/tree/master/logo  Logo.png https://iconscout.com/  Elasticsearch.png https://www.iconfinder.com/icons/202809/redis_icon  iconfinder_Untitled-2_202809.png https://www.freeiconspng.com/img/3705  computer-server-icon-png-19.png https://icons8.com/:  icons8-cloud-storage-64.png  icons8-code-file-64.png  icons8-conference-48.png  icons8-connected-64.png  icons8-docker-48.png  icons8-edit-property-64.png  icons8-email-64.png  icons8-gears-48.png  icons8-globe-earth-64.png  icons8-jenkins-48.png  icons8-new-file-64.png  icons8-onedrive-48.png  icons8-scatter-plot-48.png  icons8-signal-40.png  icons8-skyatlas-48.png  icons8-steam-64.png  icons8-web-shield-64.png  icons8-website-64.png https://www.elastic.co/brand
  • 45. Senacor Technologies AG 04.05.2019 45 Licences  https://unsplash.com/license  https://pixabay.com/service/license/  https://github.com/kubernetes/kubernetes/blob/master/logo/LICENSE  https://support.iconscout.com/hc/en-us/articles/360007897374-Licensing  https://www.freeiconspng.com/copyright-policy.html  http://support.iconfinder.com/ownership-and-licenses/license-basic  http://support.iconfinder.com/ownership-and-licenses/license-extended  https://icons8.com/license  https://www.elastic.co/brand

Hinweis der Redaktion

  1. Hello and welcome to this presentation about Application performances monitoring with Elastic APM and the ELK stack.
  2. Okay, here is what will be covered in this presentation
  3. What do we actually need to do in order to build an enterprise application today?
  4. A modern enterprise application deployment infrastructure.
  5. Elasticsearch is by definition cross-platform, scalable and distributed and datasource agnostic
  6. Elasticsearch has a central role in the ELK stack.
  7. Real time analytic: it is the use of, or the capacity to use, data and related resources as soon as they enter the system. The real-time adjective itself refers to the impression of immediate or near-immediate responsivity of the system by the user. In full-text search it is possible to query and to perform linguistic searches against documents. It can include single or multiple words or phrases and returns documents that match search conditions. ElasticSearch is a full text search engine based on Apache Lucene, a free and open-source information retrieval software library.
  8. Logstash is a server-side data processing pipeline that can fetch datas from a multitude and various sources simultaneously. It can transform them before sending them to a “stash” server (in our case Elasticsearch, of course)
  9. Kibana lets you visualize your Elasticsearch data and navigate the Elastic Stack, so you can do anything from learning why you're getting paged at 2:00 a.m. to understanding the impact rain might have on your quarterly numbers. Kibana is the UI component of the ELK stack. It allows you to visualize your Elasticsearch datas, create dashboard, reports, etc. You can do anything from learning why your Jms queue is not reacting as fast as usual to understanding the impact an train delay might have on your eCommerce Apps optimale sales.
  10. A simple way to understand the ELK stack would be to compare it to a three tiers application Kibana would be the presentation tier Elasticsearch would be the business tier Logstash would be the data tier