Uncle Bob can fix just about anything around the house, at least according to him. But when it comes to natural gas appliances, they should always be inspected by a qualified professional. Learn more at enbridgegas.com slash safety. Welcome everybody to the 67th episode of the Boxing Technology Big Tech Talk podcast. I am your host, your hostess with the mostest. I shouldn't say hostess with the mostest. That's kind of cheesy. Everybody says hostess with the mostest. Hey, I'm your host, Greg Greenlee. I do have a co-host for tonight. He's not on the call as of yet. Sean Jackson, he'll be joining us pretty soon. This is your first time listening to this podcast. You can check Blacks and Technology out at www.blacksandtechnology.net. You can also check us out on the Twitters. We are at Blacks and Technology, and that's B-L-K-T-E-C-H-N-O-L-O-G-Y.
We are also on LinkedIn. We have a LinkedIn group under Blackson Technology. We're on Facebook as well. So that's facebook.com forward slash Blackson Technology. And if you are listening in, of course, if you're checking out this podcast, you have to be listening, right? But if you are on Twitter right now and you have questions for our guests, tweet them using the hashtag BitTechTalk. So that's B-I-T-T-E-C-H-T-A-L-K. So who is Blackson Technology? What are we? What do we do? Blackson Technology is a tech-focused community and media organization focused on increasing diversity in technology. Since we're always focused on forming new partnerships and opportunities to assist our members with their continued professional growth.
We're always looking to partner with people, so if you want to partner with us, send us an email to partnerships at blacksandtechnology.net. Any general inquiries that you may have, send an email to us at info at blacksandtechnology.net. And if you are interested in sponsoring a podcast, you can send us an email to sponsorship at blacksandtechnology.net. Speaking of sponsors, this episode of the Blackton Technology Dick Tech Talk podcast is sponsored by Elasticsearch. Elasticsearch is on a mission to help organizations get actionable insights from data, from stock quotes to Twitter streams, Apache logs to WordPress blogs. Is that fine? I wonder if they did that on purpose. Anyhow, Elasticsearch is a company's way you put data to work. Visit their website at www.elasticsearch.com to download their open source products and learn how they can help you make sense of their data. Thanks to Elasticsearch for sponsoring this episode. We definitely appreciate it. Other announcements.
Blackfield Technology is proud to be a media community partner for iUrban Teen and helping them promote their California Summit. The California Summit is going on January 31st. at 2015. So you can check that out on the Blackstone Technology website. There's a blog post on it. So iUrban Team is an award program, an awarding program promoting STEM plus art careers and opportunities for male youth of color ages 13 through 18. Programs currently in the Portland metro area, Seattle and Kirkland, Washington, and now Los Angeles, California. Coming soon to Houston, Texas. So visit their website to learn more at www.iUrbanTeam.org. And they are looking for volunteers.
So definitely go to the website. There is a link at the bottom for volunteer opportunities. You definitely need volunteers in the Los Angeles area. So if you're able to volunteer, click on that and get in contact with Dino Perrette. So I have a team. And I think we just – is that you, Sean, who just joined? Yes, that's me. All right. That's our co-host for the season, Sean Jackson, a.k.a. GT50. I'm going to have to ask you about what GT – I don't think I've ever asked you what GT50 stands for. I'm guessing it has to do with cars since you're a car enthusiast. Yeah, it's a long story. When I was –
tech support job at AT&T when Hotmail was a new thing back in January of, well, late 1996 or early 1997. I signed up for a Hotmail accountant at the time of having a Mustang GT, so that's where I came from. Ah, gotcha. Excellent. Okay, let's get to it. I want to introduce our guest this evening, Jordan Sissel.
I'm happy to bring Jordan on, and this is why. So I'm kind of a big fan when it comes to people in the open source community and them creating things. It's kind of like when I first met Ethan Gostad, the gentleman who created Nagios. So I kind of have these fan moments where I'm just like, oh, man, this guy, you know. He mentioned me on Twitter, or he, you know, he replied to me on Twitter. So Jordan Sissel is the creator of Logstash. He is a sit-at man and programmer, and he is now with the Elasticsearch team, and he leads the Logstash efforts there. So I definitely want to welcome Jordan to the show. Jordan, how are you? I'm good, man. Happy to be on here. Thanks for the very nice intro. Oh, you're welcome. You're welcome. It's funny because I'm trying to think about how I first got wind of you. I think it was, I think it was Dewar. I think I watched the Hangouts episode, and then I started.
Maybe I started following you on Twitter, and then I started experimenting with the Elk Stack, and then I kind of tweeted, hey, I'm doing this, and I think you tweeted back, and I was like, oh, crap, you tweeted me back. That's pretty cool. And I think it went off from there, and then I started bombarding you with questions and things like that. So welcome to the show, man. I'm glad to have you. Yeah, thank you. So our first and most common question we usually ask our guests is tell us a little bit about your background and how you got started in technology.
So I got, I guess my real first start in technology was like way, way, way long ago as a kid. That was a privilege to have very early access to computers and add up to or something like that where you boot it up and you got a basic prompt or something. I didn't know that was it at the time, but a computer would do things. Then as I got up into high school, I kind of got a renewed interest in it where I got, I started getting on IRC a lot. And there was one IRC client called MIRC or Merck, however you like. I had a script. I spent a whole lot of time on IRC.
you would find other people had these cool tricks they could do with their IRC clients, like make all kinds of cool colors. I thought that was neat, and then I got into that. I did that for probably, I don't know, two years in high school, and that was my real first experience with programming. As much as you could say, that's not programming, whatever, you make it a computer dude. I thought, you know what, I'm going to go to college and then go to study computer science, and it went from there, and it led me into, I think when I was in college, I had this selfish view of what I wanted to actually write programs for, and I didn't want to, I didn't really see myself working at a company, So again, tinkering with computers was fun for me. And I got into that, but I still kept my interest in programming. And I found that when I was fired at 3 in the morning, it was all those fires as quickly as possible. And over time, I would figure out how to automate a lot of these things, whether that's through small or full-blown programs, and ended up scratching itches I had in the system. And Logstash, I was trying to log into 20 or 30 or 100 servers where I just wanted to ask a small question and get a quick answer.
Uncle Bob can fix just about anything around the house, at least according to him. But when it comes to natural gas appliances, they should always be inspected by a qualified professional. Learn more at embridgegas.com slash safety. Questions about healthcare as a First Nations, Inuit, or Métis individual? Start with a free booklet from the Canadian Pharmacists Association, created with Indigenous health professionals. Learn more at pharmacists.ca slash resources. Uncle Bob can fix just about anything around the house, at least according to him. But when it comes to natural gas appliances, they should always be inspected by a qualified professional. Learn more at embridgegas.com slash safety.
I love, you know, I have read your profile and then some of your background information. I love the way that you describe what you do when it comes to, you know, writing scripts to automate things. What is it that you got? I think it's hate-driven development? Yeah, hate-driven development. I forget who came up with the term, but it was to describe, I guess, a pattern I have with software where I just get so infuriated with the way a computer is behaving that I just kind of grind on a problem for a while. And at the end of the grind, at the end of the tunnel, I have, you know,
It's kind of cathartic because it's like yelling in a way where you're just releasing a lot of energy and de-stressing yourself. But at the end, sometimes there's a piece of software. Lockdash is one of those. I think FBM is probably my most hateful driven software because I'm just tired of building. And now I don't have to anymore. That's cool. The great thing, I think, about a lot of the open source stuff is that you can share it and actually build a community of folks around it and build friendships and something more tangible than just a piece of software that people can download where you actually have people that can share information and share like, oh, this was really useful for me or this bug really ruined my day and can we fix it?
Tell us real quick what FPM is. FPM is a way to build packages. I mean, like native operating system package formats like RPM for Red Hat systems. I think the number of packages that support these days has grown beyond my ability to remember it, which is a big pain point where if you had no knowledge of how to produce a package, but you knew, for example, you were writing Red Hat and you needed to build an RPM so you could deploy some internal projects, you would Google for how to build an RPM and you would be presented with Red Hat packaging guidelines, which are, I don't know, 50 or 80 pages of text.
I want to put these files in a box and ship it. Why am I reading like an 80-page man? That's my first upsetting experience. Instead of using Red Hat, we were using Ubuntu. So you had to repeat this process all over with Debian. Debian has their own guidelines, which are, I don't know, probably too long. And they're for good reasons. They're good reasons these things are written. But it's a really frustrating experience for new users. And I wanted something simple. I wanted to say, like, take this Ruby library and make an RPM. And I wanted the command line of the interface. Cool, cool. And where is that? Where can we go down with that? Is that just out there on GitHub? It's on GitHub. If you Google, let me see. I don't know if it's the first name.
If you search for SPM package, it's the first hit on Bing and Google. Cool. And yes, there's one thing I would say about the software that I try and build and the communities I try and help do it is that if the software is treating you badly and you're having a bad time, it's a bug. And if you spend five minutes and you can't build a package with SPM, it's a bug. Come ask the community. Come get help. File a ticket. Email me. Do whatever you have to do. Send me a tweet. Tell me you're having a bad time, and we'll get you on the right track.
And I can vouch for that. And I think that's a great philosophy because a lot of times, especially in the open source community, you come across some of these open source software that's not really documented very well, and then you're kind of fumbling around and Googling everything, and some people do it like this, and some other people have different ways of doing it. And I like that philosophy that you say, if you can't figure this out, if the documentation is poor, that's a bug as well. It's not just the software that can be a bug, but there can be a bug in the documentation. And like you said, if you tweet, If you tweet Jordan, he'll answer. I've done it in these answers pretty quickly. Yeah, yeah. If you tweet something angry about Logdash, I'm going to come back to you on Twitter and say, hey, how can I help? Let's make you upset. Well, if you say that, now I think everybody listening to the podcast will send your angry tweet right now just to get your help.
If I can't help, I'll try and point you in the right direction. But to me, open source is so much less about code and much more about communities and building things. The software, digital software, stuff in the digital age, you can infinitely replicate it. That's exactly how piracy works. You can just make infinite copies of things for basically no cost. And so if open source were only just code, then there would be no love in it. To build communities, you need a lot of love. You need to understand that people are going to have bad times with computers. Maybe they just need a hug. Maybe they just had a crap day. And you just need to say, you know what? That computer's being stupid. Maybe we can help.
And I think that was one of my favorite things about Elk and Logsash when Greg introduced me to it inadvertently months back when I think he was working on it. You did. I was chatting with Greg on IRC, I believe, and he's like, oh, I'm trying to sing. And he sent me a page. I think he sent me to Kibana first because I think I was looking for, you know, I'm constantly looking for some way to deal with dashboarding and things like that. And I've never found something that really worked the way I wanted it to. And he's like, I'll take a look at this. And I was like, oh, that's kind of cool. And he also told me about Logsash. And so I thought, hmm.
And so at the time, I didn't really have a project. You know, it was like I had a lot of things in the air, and, you know, I'm in health care, so we had, you know, tax things going on. I was like, I don't have time right now. And so then probably six or nine months later, once a lot of my projects fell off my plate, I decided to take a look at it. And it actually worked out fairly easily. I mean, I didn't have too many issues. I remember I had one minor problem, I think, an initial install, but I think it was resolved really quickly and went on from there. And it's been running for probably about, I think, three or four months now with not too many issues. That made me happy. And that's it.
I was about to touch on the other thing that he was speaking of, being a system administrator. It reminded me of something that I was told a very long time ago by a, well, you're probably a very old system administrator now, if you're still working, that the best system administrators are inherently lazy, basically implying they script themselves out of a job if they do it right, find ways to make the mundane things that happen every day easier to automate themselves. Yeah, I think it's true. I think you have to take the lazy word there to mean that they're inclined to sort of codify what normal manual activities they might be doing and allow them to do it more easily. Yes, exactly. So, Joe, what is your day? I mean, as a leader on the Lockstash Project, take us a little bit through what your day consists of. So, joining Elasticsearch was a fairly significant transition for me.
Uncle Bob can fix just about anything around the house, at least according to him. But when it comes to natural gas appliances, they should always be inspected by a qualified professional. Learn more at embridgegas.com slash safety.
Basically, a lot of my day, I spend whatever reasons I tell myself. We have, I think, almost 10 people now on the LogSash team, which is, to me, a phenomenal community. And now we have, you know, and then also Dark Room and have a chat about. I wrote some really bad code and here to tell you what I think it was supposed to do. But can you tell us more about what it is, why you created it, and how did it become?
So the original, let's see, so the Logstash project itself was started in around, I think, 2009. But the seed, I suppose, of what became Logstash was from 2004, I think, which you'll see is one of the filters in Logstash called Grok. And I wrote Grok because I was, this was the first time I'd really gotten into Linux and Unix systems. And I was looking around the system and I saw, like, the security logs had all these failed login attempts from, and I was learning about firewall rules and things like that. And I said, you know, why don't we block these things? You know, if a failed login attempt is...
and more than five times in a minute, block it. You'll see this formalized in OpenBush projects like fail-to-ban. This is a pretty cool project. But I wanted to... Yeah, it's good. It's good these days. You can, not to get too far off topic, but I think fail-to-ban can do clustering now, so you can have shared information across multiple machines. So if it's a brute force attempt that's right across your infrastructure, it'll pick that up. I may be wrong about that, but I think I remember reading that. But one of the things, if you've ever done log analysis or written a script to process a log, you'll probably reach for a tool set like regular expressions.
where you kind of pull out pieces of text, a cryptic language to parse. And then I didn't want to just do... Once I wrote something very simple for doing brute force login attempts, I looked at some web server logs and saw similar activities, but the log formats were completely different. The recognition that there are thousands or millions of different and incompatible log formats is why GROC was written 10 years ago now. And that set into, several years later, growing into not just the parking problem of figuring out what's the IP address that was related to this log request, or what was the error code, how long did it take? But also, you have a...
the kind of centralization problem where you get, especially with cloud stuff these days, you're going to have more than 100 servers or at least 100 virtual machines or components in your infrastructure. And in order to debug a problem, you have to know where the logs are on each machine. You have to know what machines those logs are on. You have to have access to get to those machines. You have to have expertise to be able to read the logs. And all of those things together, it's a serious cognitive burden, right? Especially, again, I focus on things blowing up at 2 a.m. Like you have no, your mental faculties are not good when you've been woken up by a major.
So I think one of the things that I like doing is sort of codifying my knowledge, and that's how FDM became the package. It just makes something generate it. So LogSesh became the sort of general purpose of parsing your logs that helps you transport data. So you can run it on like 100 or 1,000 or 10,000 and collect all of your logs and parse them. When I talk about Elasticsearch, I think Elasticsearch to me was really the catalyst that made me want to put a lot of effort into LogSesh. Because if you look at what log analysis is, you have to transport all your data somewhere central. You can read it in one place. You have to process it because none of the formats are the same.
So that means you have to store it somewhere that's hopefully scalable, and then you want some kind of visualization system so that you can start looking at shapes instead of raw text. And when I found Elasticsearch, it solved the storage problem for me. It promised to be a horizontally scalable distributed search system, and that's exactly what I wanted to do with logs. At the time, there was no visualization component, but it solved the hard problem to me, which I was not interested at all in solving, which is, I think, the catalyst for Logstash. You put them together, and you have something that can centralize your logs, process them into a common format or common theme, and then you can do searches and analysis on them.
Speaking of search, we got a question in from Twitter, actually from Iori. So thanks, Iori, for this question I want to pose to you, Jordan. With Google as the 800-pound gorilla, what edge does open-source search tech have for us? By Google, I assume you mean like Google search, like the web search. Yes. I think that's correct. Feel free to like put that out and say I'm wrong. But the use cases that Elasticsearch is solving isn't just like web properties in search in a normal sense. Elasticsearch gets used for a number of different, I would say like problem spaces or business use cases.
You could certainly use it to build something like a web-based search engine. You'd have to write the web crawler component or use an open source one. There's a lot of good options for you there. But beyond just straight up document search, there's data analysis. So instead of looking at what Google does, what the user does on Google or Bing or something like that, you're searching for some terms and it gives you webpages. So you're typing a term in and you're getting documents back. But Elasticsearch is more than just search. It gives you analytical features. You can ask for a given search query. What are the most popular words in all of your documents?
Or if you're storing numerical data, you can ask for the standard deviation of a certain field in all of the documents that are found. Those types of things lend itself very well to what Logstash helps with, which is log processing. And so if you're taking, let's say, front end, and they may say, you know, I sent a query to the database, and it took such amount of time. If you're storing that stuff in Elasticsearch, you can ask Elasticsearch to say, OK, over the last hour, show me the average. Uncle Bob can fix just about anything around the house, at least according to him. But when it comes to natural gas appliances, they should always be inspected by a qualified professional. Learn more at embridgegas.com slash safety.
And Elasticsearch comes with a very robust API to assist in that, correct? Absolutely. So one of the things I think Elasticsearch is really excelling at is that it's basically driven entirely for HTTP. For a lot of systems, you would have to have... Logstash makes mistakes early on. Whereas Elasticsearch, like the config file for Elasticsearch, most people don't touch. You leave all the defaults and you just run it. And anything else you do with Elasticsearch, any configuration you do with it, is after you start it up and after you've got a cluster. Whether that cluster is one nodes or a thousand nodes, it doesn't matter. The instructions for what Elasticsearch should be configured to do happens while it's running. So everything is API driven, which is really, really awesome. And I wish I, I mentioned some regrets about Logstash. I wish I had made Logstash API driven from the start and not config file data. Gotcha, gotcha. What languages do you currently like Holden?
right now mostly in Ruby. Logstash is written in Ruby. The reason for that was in 2009 or whatever when this project was started. That was just the language I used most commonly. Any narrative I spin beyond that is mostly to make it sound cooler. But it was just the language I picked. There was no other reason. But I think it was a good choice long term. Because Ruby seems to be, kind of anecdotally, it's friendly to people who don't consider themselves whatever you might label a real programmer. And I'm scared of this. I say real programmer. But we've gotten a lot of contributions from the community.
People write new plugins for Logstats, and they write this cover letter. And they say, I'm sorry, I'm not a real programmer. I've never done Ruby, but here's a plugin that outputs to Nagios. And it works. I'm not happy that they're deprecating themselves. But it's awesome that they found success. And so I think Ruby was a good choice. We deploy on JRuby as a platform. JRuby is an implementation of the Ruby language, but it runs on Java, on the JVM. So you get things like good access to real threading primitives so you can use multiple systems. It has a really mature garbage collection.
It gives us access to both the Ruby ecosystem of libraries as well as the Java ecosystem, which is awesome. It basically doubles the amount of libraries you can use. So that's Ruby. Also, Elastic Church is programmed primarily in Java. But we also have a dedicated Elastic Church clients team. We mentioned that Elastic Church is basically all programmed through the HTTP interface. At least in my opinion, most of the major programming languages, we have officially maintained clients, things like that. So you may not have to learn the HTTP way of speaking to Elastic Church. You can use the Perl client or the Ruby client or the Python client or whatever your language might be. Nice.
I suppose is the last piece of the puzzle, which is programmed mostly in JavaScript. I think it's, I can't remember the framework they use. It might be Angular, but I might be wrong about that. What would you like to see in the future for Logstash? We're sort of planning out tentatively what the roadmap could look like for what we're loosely calling Logstash 2.0. And I look at the success of other projects, and we're trying to mirror what we believe made them successful.
one of which is Elasticsearch's ability to cluster and form something that sort of scales relatively naturally. It kind of throws your data around in the right ways so that you can have 10 servers in a single cluster, and you can ask them all the same questions, and they spread the data around. They farm out the work to answer your questions. I think one of the next steps for Logstash is going to be doing something similar, where instead of deploying one Logstash agent per node or per system that you want to deploy it on, you deploy... and maybe we figure out how to, in the long term, distribute work or automatically scale or do some kind of resiliency or load sharing or things like that. I want the configuration interface for Logstash. I want it to be at the cluster level. I don't want it to be at a per node. Because then we can start automating things, right? We can start talking to 100 Logstash, and it'll be much easier to speak in the mouth. That would be nice. During my implementation of Logstash and Elasticsearch, I come from a...
dealt with relational databases for 15 years and have just about zero exposure to NoSQL-style databases. The one thing I found interesting was when I saw regarding using StatsBee and some other packages to get the type of thing set up. Do you have any tips on how someone would normally do this without, I guess, dealing with it during the import and adding a counter or something like that to the log itself?
So STATC, for folks who don't know, is a service that does counting. You send it packets, and you say increment this counter by such and such amount. The output of this system is sort of an aggregated view. So the use case is, let's say you have web requests coming in. Every time you get one web request, you send an increment number of requests by one to STATC. And every 10 seconds, it'll output the aggregate view, average number of requests per second, standard deviation, those types of things.
And I think that's a good solution if you already have stuff like graphite or similar metrics oriented. The world that I think Elasticsearch is trying to build is that Elasticsearch can be your metric store, can be your documents or your log store. It's quite good at metrics. If you were going to do counter style things in Elasticsearch, Elasticsearch has an API, I think they call it upsert or update. I think update is the right API call. Where you say update a given document that's already in Elasticsearch and you give it a script. You say update and update this field plus one.
That sounds like it would work. Yeah, it was rather difficult. I actually had spoken to Greg about it when I ran into it because, you know, coming from SQL, a lot of times, you know, I could say something like, okay, just write a quick query, you know, and just set up a, you know, account based upon query. And, you know, so when I was doing an elastic search, I'm like, okay, how do I make a metric out, you know, just like on the fly, you know, without having to, like, really give a lot of, you know, force on it, get this, you know, built on the, you know, when the data's coming in. Yeah, that makes sense. I think that's one of the ways I think these kind of seamless style data storage solutions are useful because,
In the world of logging, there's a billion formats. You don't really know the schema of your data. If you're looking at a relational database like MySQL, you have to declare all of your columns on your table before you start storing data in it. Whereas with things like Elasticsearch, you can define that up front if you want to. But you have options of allowing Elasticsearch to discover what your data looks like and build the schema on the fly. In terms of getting counters out of it, there's a bunch of different kinds of queries Elasticsearch can do. If you're using Logstash and you have web data coming in, you want to know the shape of data over time, like hits over the last hour.
But for each data point, you might want them to be like over every minute, so you get a nice graph, like a nice line chart. Elastic Church's aggregations API will allow you to do that. You can do a histogram over time, bucketed by some kind of time interval. Where I think that gets really cool is you don't have to know the questions you're going to ask before you ingest the data into Elastic Church, which is where I think the logging use is really valuable. You don't know the angle at which you have to view the data to answer some questions before something catches on fire. Nice. So we've talked about...
some parts of the Elk ecosystem. We talked about Elasticsearch, which is the indexer in the search engine, Logstash. We talked about Cabana, which is the front end. But there are actually a couple of more pieces to this ecosystem. One is Marvel, and the other one is the security. I don't know how to explain it. It's not an appliance. It's a security plug-in. Is that accurate? Okay, so can you tell us about what Marvel is and tell us about the security plug-in? So Marvel is kind of a...
How to describe it? It's a monitoring dashboard on top of Elasticsearch. So Elasticsearch itself has a lot of internal statistics and metrics about how it's behaving, how much memory it's using, how long certain things are taking on disk, other background task behaviors, how frequently things are being merged, or whatever the general behavior of the system. And Marvel takes that data, and building on Chibana's existing interface, it basically takes... the statistics coming out of Elasticsearch and Kibana to do the rendering, and it gives you a really powerful view to see what is going on in your cluster for the purposes of debugging it. So if something is, if your queries are taking too long, or data appears to be missing, or one or two nodes appear to be slower than the others, you can use Marvel to see the shape of data across your infrastructure, which is really, really great for debugging it. Excellent. And for Shield, Shield is still in data. I don't know exactly when the release is coming, but it's adding a number of security features to Elasticsearch. It's going to be adding role-based access.
SSL support so you can encrypt your traffic within the Elasticsearch cluster as well as coming in. I think it may have a few more features, but my brain is forgetting them. No problem, no problem. That's great information. So I use – I haven't gotten Marvel to work yet, but in the past, when I first started using Elasticsearch, I used the plug-in head to keep an eye on the health of my Elasticsearch cluster.
It helped me in the beginning to kind of visualize the concept of shards and indexes. But when I read about them initially, the concept kind of eluded me. And then I kind of hear – I actually see that question quite a bit whenever I get out there and I'm doing a search or something like that, looking up a problem without Elasticsearch or something like that. I'll see somebody say, hey, what's the difference? So just tell our listeners, kind of explain to our audience what shards and what indexes are and how they operate in Elasticsearch. All right. So actually, this was the question I had spent the most time preparing today, and hopefully I have been asked.
I will give you a caveat and say that I'm most familiar explaining these things when I have visual aids. But we'll do the best I can. And if I'm curious, let me know. So at the most general level, an index in Elasticsearch is just a collection of documents. A rough analogy to the relational database world is a table. My SQL table is roughly analogous to an index in Elasticsearch. And so an index is just a box.
A document in Elasticsearch terms would be a row in a SQL database, for example. Not to stretch the relational database metaphor too far. So you have an index, and it's basically all your documents. You can have multiple indexes, for example. Logstash will do one index per day, and I'll talk about why we do that after I finish explaining indexes in the chart. But if you have one index, 10 indexes, 100 indexes, it's really up to you and what your data needs are. But let's say you have one index, and the collection has a bunch of logs for today. The way that Elasticsearch...
out horizontally is it splits up your index into a bunch of partitions that they call shards. And each shard can be different sizes, but it's a fixed number of shards. But by default, you have five shards per index. You can change it if you want to. And a shard is essentially the distributed unit of work in Elasticsearch. So if you have five Elasticsearch servers and using the default, your one index will be spread roughly evenly. I mean, statistically, it's going to be about even across all five servers. Now, in some cases, some shards may be placed on multiple servers if you have replicas. So replication is another feature of Elasticsearch where
each shard can be replicated. The default is that you have one replica, which means you have two copies for redundancy and also for performance. Hopefully I explained that one. Does that make sense, indexes and shards? The shards are just parts of your index, and index is just a body of documents.
Yeah, definitely, definitely. And I just wanted to explain that, because like I said, and maybe you're like this too, but I'm a visual person, so when I read something, it doesn't quite, it might not quite click at me at that moment, but when I installed the plug-in head, and then I looked at it, I'm like, oh, okay, now that really makes a lot more sense in how, you know, the index is, how, you know, how I have one index per day, and then the shards are broken up in between each one of the nodes in the cluster, and it made more sense. Yeah, it's so much easier to just point out the visual and say, yep, that's a shard, and that's your index. Exactly. Yeah, go ahead.
One day Greg and I, I think almost a month ago, we had an in-depth conversation about these indexes and charts because it was like index. And I was like, okay, yeah, index. But I didn't realize index in terms of Elasticsearch actually storing documents also. So it was quite interesting. So how does a person... You can finish up. I was about to ask, okay, so how does a person who wants to try out the Elk stack get started? Lots of good resources. So our website, elasticsearch.org, has...
download links to all of our software. If you're looking specifically to use Elk itself, the way we package Logstash is we have it include Elasticsearch and Kibana in the same package. So if you're just looking for a small demo or small cruises concept, all you need to do is download the Logstash package, and I believe the Getting Started Guide on the Logstash website will show you how to use each of the things. Nice, nice. So one of the things that I run into when setting up the Elk stack is kind of right-sizing the Elk environment.
I guess I should say more of the Elasticsearch cluster. I'm sending about, I don't know, right now I'm sending about between 25 to 30 gigs of data a day to our Elasticsearch cluster. And that's without, you know, somebody jump off. I'm still here. Hello? I think we lost Jordan.
Well, we'll be right back with that question. If you're listening there right now, we are talking to ElkStack, that's Elasticsearch Logstash at Kavana with Jordan Sissel. Jordan dropped out the call. I'm pretty sure he'll be right back on. We're in the middle of asking him a question about the ElkStack. A lot of great information going on right now about ElkStack, about Elasticsearch, about ElkStack. So I'm really stoked to be asking Jordan, to have Jordan on the show to be asking these questions and getting a lot of good information here.
So Jordan just hit me up on Twitter. He said, oops, phone broke, rebooting. So he'll be back on shortly, and then we'll continue with the podcast. Ayori, he's saying that this is such a fun, nerdy talk. Love it. She loves nerds. Thank you, Ayori. Why do you know? Everybody's talking nerdy tonight, man. This is nerd talk night or something. We'll get too geeky here. My phone is awful. Sorry about that.
We were just talking about Ayuri. Ayuri just tweeted that she's loving this podcast. She likes the fun, nerdy talk. So I'm just going to laugh out of that. So as I was saying before, right-sizing the elk environment, more specifically Elasticsearch, I send about 20 to 30 gigs, 25 to 30 gigs of data a day to Elasticsearch. And this is without parsing, not parsing, but paring down any of the information that I send it. A lot of this stuff was set up to kind of...
kind of get a feel for what we could do with Elasticsearch and everything. So it was pretty much, you know... the water hose on and just let LogSats suck it all in and let Elasticsearch do all the indexing. But I did run into some performance issues and didn't really find a lot of information out there on the Internet about how you would go about, or maybe I just didn't understand, about right-sizing your elk environment. So can you give us, is there anything out there, can you give us some tips about how do you kind of right-size your environment around some best practices, I guess, around Elasticsearch configuration, like allocation of resources, the number of nodes per cluster, that type of thing?
Sure, sure. So I suppose the first thing I would say is the capacity planning question, our first response is always, when I say R, I mean R as a company, our first response is always to say, it depends. And then you get a frustrated sigh from whoever's asking me, like, no, I just wanted to give me a formula, give me a number, right? And let's take your 20 to 30 gigs a day thing, for example. Specifically for our last features, if you think performance problems there. Let me do some numbers, some math real quick, because math is awesome. 20, I'll take 30 gigs a day.
I'm just letting you guys know that we are blowing up the geek meter. It's like way over in the red right now. We're talking flat rules and abacuses. You got to use the tools you need to get by. So with your 30 gigs a day, my hand wave estimate is that it's about 2,000 events per second, 2,000 long messages per second. Is that not about right?
Yes. And so, with that respect, I think a single, like, moderately-sized Elasticsearch node would be able to handle that. Now, when it's a moderately-sized, I'm, like, normal, like, an M, like, I'm 82 and XLRs. I think it's got, like, four A cores and 16 to 32 gigs of RAM. I've got a medium-sized system, even though Amazon calls it an XLRs. But we're not here to argue for that, I suppose. But, I mean, the place I see most people having trouble with Elasticsearch not being given enough resources is in – where did my train of thought go on that one?
So if you're having trouble, if a lot of things are relatively healthy when you're storing data in it, the block dash or whatever your indexing method is, but when you send a query to it, it falls over or it freezes or it takes a couple of seconds to get a response, usually that means that for the data set that you have, it's too big to fit easily in the memory to do some calculation talk. So the number one problem is that if your query is going over such a large amount of data, that Elasticsearch can't compute the answer fully in memory, then you're going to have to spend a lot of time pulling things into memory, putting some other stuff back on the disk, and back and forth.
And so I think where you might run into trouble as news users is Elasticsearch, the script that you run to start Elasticsearch has a default Java memory size of one gig, which is perfect for prototypes and things that are not going to be hit very hard. But you want to give more memory than that, probably, depending on your use case. Now, for your 30 gigs a day times, I don't know, 30 days, that's quite a bit of data if you want to ask a question of something that happened over the past month. So Elasticsearch has to go and pour all that stuff into memory and do some computation. So it may be that you want to give it more memory. And in terms of memory recommendations, we recommend giving half of your system's available physical RAM to Elasticsearch. And there's a reason for half. The reason for half is two reasons. One is Elasticsearch will store everything on disk in a compressed format.
And that has benefits because most modern operating systems have this thing called the file system cache, where if you read something off a disk, the system kernel will acknowledge that thing was read and store the value in memory so that if you read it again very shortly in the future, it doesn't actually have to hit disk. It comes right out of RAM. And so by only giving Elasticsearch half of the physical memory, you give the other half of the physical memory to the file system cache or other things that are using the memory system. And just by having things compressed, if you have 15 gigs in your file system cache, that's probably going to be 20 to 30 gigs of actually uncompressed data, which is really easy to access. The second reason we recommend only giving half is because the JVM, or DAVA, garbage collection gets slower as you give it more and more memory. So we recommend if you have a really, really large server with more than 64 gigs of memory, don't give Elasticsearch more than 30 gigs of RAM. And if you've got to keep Elasticsearch, be able to keep things fresh in memory, it'll use a file system cache intelligently. And you also get, if you're doing a lot of things that cause garbage collection in Elasticsearch, it'll still be fast.
Okay, that makes sense. And early on in setting this up, there were some things that I definitely had to set. The heat size was definitely one of them. And there was a couple of hard limits, a couple of things I think in the Elasticsearch config itself. It was the lockout so it wouldn't swap. I did set that as well. And right now I have a three-node cluster. I think each of them have about 16 gigs of memory apiece. And it's noticeably a lot faster doing that.
queries and things like that. But at first, it was really rocking up quite a bit. And I had to kind of search to try to come up with some answers on what to try to fix. I think you're right on track in terms of identifying that the capacity planning for Elasticsearch is not well documented at all. Even if we can make the claim that it's a difficult science to do, we should have some documentation that helps users get started. One other story I would tell you is about, in terms of scaling, is the configuration file for Elasticsearch. My recommendation, our recommendation is don't touch it. Leave it alone. If it looks like a knob, but you continue to dial number of thread workers or sizes and things, don't touch them. The first interaction, yeah, don't touch them.
Yeah, I just told Greg previously, I think probably a month ago or so, I had a minor issue with my machine that's running out, and it was, eventually, I think it took several hours, eventually when I resolved it, it was an issue to deal with the amount of memory that was set, because, you know, it was initially set to one gig, and it was very strange because every time I start, you know, start up Elasticsearch, The process was run, but it was just seem to lock up. There was no log files and nothing was going on. And eventually after I probably searched through IRC logs or something, I finally figured out that it was basically JVM. So I increased the JVM to two gigs, and that took care of the problem. I believe it was Marvel that actually helped me figure out what was going on. Because initially, it was funny because initially, I only had Marvel running for like a week or two.
It was like over a weekend, I come back to work, and I log into Kibana, and it's just nothing. It's dead. And so, you know, I initially thought Marvel had killed it for some reason. And so I thought, okay, let me try unauthorized Marvel. Did that reboot? You know, it's still dead. And so eventually when I got Marvel reinstalled, I started looking at it. You know, it had the, it was showing information on JVM, and basically it's just at 100% it was just stuck there. And so I went through and tried doubling it to two gigs, and then from that point it's been running since. I think there was very little documentation on that also. I was looking for it.
Yeah, and in some cases, we need the software to give us more feedback when it's having trouble. But in some cases, when the JVM is just out of memory, it spends all of its time trying to clean up repo. In some cases, it's just always doing garbage collection. So even if a laptop wanted to detect that, it couldn't. Exactly. Yeah. I mean, I'm like a big file, but my story for that is always that, you know, if operations people, myself included, are the worst, they're just like randomly tuning things to look like knobs. And I think that, you know, keep turning things until it works, right? Exactly. That can make it better.
Yeah, exactly, right? It goes to 11. We might as well take it to 11. But if our cars or in our bikes and our houses and everything had all these knobs that software had, you know, our cars would all burst into flames, the bikes would collapse, and our houses would collapse. We're going to Ferrari. Yeah, right? Like, you know, car engine timing, very sensitive things. If you just, like, have a knob that you just turn to, like, change the timing, like, your engine's going to collapse on itself or whatever actually happens when that changes. And so that's why that's probably not a knob in most people's cars.
The practice for Elasticsearch, and I think they do a good job at this, is anything that could be a constant in their environment. Elasticsearch makes something that's tunable, and it tries to take a reasonable default. In some rare cases, we'll say, yeah, change it, but leave it alone. Just don't touch it. Gotcha. Good information, I know, because I'm definitely always looking in there and poking around and saying, oh, hold on, what if I, what happens if I, I know the chance is this. My chance is good. 45 is better. I'll just double this and see what happens. I do that all the time.
It's sort of like when you have, like, EQ settings, and then you, like, turn all your EQs down, and then you start raising the values of each one of them just to get its things right. I wish it worked like that, right? Yeah, right. So what's next for the L set? So it's a lot of cool stuff. Kibana 4 is in public beta right now, so you all can check it out if you want. Kibana 4 is a pretty significant change, an advantage of improvement in my opinion, of what Kibana 3 provided. Kibana 3 was all about dashboards, and you have your unit of viewing stuff where we had dashboards with different panels. Where a panel is just a visualization, a graph, a pie chart, a table of some kind. And Kibana is moving away from that a little bit and making kind of the main unit of work the panels themselves.
So you can build one special view on a certain kind of data and then reuse that in multiple dashboards, which is going to be really awesome. And it also has support for Elasticsearch's aggregation system. So you can do multi-dimensional analysis. You can look at across four servers. Across your servers in one dimension, and then the applications running on them, and then the disks underneath them. So you get really good operational intelligence for IT data. It's going to be so awesome.
Nice, nice. And can you mention, just tell us a little bit about the first user conference for Elasticsearch, Elasticon? Yeah, Elasticon is going to be happening in March of next year. And it is the first user conference. It's in San Francisco, I think March 9th. It's going to be – I'm really excited about it. I don't know how many details we've leaked about it, but you can go to Elasticon.com and get some more information about it. But we're going to be talking about –
We're going to have the keynotes. We're going to talk about future paths, the road to where we've been. We're going to have really, really technical deep dives about certain kinds of topics, whether that's BlockDash or Lacky Dirt or Kibana, or use cases about various different things, whether that's IP log data or stock streams. One of the coolest demos I saw recently is... Seattle's, city of Seattle, I think, they have a live stream of all of their 911 calls. And one of our folks here has that set into a log dash and has that plotted on a map so they can see in real time for specific kinds of 911 calls, they can track that across the city in real time, which is so cool. Nice, nice.
Great, great. So, Elastic Con. I said Elastic On, and it didn't even recognize it. It should have just been Con. So, Elastic Con going on, let me see, you say March, you said 9th through 11th? Yeah, I think it's 9th through 11th. 2015? San Francisco, California. So, what's next for you? What do you got going on? I got two kids. Kids are awesome and frustrating in equal ways, but kids are so good.
That's most of my time these days outside of work is raising the kids and hanging out with the family and whatnot, and pretending I can actually do housework, like, you know, I don't know, running speaker wire or something on the walls, but then swearing a lot. I destroyed my garage, almost destroyed my garage door a couple of days ago, but thankfully it was a cheap fix. I had professionals come out and undo my mistakes, so that gets back to that. Don't do nothing. It's funny, I try to tell my wife that. She always wants to be Mrs. DIY, and I'm just like, it's all good and dandy when you're following instructions, but what happens when things go wrong? That's when you need experts to clean up your mess. I'm like, yeah, I like to actually stay away from them.
those type of projects, DIY projects. So I didn't notice in your picture that you had any missing teeth, so I'm kind of having a hard time believing that you play hockey. So Arlie, I play what everyone calls beer league hockey, which is, you're not actually allowed to have beer in the locker rooms or anything, so I don't know why they call it beer league, but I play, I think there's, I don't know, in my area, there's probably 15 leagues ranked from like A to E, and for some reason they went A, B, B, B, C, double C, triple C, I don't know, the counting system doesn't make sense to me, but we play in triple E. which is like the third from the bottom in terms of skill level. So we're not your Gretzky. And as a result, we have to wear face shields so no one loses teeth. So no throwing off the mask onto the ice and just going at it, huh? I mean, some of us got work in the morning, you know? I was in a fight once my hockey game broke out, were you? Yeah, that's good, man. Sometimes it affects you. Exactly, exactly. It's fun, though, man.
Nice, nice. And you'll be speaking at Elasticon. You spoke at Puppet Conf. Any other conferences coming up that you're going to be speaking at that you know of? That I know of. I don't know. I'm just surviving day-to-day trying to keep stuff going, but my time management has gone out the window lately. I think it's trying to take care of two kids. I talked at Puppet Conf. I talked at Fosse Con. Puppet Conf was a great conference. Yeah, he's a big member, Brian Smith. So, yeah, big up to Brian. Yeah, that was a great conference.
And I'll be speaking at Electicon, and I don't think I have, I think I'm going to be at Strata in San Jose next year, early next year, I think it's February, and I'm also going to be at Scale in Los Angeles. Scale is also an excellent conference. They have, it's very maker, hacker-friendly, Linux-focused, but they have a kid's track. And when I was walking through my talk last year, the conference room across the hall was just like 12-year-old kids teaching a bunch of adults how to make dice in Blender, and Blender being a 3D rendering software. And I was like, wow, it's amazing.
I actually took my sons to the Ohio Linux Fest this year. It was their first TetCon, five and two. And I've got pictures of them playing with the one laptop per child. So that was pretty cool. That's awesome. Yeah, the big O'Reilly conferences are always monumental. Yeah, yeah. Well, how can people get in contact with you, get in touch with you if they want to follow you on Twitter or email you?
Yeah, I was in fact, I'm terrible at email. So if you email me and I don't respond, you'll have to post me on Twitter. But on Twitter, I'm just at Jordan Cussell. And my email, if you want to email me, is my initials, JLS at semi-complete.com. It's really easy to get in touch with me. If you have questions about Logstash and you don't know who to talk to, feel free to email me directly. I'm not going to make funny. All questions are good questions. And if I'm not available, I might point you at a community that could help you, whether that's Logstash or some other community, if I know it exists.
But, yeah, reach out if you have questions or you want to chat about this. Excellent. And there's IRC ones for each one of the main components of the Elksack, Elasticsearch, Kibana, and Logsash, correct? On a free note? Yeah, not Kibana, though. Kibana, I think that part I know. Yeah, there's just Logsack and Elasticsearch. Is there? Yeah, there's a Kibana. I'm in Kibana right now, as a matter of fact. I'm in there now, too. I didn't know there was one, but now I know. So, okay, cool, cool. So, is that it? Is that it? Oh, yeah. Oh, no.
I wanted to get the URL. For downloading the Elk stack, you can go to elasticsearch.com, correct? Yep, that's right. Excellent. Well, Jordan, I want to thank you for joining us this evening, giving us some great insight on the Elk Stack and making sense of your data. Feel free to, you know, hit us up anytime, and maybe we'll have you on later on this year sometime. This was a great podcast, and I definitely appreciate it. Yeah, this is awesome. I think my one closing thing would be that if you try out Elk Stack or whatever, or SPM if you need to practice Elk Stack, and you run into trouble, don't bang your head on it for a couple hours. Start up in the community, ask a question, recognize that software universally is bad, and that, you know, we can come together and hug it out and realize that we can help each other.
If you're having trouble with the bug. Excellent. Excellent. Well, thanks again, Jordan, and wish you well on anything you do in the future, and I hope to see you or hear from you soon. All right. Thanks for having me, Sean. Take care. Take it easy. All right. That is it for this episode of the Blacks in Technology Big Tech Talk podcast. I want to thank all of our listeners. Thanks to our guest, Jordan Cassell. Thanks to our sponsor, Elasticsearch. And thanks to Sean. Sean, are you still on? Absolutely.
Hey, thanks a lot, man. I definitely appreciate you coming on and partaking in this delightful podcast, a very delightful and informative podcast. So come check us out. We're at blackstechnology.net, a.k.a. it's Sean Jackson. Thanks again, a.k.a. GT50. He's in our IRC channel, and that's the Tech Chat. If you want to come in here and chat with us. So thanks to all our supporters throughout the years, and especially this year. There's some great things coming up for the upcoming year. We want to wish everyone a great holiday season and a happy and safe New Year. So thank you for listening. I hope this podcast has educated some of you on the Elk stack and on visualizing your data, making sense of it. If you have any ideas or topics for a future...
Big Tech Talk Podcast. Shoot them nuts. Just shoot us an email or contact us at blackstechnology.net. Check yourself before you wreck yourself. I love that phrase. I made that up, by the way. Thank you, everybody, and see you next year. Take care, Sean. Oh, you too. I'll see you later, Greg. Blacks in technology. Blacks in technology. Blacks in technology. Blacks in technology.