Public Repository

Last pushed: 2 years ago
Short Description
mtools (https://github.com/rueckstiess/mtools) installed on Ubuntu 14.04
Full Description

What is mtools?

mtools is a collection of helper scripts to parse and filter MongoDB log files (mongod, mongos), visualize log files and quickly set up complex MongoDB test environments on a local machine.

How to use this Docker image

A sample startup script for OS X is below, assuming you will want to use XQuartz for interactive plots with mplotqueries. Alternatively, you can use mlogvis which supports a subset of mplotqueries' functionality using the d3.js visualization engine.

#!/bin/sh
# Check if XQuartz is listening on TCP
X_TCP=`netstat -an | egrep "tcp4.*6000"`
if [ "$X_TCP" == "" ]; then
    echo "Enabling X access to TCP"
    defaults write org.macosforge.xquartz.X11 nolisten_tcp 0
fi

# Get our ip address
MY_IP_ADDRESS=`route -n get default | grep interface | awk '{ print $2 }' | xargs ipconfig getifaddr`

# XHost will start X11 as needed
xhost +$MY_IP_ADDRESS

docker run -i -t -e DISPLAY=$MY_IP_ADDRESS:0.0 -v /Users/:/Users -w $HOME ubuntu-mtools

What's in the box?

The following tools are in the mtools collection:

mlogfilter
slices log files by time, merges log files, filters slow queries, finds table scans, shortens log lines, filters by other atributes, convert to JSON

mloginfo
returns info about log file, like start and end time, version, binary, special sections like restarts, connections, distinct view

mplotqueries
visualize logfiles with different types of plots (requires matplotlib)

mlogvis
creates a self-contained html file that shows an interactive visualization in a web browser (as an alternative to mplotqueries)

mlaunch
a script to quickly spin up local test environments, including replica sets and sharded systems (requires pymongo)

mgenerate
generates structured pseudo-random data based on a template for testing and reproduction

You can find the manual and many usage examples on the mtools wiki pages.

Docker Pull Command
Owner
stennie

Comments (0)