src | ||
.gitignore | ||
.travis.yml | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
default.nix | ||
LICENSE | ||
README.md |
journaldriver
This is a small daemon used to forward logs from journald
(systemd's
logging service) to Stackdriver Logging.
Most existing log services are written in inefficient dynamic languages with error-prone "cover every use-case" configuration. This tool aims to fit a specific use-case very well, instead of covering every possible logging setup.
In the initial version journaldriver
will only work if deployed
directly to a Google Compute Engine instance and will use the
metadata server to figure out credentials and instance
identification.
Usage
-
Install
journaldriver
on the instance from which you wish to forward logs. -
Ensure that the instance has the appropriate permissions to write to Stackdriver. Google continously changes how IAM is implemented on GCP, so you will have to refer to Google's documentation.
By default instances have the required permissions if Stackdriver Logging support is enabled in the project.
-
Start Stackdriver, for example via
systemd
.
Upcoming features:
journaldriver
will be added to nixpkgs with a complementary NixOS module for easy configuration.journaldriver
will persist the latestjournald
cursor position, allowing log reads to resume from the same position where they stopped after a restartjournaldriver
will attempt to figure out whether logs are in JSON-format and use the corespondingjsonPayload
field in Stackdriver Logging to make structured logs easily accessiblejournaldriver
will support deployments on non-GCP machines