Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Logging Analytics e Machine Learning com Elasti...

Logging Analytics e Machine Learning com Elastic Stack

Thiago Souza

August 05, 2017
Tweet

More Decks by Thiago Souza

Other Decks in Technology

Transcript

  1. 1 Thiago Souza Support Engineer 5 de Agosto, 2017 Logging

    Analytics e Machine Learning com Elastic Stack
  2. 2 Um pouco sobre mim • Desenvolvedor há mais de

    10 anos • Trabalho com Elasticsearch desde 2010 (em produção desde 2013) • Support Engineer @ Elastic
  3. 2014 Millions of Downloads 40. 100. 2016 2015 2012 2013

    Cumulative downloads of the Elastic Stack (Elasticsearch, Kibana, Beats, Logstash) and X-Pack 3 100M+ Downloads 3,000+ Customers 92,000+ Community
  4. 9 Logging Analytics e Machine Learning com Elastic Stack Alguns

    anos atrás... AppServer DBServer FTP app.log (20MB)
  5. 10 Logging Analytics e Machine Learning com Elastic Stack Alguns

    anos atrás... at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.net.BindException: Address already in use: JVM_Bind:8080 java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:441) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception (java.lang.ThreadDeath) executing org.apache.tomcat.util.net.TcpWorkerThread@12c5431, terminating thread Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.net.BindException: Address already in use: JVM_Bind:8080 java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:441) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  6. 11 Logging Analytics e Machine Learning com Elastic Stack Alguns

    anos atrás... at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.net.BindException: Address already in use: JVM_Bind:8080 java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:441) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception (java.lang.ThreadDeath) executing org.apache.tomcat.util.net.TcpWorkerThread@12c5431, terminating thread Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket WARNING: Restarting endpoint Dec 7, 2004 7:09:35 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket SEVERE: Endpoint null shutdown due to exception: java.net.BindException: Address already in use: JVM_Bind:8080 java.net.BindException: Address already in use: JVM_Bind:8080 at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:264) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:441) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:548) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  7. 17 Logging Analytics e Machine Learning com Elastic Stack Hoje

    em dia... AppServer DBServer Microservices! Attaaaaack!!!!
  8. 18 Logging Analytics e Machine Learning com Elastic Stack Hoje

    em dia... AppServer DBServer Microservices! Attaaaaack!!!! app.log (20MB)
  9. 19 Logging Analytics e Machine Learning com Elastic Stack Hoje

    em dia... AppServer DBServer Microservices! Attaaaaack!!!! app.log (20MB) service-1.log (10GB) server-20.log (30GB) microsrv-100.log (31GB) service-202.log (80GB) … potencialmente: +100GB
  10. 20 Logging Analytics e Machine Learning com Elastic Stack Hoje

    em dia... AppServer DBServer Microservices! Attaaaaack!!!! app.log (20MB) service-1.log (10GB) server-20.log (30GB) microsrv-100.log (31GB) service-202.log (80GB) … potencialmente: +100GB
  11. 21 Logging Analytics e Machine Learning com Elastic Stack Hoje

    em dia... AppServer DBServer Microservices! Attaaaaack!!!! app.log (20MB) service-1.log (10GB) server-20.log (30GB) microsrv-100.log (31GB) service-202.log (80GB) … potencialmente: +100GB
  12. 24 Logging Analytics e Machine Learning com Elastic Stack Centralized

    Logging app.log (20MB) service-1.log (10GB) server-20.log (30GB) microsrv-100.log (31GB) service-202.log (80GB) … potencialmente: +100GB
  13. 25 Logging Analytics e Machine Learning com Elastic Stack Centralized

    Logging app.log (20MB) service-1.log (10GB) server-20.log (30GB) microsrv-100.log (31GB) service-202.log (80GB) … potencialmente: +100GB
  14. 26 Logging Analytics e Machine Learning com Elastic Stack Centralized

    Logging app.log (20MB) service-1.log (10GB) server-20.log (30GB) microsrv-100.log (31GB) service-202.log (80GB) … potencialmente: +100GB
  15. 28 Logging Analytics e Machine Learning com Elastic Stack Beats

    => Elasticsearch => Kibana Beats Elasticsearch Kibana • Forma mais simples de começar. • Dados estruturados (ex. métricas) são indexados diretamente
  16. 29 Logging Analytics e Machine Learning com Elastic Stack Beats

    => Elasticsearch => Kibana Beats Elasticsearch Kibana • Para dados não-estruturados (ex. logs) é preciso usar o Ingest Node. • Filebeat modules automatiza tudo! Ingest Node
  17. 30 Logging Analytics e Machine Learning com Elastic Stack Beats

    => Elasticsearch => Kibana Beats Elasticsearch Kibana metricbeat.yml metricbeat.modules: - module: system metricsets: - cpu - filesystem - memory output.elasticsearch: hosts: ["elastic:9200"]
  18. 31 Logging Analytics e Machine Learning com Elastic Stack Beats

    => Elasticsearch => Kibana Beats Elasticsearch Kibana Ingest Node filebeat.yml filebeat.modules: - module: nginx output.elasticsearch: hosts: ["elastic:9200"] Configura o pipeline
  19. 32 Logging Analytics e Machine Learning com Elastic Stack Beats

    => Logstash => Elasticsearch => Kibana Beats Elasticsearch Logstash Kibana • Maior flexibilidade de processamento. • Logstash Persistent Queues (v5.4)
  20. 33 Logging Analytics e Machine Learning com Elastic Stack Porém...

    Beats Logstash Elasticsearch Microservices! Attaaaaack!!!!