envdb

command module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2015 License: Apache-2.0 Imports: 52 Imported by: 0

README

Build Status

Envdb - Environment Database

  • NOTE: envdb is still beta software.

Envdb turns your production, dev, cloud, etc environments into a database cluster you can search using osquery as the foundation.

Envdb allows you to register each computer, server or asset as a node in a cluster. Once a new node is connected it becomes available for search from the Envdb ui. Envdb was built using golang so the whole application, node client and server comes as one single binary. This makes it really easy to deploy and get working in seconds.

Video Intro: https://youtu.be/ydYr7Ykwzy8

How it works.

Envdb wraps the osquery process with a node agent (node as in cluster node) that can communicate back to a central location. When that node gets a new query, it's executed and then sent back to the tcp server for rendering. Once the request is processed it's then sent to any avaliable web clients using websockets.

Envdb has an embedded sqlite database for node storage and saved searches.

ui --websockets--> server --tcp--> node client.

Download

Pre-built versions (deb/tar.gz) of envdb are avaliable for linux 386/amd64. linux downloads

Building on macosx is easy tho, checkout the section below.

Building

Make sure you have Go installed. I used Go version 1.4.1.

deps
  • go get github.com/jteeuwen/go-bindata/...
  • go get github.com/elazarl/go-bindata-assetfs
  • go get github.com/tools/godep
make
  • git clone https://github.com/mephux/envdb.git
  • cd envdb
  • make

Usage

  • NOTICE: The default username and password for the UI.
usage: envdb [<flags>] <command> [<flags>] [<args> ...]

The Environment Database - Ask your environment questions

Flags:
  --help       Show help.
  --debug      Enable debug logging.
  --dev        Enable dev mode. (read assets from disk and
               enable debug output)
  -q, --quiet  Remove all output logging.
  --version    Show application version.

Commands:
  help [<command>]
    Show help for a command.

  server [<flags>]
    Start the tcp server for node connections.

  node --server=127.0.0.1 [<flags>] <node-name>
    Register a new node.

  users [<flags>]
    User Management (Default lists all users).
Server
$ envdb help server

  usage: envdb [<flags>] server [<flags>] [<command>]

  Start the tcp server for node connections.

  Flags:
    -p, --port=3636  Port for the server to listen on.
    -P, --http-port=8080  
                     Port for the web server to listen on.

  Args:
    [<command>]  Daemon command. (start,status,stop)
Running the server without a `command` (start, stop or status) will run the server in the foreground.

* Note: By default this will start the tcp server on port 3636 and the web server on port 8080.
Node Client
$ envdb help node

  usage: envdb [<flags>] node --server=127.0.0.1 [<flags>] <node-name>

  Register a new node.

  Flags:
    -s, --server=127.0.0.1  
                     Address for server to connect to.
    -p, --port=PORT  Port to use for connection.

  Args:
    <node-name>  A name used to uniquely identify this node.
`sudo envdb node --server <ip to server> SomeBoxName`
  • That's it - it's really that simple.
User Management
  • list users envdb users

  • add a new user envdb users --add

  • remove a new user envdb users --remove <email>

More UI

Self-Promotion

Like envdb? Follow the repository on GitHub and if you would like to stalk me, follow mephux on Twitter and GitHub.

TODO

  • add in memeory pagination for results.
  • Node/Server auth, verification and validation.
  • Code cleanup (will continue forever).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
_workspace/src/github.com/elazarl/go-bindata-assetfs
assetfs allows packages to serve static content embedded with the go-bindata tool with the standard net/http package.
assetfs allows packages to serve static content embedded with the go-bindata tool with the standard net/http package.
_workspace/src/github.com/go-xorm/xorm
Package xorm is a simple and powerful ORM for Go.
Package xorm is a simple and powerful ORM for Go.
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/gorilla/securecookie
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
_workspace/src/github.com/gorilla/sessions
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
_workspace/src/github.com/mephux/gotalk/examples/pipe
A simple example of two connected sockets communicating with eachother
A simple example of two connected sockets communicating with eachother
_workspace/src/github.com/mephux/gotalk/examples/stream
Demonstrates using streaming requests and results Demonstrates
Demonstrates using streaming requests and results Demonstrates
_workspace/src/github.com/nu7hatch/gouuid
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
_workspace/src/github.com/sevlyar/go-daemon/oldapi
Package daemon provides function to daemonization processes.
Package daemon provides function to daemonization processes.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/golang.org/x/net/websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
_workspace/src/gopkg.in/alecthomas/kingpin.v1
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
_workspace/src/gopkg.in/alecthomas/kingpin.v1/examples/curl
A curl-like HTTP command-line client.
A curl-like HTTP command-line client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL