{"id":65,"date":"2015-02-27T21:38:43","date_gmt":"2015-02-27T21:38:43","guid":{"rendered":"http:\/\/svops.com\/blog\/?p=65"},"modified":"2016-02-09T23:54:35","modified_gmt":"2016-02-09T23:54:35","slug":"elk-system-overview","status":"publish","type":"post","link":"http:\/\/svops.com\/blog\/elk-system-overview\/","title":{"rendered":"ELK System Overview"},"content":{"rendered":"<h1>Overview<\/h1>\n<p>There seem to be a lot of old ELK guides on the internet. \u00a0It&#8217;s time to make a new one that can begin its own eventual decay.<\/p>\n<p>To help minimize the aging process, I&#8217;m not going to cover how to install specific packages on specific platforms, but rather discuss the choice of tools and configurations that are available.<\/p>\n<h1 id=\"shipper\">Shipper<\/h1>\n<p>You have to get your log files off the remote machines and eventually into Elasticsearch. \u00a0It&#8217;s the shipper&#8217;s job to, um, ship the logs to the next step.<\/p>\n<p>There are a few shippers, some of which are outlined here.<\/p>\n<pre>tl;dr: use filebeat if you're only moving logs around.<\/pre>\n<h2>logstash<\/h2>\n<p>You can use the full logstash build as your shipper. \u00a0There are almost no reasons to do this. \u00a0Being JVM-based, it&#8217;s big and takes memory. \u00a0It also has more features than you&#8217;ll typically need for a shipper.<\/p>\n<p>The only excuse to run logstash as a remote shipper is if you have a ton of logs and need to apply some business logic about which ones to ship. \u00a0For example, maybe DEBUG logging is enabled in your production environment (?); you could use a full logstash to only ship the more important levels for processing.<\/p>\n<h2><\/h2>\n<h2>logstash-forwarder<\/h2>\n<blockquote><p><strong>NOTE: logstash-forwarder is dead. \u00a0See filebeat, below.<\/strong><\/p><\/blockquote>\n<p>This is the right choice. \u00a0It&#8217;s a light-weight program that does nothing other than read log files and send them to logstash. \u00a0Traffic is encrypted with SSL, so certs are required.<\/p>\n<p>logstash-forwarder speaks the &#8220;lumberjack&#8221; protocol with logstash.<\/p>\n<h2>filebeat<\/h2>\n<p><a href=\"https:\/\/www.elastic.co\/products\/beats\/filebeat\" target=\"_blank\">Filebeat<\/a> is the replacement for logstash-forwarder. \u00a0It&#8217;s also lightweight, gives you the option of not using encryption, and they&#8217;re planning to add some nice client-side features (multiline and a basic &#8216;grep&#8217;).<\/p>\n<p>Filebeat requires logstash 1.5+.<\/p>\n<h2>beaver<\/h2>\n<p>If you need a broker (see below), then beaver is a lightweight tool that, not being encrypted, can talk to redis.<\/p>\n<h1 id=\"broker\">Broker<\/h1>\n<p>Many guides describe the use of a broker like redis or rabbitmq between the shipper and logstash.<\/p>\n<p>If you&#8217;re using logstash and\/or logstash-forwarder as your shipper, you don&#8217;t need a broker. \u00a0Both of these packages keep track of where they are in the local files, and should recover from a logstash outage. \u00a0(If the outage lasts through a file rotation, this may not be true!).<\/p>\n<p>I only like to use brokers\u00a0when shipping logs from systems that don&#8217;t automatically handle logstash failures (e.g. syslog, netflow, etc). \u00a0This covers for unplanned outages, and also lets you release changes to logstash without losing data.<\/p>\n<h1 id=\"indexer\">Logstash Indexer<\/h1>\n<p>Here&#8217;s where the magic happens&#8230;. \u00a0Unstructured data is turned into structured information. \u00a0 See our <a title=\"Introduction to Logstash Grok Patterns\" href=\"http:\/\/svops.com\/blog\/introduction-to-logstash-grok-patterns\/\">guide to patterns<\/a>\u00a0and\u00a0<a title=\"Logstash best practices\" href=\"http:\/\/svops.com\/blog\/logstash-best-practices\/\">best practices<\/a>.<\/p>\n<h1 id=\"elasticsearch\">Elasticsearch<\/h1>\n<p>The storage part of the whole equation.<\/p>\n<p>See our <a title=\"Elasticsearch best practices\" href=\"http:\/\/svops.com\/blog\/elasticsearch-best-practices\/\">best practices<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview There seem to be a lot of old ELK guides on the internet. \u00a0It&#8217;s time to make a new one that can begin its own eventual decay. To help minimize the aging process, I&#8217;m not going to cover how &hellip; <a href=\"http:\/\/svops.com\/blog\/elk-system-overview\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/posts\/65"}],"collection":[{"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":7,"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":173,"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions\/173"}],"wp:attachment":[{"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/svops.com\/blog\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}