Log files. Every server's got 'em, but how many of us make good use of them? In this meetup we are going to look at a set of open source tools that fit together to form the ELK stack. The ELK stack gives us a relatively easy way to centralize logs from many different sources, makes them searchable and lets us visualize the data. This helps us find new ways to make sense of log data and gain valuable insights into what our servers do when we are not watching.
Join Peter Meth of Delvia as he walks us through the ELK Stack and shows us how it can become the first step in moving towards a DevOps conscious development shop.
12. Dec 2 17:09:01 ip-123-45-6-78 CRON[11785]:
pam_unix(cron:session): session opened for user root by (uid=0)
Dec 2 17:09:06 ip-123-45-6-78 CRON[11785]:
pam_unix(cron:session): session closed for user root
Dec 2 17:10:01 ip-123-45-6-78 CRON[11822]:
pam_unix(cron:session): session opened for user root by (uid=0)
Dec 2 17:10:08 ip-123-45-6-78 CRON[11822]:
pam_unix(cron:session): session closed for user root
Ubuntu Auth Logs
13. Application Logs
• There really are no standards
• Luckily there is usually some sort of timestamp
???? ????? ?? ?????
???? ????? ?? ?????
14. Enter ELK Stack
• Easy to install a simple stack
‣ Less than 1 hour using Digital Ocean blog post
• Made up of 3 (really 4) separate components
‣ Elasticsearch
‣ Logstash
‣ Kibana
‣ Log ship agent (rsyslog, logstash forwarder, filebeat)
15. Logger’s Playday Parade by John Lloyd https://flic.kr/p/34cyYD License: CC BY 2.0
All your logs are belong to us.
Logstash
16. Logstash
• input → filter → output workflow
• move logs from any server using many different
methods
• normalize timestamps
• powerful syntax for transformations, additions, tags
• outputs directly into Elastic Search
22. Elastic Search
• makes log files easily searchable
• blazing fast
• scalable
• maybe you’re already using it for Dev
• lots of power, but you don’t need to tweak much for
basic ELK stack
23. G-BNIVE panel by Andy / Andrew Fogg https://flic.kr/p/5RSJp License: CC BY 2.0
Kibana
24. Kibana
• Easily search for keywords in logfiles
• Visualize your data events over time
• Drill-down into individual events
• Create dashboards
• Share dashboards
27. Benefits / Uses
• ELK components can scale independently
• Visualize traffic patterns & user profiles
• Root-cause analysis
• Graph any arbitrary data you want to output from your
applications
• Store log files in a central location & get them off the
individual servers
• Bring non-technical people into the conversation
28. Further Resources
• Elastic website
https://www.elastic.co/webinars/introduction-elk-stack
• Digital Ocean tutorials (search for ELK)
https://www.digitalocean.com/community/tutorials
• Digital Ocean one-click-apps
https://www.digitalocean.com/features/one-click-apps/elk/
• The Delvia team is here to help
pmeth@delvia.com