Create README.md

This commit is contained in:
parnic
2018-12-28 09:34:44 -06:00
committed by GitHub
parent b98b107581
commit 1c85a1b8eb

16
README.md Normal file
View File

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