Archive for 2017

A few Splunk queries for MongoDB logs

Here’s a few Splunk queries I’ve used to supply some data for a dashboard I used to manage a MongoDB Cluster. Election events If any MongoDB elections happen at 3AM on a Wednesday night I want to know about it. This query, added to a single value panel allows me to do this easily… host=mongo* […]

Getting started with CockRoachDB

I’ve been quite interested in CockRoachDB as it claims to be “almost impossible to take down”. Here’s a quick example for setting up a CockRoachDB cluster. This was done on a mac but should work with no, or minimal, modifications on *nix. First, download and set the path PATH ?View Code BASHwget https://binaries.cockroachdb.com/cockroach-latest.darwin-10.9-amd64.tgz tar xvzf […]

The blame game: Who deleted that file? Working with auditd

I’ve recently had an issue where a file was disappearing that I couldn’t explain. Without something to blame it on I search for a method to log change to file and quickly found audit. Audit is quite extensive and can capture a vast array of information. I’m only interested in monitoring a specific file here. This […]

Working with the PlanCache in MongoDB

I’ve been working a little with the PlanCache in MongoDB to troubleshoot some performance problems we’ve been experiencing. The contents of the Plan Cache are json documents (obviously) and this isn’t great to work with in the shell. Here’s a couple of javascript functions I’ve come up with to make things a little easier. These […]