remote_syslog2

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2014 License: MIT Imports: 18 Imported by: 0

README

remote_syslog2

Remote_syslog tails one or more log files and sends syslog messages to a remote central syslog server. It generates packets itself, ignoring the system syslog daemon, so its configuration doesn't affect system-wide logging.

Uses:

  • Collecting logs from servers & daemons which don't natively support syslog
  • When reconfiguring the system logger is less convenient than a purpose-built daemon (e.g., automated app deployments)
  • Aggregating files not generated by daemons (e.g., package manager logs)

This code is tested with the hosted log management service Papertrail and should work for transmitting to any syslog server.

Migrating from remote_syslog 1

remote_syslog2 is a rewrite of the ruby remote_syslog package. Not all features of the ruby version are supported, and there are some backwards incompatible changes.

Also, as of this writing, remote_syslog2 is still beta and should not be considered feature complete.

Changes from remote_syslog 1
  • Specifying log files on the command line is not yet supported.
  • The syntax of some command-line arguments have changed slightly, though most are identical.
  • Default hostname has been removed. Either the host config file option or the -d invocation flag are required.

Installing

Precompiled binaries for Mac, Linux and Windows are available on the remote_syslog2 releases page.

Untar the package and copy the "remote_syslog" executable into your $PATH.

Usage

Usage of remote_syslog2:
  -c, --configfile="/etc/log_files.yml": Path to config
      --debug-log-cfg="": the debug log file
  -d, --dest-host="": Destination syslog hostname or IP
  -p, --dest-port=514: Destination syslog port
      --eventmachine-tail=false: No action, provided for backwards compatibility
  -f, --facility="user": Facility
      --hostname="": Local hostname to send from
      --log="<root>=INFO": "logging configuration <root>=INFO;first=TRACE"
      --new-file-check-interval={0}: How often to check for new files
  -D, --no-detach=false: Don't daemonize and detach from the terminal
      --no-eventmachine-tail=false: No action, provided for backwards compatibility
      --pid-file="": Location of the PID file
  -s, --severity="notice": Severity
      --tcp=false: Connect via TCP (no TLS)
      --tls=false: Connect via TCP with TLS

Reporting bugs

  1. See whether the issue has already been reported: https://github.com/papertrail/remote_syslog/issues/
  2. If you don't find one, create an issue with a repro case.

Development

remote_syslog2 is written in go, and uses godep to manage dependencies. To get everything set up, install go then run:

go get github.com/kr/godep
go get github.com/mitchellh/gox
go get github.com/papertrail/remote_syslog2

To run tests:

# run all tests
godep go test ./...
# run all tests except the slower syslog reconnection tests
godep go test -short ./...

Building

make

Contributing

Once you've made your great commits:

  1. Fork remote_syslog
  2. Create a topic branch - git checkout -b my_branch
  3. Commit the changes without changing the Rakefile or other files unrelated to your enhancement.
  4. Push to your branch - git push origin my_branch
  5. Create a Pull Request or an Issue with a link to your branch
  6. That's it!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/VividCortex/godaemon
Package godaemon runs a program as a Unix daemon.
Package godaemon runs a program as a Unix daemon.
_workspace/src/github.com/howbazaar/loggo
Module level logging for Go This package provides an alternative to the standard library log package.
Module level logging for Go This package provides an alternative to the standard library log package.
_workspace/src/github.com/howeyc/fsnotify
Package fsnotify implements filesystem notification.
Package fsnotify implements filesystem notification.
_workspace/src/github.com/ogier/pflag
pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
_workspace/src/launchpad.net/goyaml
Package goyaml implements YAML support for the Go language.
Package goyaml implements YAML support for the Go language.
_workspace/src/launchpad.net/tomb
The tomb package helps with clean goroutine termination.
The tomb package helps with clean goroutine termination.
Package papertrail provides utilities for using syslog with Papertrail
Package papertrail provides utilities for using syslog with Papertrail
The syslog package provides a syslog client.
The syslog package provides a syslog client.

Jump to

Keyboard shortcuts

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