I’ve been using Splunk professionally over the last several years, and I’ve become a big fan of using it for my data processing needs. Splunk is very very good about ingesting just about any kind of event data, optionally extracting fields at search time, and providing tools to graph that data, find trends, and see what is really happening on your platform. This is important when your platform consists of thousands of servers, as it does at my day job!
While Splunk can handle events in timestamp key=value key2=value2 format, it also has support for dozens of standardized formats such as syslog, Apache logs, etc. If your data is in a customized format, no problem! Splunk can extract that data at either index or search time! Finally, there’s the Search Processing Language, which is like SQL but for your event data. With SPL, you can run queries, generate graphs, and combine them all programatically.
So yeah, I’m a huge fan of Splunk. One thing I use it for out of the of office is to graph the health of my Internet connection. This is useful both for when I’m at home and when I am traveling–I just feed the output of ping into Splunk and then I can get graphs of packet loss and network latency.
Let’s just jump into an example screen–here’s what I saw when I was a friend’s place and I uploaded a video to YouTube:
This one isn’t so much a kick in my childhood as much as it is me wondering what the writers were thinking:
The dialogue in this scene is just… so hilariously out of character for the Decepticons it’s surreal. By this point, the series made it clear that the Decepticons were evil villains, yet in this scene they’re portrayed as a bunch of silly drunks. Why? Just, why?
Overall, I am pretty happy with the Twenty Seventeen theme that ships with WordPress, but one thing that really drives me crazy is that whatever cover image you upload takes up nearly 100% of the entire web browser when viewing on a desktop or laptop. I find it darn near infuriating, because I have to scroll down just to click on a menu link or see content. That ain’t right.
Way back in 2005, I converted my website (and its predecessor) over to Drupal. Drupal has served me well for the last 13 years, but due to the direction in which Drupal as a product has moved, I do not feel it is the right choice for me anymore.
So I instead checked out WordPress, and was rather happy with it. It does one thing (blogging) really really well, instead of trying to be the “kitchen sink” like Drupal. As of this writing, I’ve ported over just about all of the content I wanted to port over, and have since switched www.dmuth.org to point to this WordPress Install.
Along the way, I learned some thing about how to set up and configure WordPress, let me share them with you:
TL;DR If you are comfortable with Docker and Docker Compose, you can go straight to the GitHub repo and get started. For the everyone else, read on…
When I stood up this website, I wanted to do so in Docker, but I ran into an issue: the official WordPress Docker image runs Apache. Apache is a nice webserver for small amounts of traffic, but it does not scale well. As more concurrent connections come into a server running Apache, more copies of the httpd process are forked, which causes RAM usage to go up. Having RAM usage regularly go up and down is not ideal.
Fortunately, there is a better way. The Nginx webserver, combined with PHP running in FPM mode scales much better as the memory usage is more constant, which means that peak loads on the server won’t cause you to thrash the swapfile. Encryption would also be nice, so I wanted to have some SSL going as well.
I couldn’t find any existing solutions, so I built one! In this post, I’m going to walk through each piece of the puzzle.