Last active
June 4, 2018 20:42
-
-
Save uzyexe/c634a62c8e4f91d833ba to your computer and use it in GitHub Desktop.
systemd: Sending your CoreOS data to Logentries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=logentires.service | |
[Service] | |
Environment=ACCESS_TOKEN=YOUR_LOGENTRIES_ACCESS_TOKEN | |
ExecStart=/bin/sh -c 'journalctl -o short -f | sed \"s/^/${ACCESS_TOKEN} \\0/g\" | ncat data.logentries.com 10000' |
Elegant. Thanks for sharing. I made a fork with a couple improvements.
- SSL is used to encrypt the communication
- Including "-o short" is not necessary, it is the default format.
- Service name updated to be more descriptive.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice solution, thanks!