GithubHelp home page GithubHelp logo

journald-wrapper's Introduction

Nuxeo.io systemd journal wrapper to CloudWatch Logs

This repository holds the Dockerfile for our journald wrapper to Amazon CloudWatch Logs.

Notes

This container is designed to be run over a CoreOS system, due to his dependency on Etcd. Etcd is used to hold last logs pushed, stored under /config/journald/{prefix}_{instance_id}/cursor key.

Also, it needs the service systemd-journal-gatewayd.service to be started, that exposes journald logs throught a webpage allowing to use Server-Sent Events.

If you are running this wrapper with an old instance, with lots of existing logs; I strongly recommend you to use the standard gateway web interface to set the last cursor in etcd with a recent log cursor.

Improvements

  • Make the script available as a gem, using a gemfile to install container dependencies.
  • Extract some concepts like; abstract the store used for the last cursor, stack events before sending them to AWS, ...
  • Make it less dependends of an EC2 instance

Mandatory container parameters

  • CURSOR_PATH: the path in which the last cursor is written. Should be also defined as a volume to be saved in the container host.
  • AWS_ACCESS_KEY_ID: AWS access key id used to push logs
  • AWS_SECRET_ACCESS_KEY: AWS access secret
  • AWS_REGION: AWS region
  • PREFIX: a prefix to help you identify your cluster. The log group name will be: PREFIX_INSTANCE-ID.

Running this container

# Ensure to have start `systemd-journal-gatewayd.service` service
sudo systemctl start systemd-journal-gatewayd.service

# build container
docker build -t journald_wrapper .

# run container
docker run -d -v /data/journald:/var/journald -e CURSOR_PATH=/var/journald -e AWS_ACCESS_KEY_ID={YOUR_KEY_ID} -e AWS_SECRET_ACCESS_KEY={YOUR_SECRET} -e AWS_REGION={YOUR_REGION} -e PREFIX={A_PREFIX_IDENTIFIER} journald_wrapper

About Nuxeo

Nuxeo provides a modular, extensible Java-based open source software platform for enterprise content management, and packaged applications for document management, digital asset management and case management.

Designed by developers for developers, the Nuxeo platform offers a modern architecture, a powerful plug-in model and extensive packaging capabilities for building content applications.

More information on: http://www.nuxeo.com/

journald-wrapper's People

Contributors

akervern avatar

Watchers

 avatar  avatar  avatar  avatar

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.