Sign inSign up

stennie/ubuntu-mtools

By stennie

•Updated over 7 years ago

Latest mtools (https://github.com/rueckstiess/mtools) installed on Ubuntu 18.04

Image
3

536

stennie/ubuntu-mtools repository overview

⁠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.

mtools box

⁠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 attributes, converts to JSON.

  • mloginfo⁠: returns summary info about log files like start and end time, version, and storage engine. Supports optional output sections with additional info such as queries, restarts, connections, and replica set state changes.

  • mplotqueries⁠: visualizes log files with different types of plots.

  • mlogvis⁠: creates a self-contained html file that shows an interactive visualization in a web browser (as a more basic alternative to mplotqueries).

  • mlaunch⁠: spin up local test environments, including replica sets and sharded deployments.

For more information see the mtools documentation⁠.

Tag summary

Content type

Image

Digest

Size

206 MB

Last updated

over 7 years ago

docker pull stennie/ubuntu-mtools