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

Laisse pas trainer ton log !

Laisse pas trainer ton log !

Given at #forumphp Paris 2014.
Slides are in english, talk was given in french.

Joind.in : https://joind.in/talk/view/11942
Vidéo (in french): https://www.youtube.com/watch?v=1r1SOeaDqH4&list=PL9zDdgiGjkIeeVlrsz9A8o3HtZhvERHT-&index=7

Olivier Dolbeau

October 23, 2014
Tweet

More Decks by Olivier Dolbeau

Other Decks in Programming

Transcript

  1. 3

  2. –Wikipedia “In computing, a logfile (or simply log) is a

    file that records either the events which happen while an operating system or other software runs, […].” 5
  3. –Wikipedia “In computing, a logfile (or simply log) is a

    file that records either the events which happen while an operating system or other software runs, […].” 6
  4. 15

  5. This is specific to its access logs My roommate uses

    this to colorise his access logs… 15
  6. 16

  7. 17

  8. 18

  9. 19

  10. 20

  11. Inputs Filters Outputs 41 inputs • syslog • udp •

    varnishlog • gelf • … 50 filters • date • geoip • i18n • urldecode • … 55 outputs • elasticsearch • redis • email • graphite • … 21
  12. Inputs Filters Outputs 41 inputs • syslog • udp •

    varnishlog • gelf • … 50 filters • date • geoip • i18n • urldecode • … 55 outputs • elasticsearch • redis • email • graphite • … And there are also some codecs 21
  13. 23

  14. 25

  15. 27

  16. filter { if [type] == "syslog" { grok { match

    => [ "message", "<%{POSINT:syslog_pri}>% {TIMESTAMP_ISO8601:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} % {DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: % {GREEDYDATA:syslog_message}" ] add_field => [ "received_at", "%{@timestamp}" ] add_field => [ "received_from", "%{host}" ] add_tag => [ "rsyslog" ] } } } Logstash - Filter 30
  17. output { elasticsearch_http { host => “my_es.blablacar.com” port => 9200

    index => "logstashv1-%{+YYYY.MM.dd}" manage_template => false } } Logstash - Output 31
  18. 33

  19. • StreamHandler • ErrorLogHandler • SwiftMailerHandler • SyslogUdpHandler • FirePHPHandler

    • FingersCrossedHandler • NullHandler • … More than 36 handlers! It’s just some outputs! 34
  20. 36

  21. 37

  22. 38

  23. 41

  24. 43

  25. 45

  26. Logstash - Filter 47 This space has intentionally been left

    blank. We don’t need any filter Because logstash works well!
  27. Logstash - Filter 47 This space has intentionally been left

    blank. We don’t need any filter Because logstash works well! With Heka you need to write a lot of Lua
  28. output { elasticsearch_http { host => “my_es.blablacar.com” port => 9200

    index => "logstashv1-%{+YYYY.MM.dd}" manage_template => false } } Logstash - Output 49
  29. output { elasticsearch_http { host => “my_es.blablacar.com” port => 9200

    index => "logstashv1-%{+YYYY.MM.dd}" manage_template => false } } Logstash - Output 49 It’s a duplicate slide!
  30. 51

  31. 52

  32. 54