Archive for September 2016

Getting started with osquery on CentOS

I recently stumbled across osquery which allows you to query your Linux, and OS X, servers for various bits of information. It’s very similar in concept to WQL for those in the Windows world. Here’s my quick getting started guide for CentOS 6.X… First download and install the latest rpm for your distro. You might want to […]

Remove an _id field from a mongoexport json document

Although the mongoexport tool has a –fields option it will always include the _id field by default. You can remove this with a simple line of sed. This was slightly modified from this sed expression. Given the following data… ?View Code JSON{"_id":{"$oid":"57dd2809beed91a333ebe7d1"},"a":"Rhys"} {"_id":{"$oid":"57dd2810beed91a333ebe7d2"},"a":"James"} {"_id":{"$oid":"57dd2815beed91a333ebe7d3"},"a":"Campbell"} This command-line expression will export and munge the data… ?View Code BASHmongoexport […]

mmo: Getting started

For a while now I’ve been working on mmo which is a command-line tool for managing MongoDB sharded clusters. It’s about time I did a release and hopefully get some feedback. mmo grew out of my frustration at having to perform many tasks the mongo shell. Obviously json is better parsed by computers than with the […]