top of page
Geeking out on Splunk and IT Security
Search


Advent of code in SPL - 2025 day 8
Day 8 is here . Part 1 So the first challenge is to enumerate all possible pairs. Let's play with very simple data to start with: I guess eventstats is a good way to bring all of the events into each of the events: Now we just have to mvexpand item2. But there are a couple of problems: we can't have pairs made of twice the same event, that's not possible. the order doesn't matter in pairs, so we need to dedup them somehow. Cool, so now we know how to enumerate pairs. Let's ap

Gabriel Vasseur
2 days ago4 min read


Advent of code in SPL - 2025 day 7
Day 7 is here . Part 1 - visual solution One thing I've learned about myself with these challenges, is that I always want to make the solution as splunky as possible. For me that means starting with a stream of events, i.e. treating the challenge data as one event per line, and pretending they are indexed events in splunk. That's also why I wanted to use timed lookups in day 5. Of course, that kind of approach is not always ideal for this type of programming challenges, and i

Gabriel Vasseur
6 days ago6 min read


Advent of code in SPL - 2025 day 6
Day 6 is here . As always we save the challenge data as a csv file, add a column header (just one column called "math"), and upload it to splunk: Part 1 Cephalopod math is organised in columns, which is going against of the grain in splunk. So a good first step would be to transpose it. Before we can do that, we need to give a name to each field: Then we can use the transpose command: Then we need to split each field on spaces: Note: sadly split does not take a regular expres

Gabriel Vasseur
Feb 203 min read


Advent of code in SPL - Day 5
Note: I brought up these challenges to the puzzle channel on the Splunk Community slack a few weeks ago, and I'm delighted to see that ITWhisperer has now started his own series about it! His day 1 is here . I encourage you to check out his solutions as it's great to see different ways of thinking! Day 5 is here . For this one, my thoughts went to lookups. The idea would be to create a lookup of fresh ingredients. Then for each ingredient all we have to do is check if it's i

Gabriel Vasseur
Feb 105 min read


Advent of code in SPL - 2025 day 4
Day 4 is here . Part 1 Let's start with the example data: For each position, we need to count the number of neighbours. That's ok for left and right neighbours, but for the ones above and below, we need the previous and next row. That means using streamstats with current=f! But we need to use it twice now: It kind of works, but you can see we have two problems: we have a useless record at the top. We can simply add | search row=* we're missing one at the bottom. All we need f

Gabriel Vasseur
Feb 45 min read


Advent of code in SPL - 2025 day 3
Day 3 is here . Part 1 This one isn't too difficult. Given a series of digits such as 818181911112111, we need to pick two digits (conserving the order) to make the highest 2-digit number possible, so in this example 92. The first digit is obviously the most important, so we always want the highest one available, but we need to reserve at least one digit at the end of the bank for the second digit. So take the bank, remove the last digit, and find the highest digit: Now f

Gabriel Vasseur
Jan 274 min read


Advent of code in SPL - 2025 day 2
(Edited to use mvrange) Day 2 of the 2025 advent of code challenges is here: https://adventofcode.com/2025/day/2 You won't be able to do it if you haven't done day 1 first . We can break down this challenge in several steps: given a range (e.g. 11-22), enumerate all the IDs within the range (e.g. 11,12,13,...,22) given a number, assess whether it's made of 2 repeated halves somehow do this for all the ranges all together to get the solution Step 1 For this challenge, we'll s

Gabriel Vasseur
Jan 196 min read


Advent of code in SPL - 2025 day 1
Advent of code is a series of Christmas-themed programming challenges that's been running for more than 10 years now. While SPL is not exactly a fully-fledged programming language, I had heard in the past of at least one person (thank you Paul Dean for the idea!) attempting to do the challenges in SPL and this year I thought I would give it a go. I know it's more than a month too late, but this is the first of a series of articles tackling 2025's challenges in SPL. We won't

Gabriel Vasseur
Jan 123 min read
bottom of page