All Projects → nanopack → Logvac

nanopack / Logvac

Licence: mit
Simple, lightweight, api-driven log aggregation service with realtime push capabilities and historical persistence.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Logvac

Grpcc
A gRPC cli interface for easy testing against gRPC servers
Stars: ✭ 1,078 (+1667.21%)
Mutual labels:  devops, developer-tools, devtools
Kail
kubernetes log viewer
Stars: ✭ 1,259 (+1963.93%)
Mutual labels:  logging, logs, devtools
Shaman
Small, lightweight, api-driven dns server.
Stars: ✭ 426 (+598.36%)
Mutual labels:  devops, developer-tools, devtools
Kubefwd
Bulk port forwarding Kubernetes services for local development.
Stars: ✭ 2,713 (+4347.54%)
Mutual labels:  devops, developer-tools, devtools
Shon
A simple tool to convert json or yaml into a shell-compliant data structure.
Stars: ✭ 47 (-22.95%)
Mutual labels:  devops, developer-tools, devtools
Pulse
Dynamic, api-driven stats collector service for realtime stats publishing and historical aggregation with Influxdb.
Stars: ✭ 48 (-21.31%)
Mutual labels:  devops, developer-tools, devtools
Hoarder
A simple, api-driven storage system for storing code builds and cached libraries for cloud-based deployment services.
Stars: ✭ 91 (+49.18%)
Mutual labels:  devops, developer-tools, devtools
narc
Small utility to watch log files and ship to syslog service.
Stars: ✭ 18 (-70.49%)
Mutual labels:  devtools, logs, developer-tools
Stern
⎈ Multi pod and container log tailing for Kubernetes -- Friendly fork of https://github.com/wercker/stern
Stars: ✭ 268 (+339.34%)
Mutual labels:  devops, logging, logs
Log Viewer
Web UI to viewing logs
Stars: ✭ 59 (-3.28%)
Mutual labels:  logging, developer-tools
Stern
⎈ Multi pod and container log tailing for Kubernetes
Stars: ✭ 5,614 (+9103.28%)
Mutual labels:  devops, logging
Mist
A distributed, tag-based pub-sub service for modern web applications and container-driven cloud.
Stars: ✭ 634 (+939.34%)
Mutual labels:  developer-tools, devtools
Terragrunt
Terragrunt is a thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules.
Stars: ✭ 5,446 (+8827.87%)
Mutual labels:  devops, developer-tools
Cabin
🌲 Cabin is the best JavaScript and Node.js logging service and logging npm package
Stars: ✭ 622 (+919.67%)
Mutual labels:  logging, logs
Clockwork Chrome
Clockwork - php dev tools integrated to your browser - Chrome extension
Stars: ✭ 415 (+580.33%)
Mutual labels:  logging, devtools
Wappalyzer
Identify technology on websites.
Stars: ✭ 7,245 (+11777.05%)
Mutual labels:  developer-tools, devtools
Gollum
An n:m message multiplexer written in Go
Stars: ✭ 883 (+1347.54%)
Mutual labels:  logging, logs
Re Frisk
Take full control of re-frame app
Stars: ✭ 396 (+549.18%)
Mutual labels:  developer-tools, devtools
Logbook
An extensible Java library for HTTP request and response logging
Stars: ✭ 822 (+1247.54%)
Mutual labels:  logging, logs
Cartus
A structured logging abstraction with multiple backends.
Stars: ✭ 21 (-65.57%)
Mutual labels:  logging, logs

Logvac

GoDoc

Simple, lightweight, api-driven log aggregation service with realtime push capabilities and historical persistence.

Quickstart

# start server (may require commented flags)
logvac -s # -A /tmp/auth.db -d /tmp/logvac.db -u 127.0.0.1:6361

# add auth token (using default 'auth-address')
logvac add-token -t TOKEN

# add a log via http
curl -k https://127.0.0.1:6360/logs -H "X-USER-TOKEN: TOKEN" \
     -d '{"id":"log-test", "type":"log", "message":"my first log"}'

# view log via http
curl -k "https://127.0.0.1:6360/logs?type=log&auth=TOKEN"

# Congratulations logmaster!

