3. ;
Introduction
Logstash
Kibana
Conclusion
Logging
• Recording of eventsRecording of events
• Voice of your systems and applicationsVoice of your systems and applications
• It tells you almost everythingIt tells you almost everything
• It is a source of knowledgeIt is a source of knowledge
Julien Pivotto Logstash and friends
5. ;
Introduction
Logstash
Kibana
Conclusion
Logging is useful
• Understanding outagesUnderstanding outages
• not only when it’s wrongnot only when it’s wrong
• you can extract metricsyou can extract metrics
• no logs means somethingno logs means something
• it tells you what, why, who, whenit tells you what, why, who, when
Julien Pivotto Logstash and friends
7. ;
Introduction
Logstash
Kibana
Conclusion
Logging in the past
• Logging to files on each serverLogging to files on each server
• Using syslog protocolUsing syslog protocol
• DecentralizedDecentralized
• Reading requires SSH accessReading requires SSH access
• Not developer friendlyNot developer friendly
Julien Pivotto Logstash and friends
8. ;
Introduction
Logstash
Kibana
Conclusion
The tools nowadays
• Jenkins, Icinga, Graphite, ForemanJenkins, Icinga, Graphite, Foreman
• Nice web interfacesNice web interfaces
• CentralizedCentralized
• Easy to useEasy to use
Julien Pivotto Logstash and friends
10. ;
Introduction
Logstash
Kibana
Conclusion
3 separate tools
• Elasticsearch, distributed search & analytics engineElasticsearch, distributed search & analytics engine
• Logstash, logs managementLogstash, logs management
• Kibana, very nice webui to ES and LogstashKibana, very nice webui to ES and Logstash
Julien Pivotto Logstash and friends
12. ;
Introduction
Logstash
Kibana
Conclusion
Missions
Inputs
Filters
Output
Shipping the logs
• Some applications can only write to filesSome applications can only write to files
• But you need them on the main logstash serverBut you need them on the main logstash server
• Logstash can act as a daemon to ship the logsLogstash can act as a daemon to ship the logs
• Destinations can be syslog, redis,. . .Destinations can be syslog, redis,. . .
• Then you can act on your logsThen you can act on your logs
Julien Pivotto Logstash and friends
13. ;
Introduction
Logstash
Kibana
Conclusion
Missions
Inputs
Filters
Output
Collecting the logs
• You can plug logstash to a lot of data sourcesYou can plug logstash to a lot of data sources
• It can be passive or activeIt can be passive or active
• Listening on a UDP port vs checking mailsListening on a UDP port vs checking mails
• All your logs are managed by one applicationAll your logs are managed by one application
• It creates fields from the logsIt creates fields from the logs
Julien Pivotto Logstash and friends
19. ;
Introduction
Logstash
Kibana
Conclusion
Missions
Inputs
Filters
Output
UDP and TCP input
• Compatible with rsyslog protocolCompatible with rsyslog protocol
• Each syslog talks with logstash directlyEach syslog talks with logstash directly
• Allow you to use the syslog toolchains: logger, rsyslogAllow you to use the syslog toolchains: logger, rsyslog
• UDP is shoot and forgetUDP is shoot and forget
Julien Pivotto Logstash and friends
22. ;
Introduction
Logstash
Kibana
Conclusion
Missions
Inputs
Filters
Output
File
• Enable you to use logstash with every applicationEnable you to use logstash with every application
• Useful to ship the logsUseful to ship the logs
• Acts as a tail -n 0 -FActs as a tail -n 0 -F
• It works even if you use logrotateIt works even if you use logrotate
Julien Pivotto Logstash and friends
33. ;
Introduction
Logstash
Kibana
Conclusion
Kibana
• Kibana is a web interface for Logstash/ESKibana is a web interface for Logstash/ES
• Kibana 1 was written in PHPKibana 1 was written in PHP
• Kibana 2 was written in RubyKibana 2 was written in Ruby
• Kibana 3 is written in AngularJSKibana 3 is written in AngularJS
Julien Pivotto Logstash and friends
34. ;
Introduction
Logstash
Kibana
Conclusion
Kibana 3
• Everything happens in the browserEverything happens in the browser
• The browser is connected to ElasticsearchThe browser is connected to Elasticsearch
• You can save dashboards into ESYou can save dashboards into ES
• You can write/template dashboards to filesYou can write/template dashboards to files
Julien Pivotto Logstash and friends
36. ;
Introduction
Logstash
Kibana
Conclusion
Kibana queries
Example of a kibana query
@fields.syslog_program:"httpd" AND @fields.http_host:"test.example.com" AND @fields.response:"404"
• LLucene query syntax
• SSimple and effective
• PPoint & click web interface
Julien Pivotto Logstash and friends
41. ;
Introduction
Logstash
Kibana
Conclusion
Conclusion
• Logstash is a small daemonLogstash is a small daemon
• Simple to package & deploy (jar file)Simple to package & deploy (jar file)
• Scalable thanks to ElasticsearchScalable thanks to Elasticsearch
• Developer friendly thanks to KibanaDeveloper friendly thanks to Kibana
Julien Pivotto Logstash and friends