Pro Yearly is on sale from $80 to $50! »

When monolog meets ELK (& bermudas!)

When monolog meets ELK (& bermudas!)

Talk given at PHPCON PL 2015.
Code: https://github.com/odolbeau/elk-monolog-example

418997665c4a3368515ecf9c3d746b95?s=128

Olivier Dolbeau

November 15, 2015
Tweet

Transcript

  1. When Monolog meets ELK and bermudas!

  2. Olivier Dolbeau @odolbeau Web Architect Me

  3. None
  4. Which logs are we talking about?

  5. None
  6. None
  7. None
  8. The old way...

  9. Where is my fucking error?

  10. Which server?

  11. None
  12. I found the criticity !

  13. Maybe it’s the one I want?

  14. Tool box

  15. SSH tail cat grep more less sed

  16. SSH tail cat grep more less sed

  17. SSH tail cat grep more less sed

  18. My roommate uses this to colorize his access logs... This

    is specific to his access logs… and ugly as hell!
  19. None
  20. We are in 2015!

  21. E L K

  22. • real time data • distributed • multi-tenancy • document

    oriented • schema free • per operation persistence • real time analytics • high availability • full text search • conflict management • restful api • built on top of apache lucene
  23. Logstash

  24. Kibana

  25. None
  26. Some configuration

  27. Logstash input for syslog

  28. Logstash input for gelf

  29. What is Gelf?

  30. Logstash filter example (for syslog)

  31. Logstash output example

  32. None
  33. Heka RSYSLOG

  34. None
  35. Monolog

  36. Live coding

  37. Create a logger.

  38. Add another handler.

  39. Add some processors.

  40. PSR\Log\LoggerInterface.

  41. Use context!

  42. PsrLogMessageProcessor.

  43. Name your loggers.

  44. Bermudas vs pants!

  45. • Bermudas rocks! • Logs are really important, take care

    of them! • Take a look at ELK. Write beautiful logs. Olivier Dolbeau @odolbeau We’re hiring! In Paris & Warsaw! http://blbl.cr/dreamjobs