Gotchas

  • If you're seeing any of the following errors, run logvac with admin or sudo privileges (or adjust your configuration):

    • Authenticator failed to initialize - open /var/db/log-auth.bolt: permission denied
    • Collector failed to initialize - listen udp 127.0.0.1:514: bind: permission denied
  • If logvac doesn't seem to be doing anything (adding/fecthing logs), there is a chance you've started the server with authentication (the default) but have forgotten to add a token: logvac add-token -t TOKEN

  • If your logs aren't showing up where you think they should, try checking the 'app' type and see if they are there. By default logvac will log to type=app (unless changed via config options). If you have a malformed entry (even with a type specified) it will end up there: curl -k "https://127.0.0.1:6360?type=app&auth=TOKEN"

Usage

  logvac [flags]
  logvac [command]

Available Commands:

  add-token   Add http publish/subscribe authentication token
  export      Export http publish/subscribe authentication tokens
  import      Import http publish/subscribe authentication tokens

Flags:

  -A, --auth-address string   Address or file location of authentication db. ('boltdb:///var/db/logvac.bolt' or 'postgresql://127.0.0.1') (default "boltdb:///var/db/log-auth.bolt")
  -c, --config-file string    config file location for server
  -C, --cors-allow string     Sets the 'Access-Control-Allow-Origin' header (default "*")
  -d, --db-address string     Log storage address (default "boltdb:///var/db/logvac.bolt")
  -i, --insecure              Don't use TLS (used for testing)
  -a, --listen-http string    API listen address (same endpoint for http log collection) (default "127.0.0.1:6360")
  -t, --listen-tcp string     TCP log collection endpoint (default "127.0.0.1:6361")
  -u, --listen-udp string     UDP log collection endpoint (default "127.0.0.1:514")
  -k, --log-keep string       Age or number of logs to keep per type '{"app":"2w", "deploy": 10}'' (int or X(m)in, (h)our,  (d)ay, (w)eek, (y)ear) (default "{\"app\":\"2w\"}")
  -l, --log-level string      Level at which to log (default "info")
  -L, --log-type string       Default type to apply to incoming logs (commonly used: app|deploy) (default "app")
  -p, --pub-address string    Log publisher (mist) address ("mist://127.0.0.1:1445")
  -P, --pub-auth string       Log publisher (mist) auth token
  -s, --server                Run as server
  -T, --token string          Administrative token to add/remove 'X-USER-TOKEN's used to pub/sub via http (default "secret")
  -v, --version               Print version info and exit

Config File: (takes precedence over cli flags)

// logvac.json
{
  "listen-http": "127.0.0.1:6360",
  "listen-udp": "127.0.0.1:514",
  "listen-tcp": "127.0.0.1:6361",
  "pub-address": "",
  "pub-auth": "",
  "db-address": "boltdb:///var/db/logvac.bolt",
  "auth-address": "boltdb:///var/db/log-auth.bolt",
  "cors-allow": "*",
  "log-keep": "{\"app\":\"2w\"}",
  "log-type": "app",
  "log-level": "info",
  "token": "secret",
  "insecure": false,
  "server": true
}

As a Server

logvac -c logvac.json
## OR (uses defaults seen in config file)
logvac -s

Cli uses

export|import

# logvac export dumps the authenticator's database for importing to another authenticator database
logvac export | logvac import -A '/tmp/copy-log-auth.bolt'
## OR
# works with files too
logvac export -f log-auth.dump

add-token

# unless the end user sets auth-address to "", an auth-token will need to be added in order to publish/fetch logs via http
logvac add-token -t "user1-token"
## if you specified a different auth-address for your server, specify it here as such:
logvac add-token -t "user1-token" -A "boltdb:///tmp/log-auth.bolt"

Adding|Viewing Logs

See syslog examples here
See http examples here
Important Note: javascript clients may see up-to a ~100 nanosecond variance when specifying 'start=xxx' as a query parameter due to javascript's lack of precision for the 'number' datatype

Todo

  • Negate tag (msg.Tag != tag) in drain.Slice if tag[0] == "!"
  • Cleanup postgres authenticator db
  • Allow multiple filters (id=web.dashboard&id=data.redis)

Contributing

Contributions to the logvac project are welcome and encouraged. Logvac is a Nanobox project and contributions should follow the Nanobox Contribution Process & Guidelines.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].