From 1c85a1b8eb7d7bad1d46d1b90bd80b8ecdbb22f2 Mon Sep 17 00:00:00 2001 From: parnic Date: Fri, 28 Dec 2018 09:34:44 -0600 Subject: [PATCH] Create README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f08301 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# go-journald-monitor + +Runs journalctl and prints any lines that have appeared since the last time the program was run to stdout. The log cursor is saved in a file named lastCursor (or lastCursor-unit if run for a specific unit). If the program is being run for the first time (that is, with no known last cursor position), no output is printed and the cursor position is saved. + +## Arguments + +-unit [unit name] +This filters output to one specific systemd service. + +## Restrictions + +Since the program simply calls the 'journalctl' process, 'journalctl' must be installed and usable (in the path) on the host. + +## Usage + +Set this in a cron job to be automatically notified via email when a service prints any log output.