No description
Find a file
Vincent Ambo 79afc5f474 feat(main): Support manually configured resource descriptors
Lets users specify environment variables to configure the monitored
resource descriptor. In combination with service account support this
can be used to configure journaldriver on non-GCP machines.

The supported environment variables are:

* `GOOGLE_CLOUD_PROJECT`: Project ID of the project to which to report
  logs
* `LOG_NAME`: Name of the Stackdriver Logging log into which to write
  entries
2018-06-17 17:43:33 +02:00
src feat(main): Support manually configured resource descriptors 2018-06-17 17:43:33 +02:00
.gitignore feat(journald): Implement initial libsystemd journal calls 2018-05-27 20:09:37 +02:00
.travis.yml feat(build): Enable Nix builds in Travis.CI 2018-06-15 17:00:48 +02:00
build.rs feat(build): Configure linking to libsystemd 2018-05-27 20:09:20 +02:00
Cargo.lock chore(cargo): Add dependency on medallion JWT library 2018-06-17 17:43:33 +02:00
Cargo.toml chore(cargo): Add dependency on medallion JWT library 2018-06-17 17:43:33 +02:00
CODE_OF_CONDUCT.md docs: Add code of conduct 2018-06-15 17:02:04 +02:00
CONTRIBUTING.md docs: Add contribution guidelines 2018-06-15 17:03:38 +02:00
default.nix chore(cargo): Add dependency on medallion JWT library 2018-06-17 17:43:33 +02:00
LICENSE chore: License under GPL 3.0 2018-06-15 17:00:26 +02:00
README.md docs(README): Add usage instructions & other information to README 2018-06-15 16:58:35 +02:00

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

  1. Install journaldriver on the instance from which you wish to forward logs.

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

  3. 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 latest journald cursor position, allowing log reads to resume from the same position where they stopped after a restart
  • journaldriver will attempt to figure out whether logs are in JSON-format and use the coresponding jsonPayload field in Stackdriver Logging to make structured logs easily accessible
  • journaldriver will support deployments on non-GCP machines