Giter Club home page Giter Club logo

envdb's Introduction

!!!!!!!!!!!!!!!!!! LEGACY use https://github.com/mephux/kolide

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

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

envdb's People

Contributors

anselmbradford avatar djcas9 avatar rseymour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

envdb's Issues

limited options for last node in list

Thank you for fixing the node scroll bar.

I had to redeploy the envdb 0.4.1 binary because 0.4.0 clients wouldn't reconnect to the server running 0.4.1.

I have enough nodes that at any browser window size I need to scroll to see them all.
The last node in my list is offline and I would like to delete it.
There isn't enough screen space for the full menu to appear so I can't delete the node.

I have the same issue for any other node in the list that happens to be positioned at/near the bottom of the browser window but I can work around them by adjusting the scroll bar and then trying again.

With the last item in the list that isn't an option.

Have you experienced this?

envdb.io and query sharing.

I got envdb.io for the project and I want to build a web service for submiting useful queries and loading them from the EnvDB ui. I opened this issue to track feature concepts or use submitted feedback.

Additional backend database support

Is there any WIP to allow Envdb to use something other than sqlite? I'd love to be able to use Postgres so I could throw this up on Heroku. From the looks of things, since you're using xorm this should be pretty easy and mostly just a matter of some configuration changes. I might be able to work on a PR if this isn't already happening.

Very fresh linux box make error

This is a pretty bare bones ubuntu 14.04 box w/ go 1.4.2 installed w/ gvm. It looks like a Makefile issue... in that maybe it's trying to run bindata the target before installing bindata the dependency.

Here is the tail end of make --debug

Considering target file `all'.
 File `all' does not exist.
  Considering target file `deps'.
   File `deps' does not exist.
    Considering target file `bindata'.
     File `bindata' does not exist.
     Finished prerequisites of target file `bindata'.
    Must remake target `bindata'.
Putting child 0x019e5430 (bindata) PID 23109 on the chain.
Live child 0x019e5430 (bindata) PID 23109
==> Embedding Assets
Reaping winning child 0x019e5430 PID 23109
make: go-bindata: Command not found
Live child 0x019e5430 (bindata) PID 23111
Reaping losing child 0x019e5430 PID 23111
make: *** [bindata] Error 127
Removing child 0x019e5430 PID 23111 from chain.

also, make is:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu

Building on OS X

I'm starting to play around with envdb but ran into a couple errors while compiling for OS X 10.10.3.

The main one is that -ldflags "-s" throws a deprecation error:

==> Embedding Assets
==> Building envdb
# _/Users/mojo/scratch/envdb
ld: warning: option -s is obsolete and being ignored

The resulting envdb binary then threw an error when trying to run it:

~/scratch/envdb/bin master! $ ./envdb 
Bus error: 10

Removing the -ldflags from the Makefile worked for me.

A minor error is that the version of grep that OS X ships with doesn't have a Perl regex mode, so the -P throws a usage warning in your grep for Version:

==> Embedding Assets
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
        [-e pattern] [-f file] [--binary-files=value] [--color=when]
        [--context[=num]] [--directories=action] [--label] [--line-buffered]
        [--null] [pattern] [file ...]

Other than that everything is looking good so far -- thanks!

scroll nodes list

First off, envdb is a great idea. Great job.
How do I enable scroll for the nodes list?
The nodes list cuts off at screen size (using Chrome).

can't load package: package _/home/dan/envdb: cannot find package "_/home/dan/envdb" in any of:

$ make
==> Embedding Assets
==> Installing dependencies
can't load package: package _/home/dan/envdb: cannot find package "_/home/dan/envdb" in any of:
    /usr/lib/go/src/pkg/_/home/dan/envdb (from $GOROOT)
    /home/dan/envdb/Godeps/_workspace/src/_/home/dan/envdb (from $GOPATH)
    /home/dan/stuff/src/_/home/dan/envdb
godep: go exit status 1
godep: exit status 1
make: *** [deps] Error 1

$ echo $GOROOT x $GOPATH
x /home/dan/stuff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.