forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize Journalbeat (elastic#8277)
This is the first PR to initialize Journalbeat with minimal functionality. The architecture is mimicing Filebeat so it can be merged into FB in the future. It means it has multiple inputs which can share configuration (`backoff`, `backoff_factor`, etc.). Inputs can have multiple readers, each reader reads from a journal specified in the list of `paths`. The readers are not going to implement the interface `Harverster` until it's merged into Filebeat, because it would overcomplicate event publishing unnecessarily and would need to duplicate too much Filebeat code. Checkpointing is copied from Winlogbeat. Once the new registry file is merged, it will be migrated. Example configuration to read from the beginning of the local journal ```yml journalbeat.inputs: - paths: [] seek: head ``` Features * read from local journal, journal file and directory * position tracking by using check-pointing as it's done in Winlogbeat * seek to "tail", "head", "cursor" * minimal E2E tests * fields.yml and documentation Vendored: * github.com/coreos/go-systemd/sdjournal
- Loading branch information
Showing
51 changed files
with
6,903 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.idea | ||
/build | ||
.DS_Store | ||
.journalbeat_position | ||
/journalbeat | ||
/journalbeat.test | ||
*.pyc | ||
data/meta.json | ||
/*.journal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
BEAT_NAME=journalbeat | ||
BEAT_TITLE=Journalbeat | ||
SYSTEM_TESTS=false | ||
TEST_ENVIRONMENT=false | ||
ES_BEATS?=.. | ||
GOX_FLAGS=-cgo | ||
GOX_OS=linux | ||
|
||
# Path to the libbeat Makefile | ||
-include $(ES_BEATS)/libbeat/scripts/Makefile | ||
|
||
.PHONY: before-build | ||
before-build: | ||
|
||
# Collects all dependencies and then calls update | ||
.PHONY: collect | ||
collect: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Journalbeat | ||
|
||
Journalbeat is an open source data collector to read and forward journal entries from Linuxes with systemd. | ||
|
||
## Getting started |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
###################### Journalbeat Configuration Example ######################### | ||
|
||
# This file is an example configuration file highlighting only the most common | ||
# options. The journalbeat.reference.yml file from the same directory contains all the | ||
# supported options with more comments. You can use it as a reference. | ||
# | ||
# You can find the full configuration reference here: | ||
# https://www.elastic.co/guide/en/beats/journalbeat/index.html | ||
|
||
# For more available modules and options, please see the journalbeat.reference.yml sample | ||
# configuration file. | ||
|
||
#=========================== Journalbeat inputs ============================= | ||
|
||
journalbeat.inputs: | ||
# Paths that should be crawled and fetched. Possible values files and directories. | ||
# When setting a directory, all journals under it are merged. | ||
# When empty starts to read from local journal. | ||
- paths: [] | ||
|
||
# The number of seconds to wait before trying to read again from journals. | ||
#backoff: 1s | ||
# Multiplier of backoff value. | ||
#backoff_factor: 2 | ||
# The maximum number of seconds to wait before attempting to read again from journals. | ||
#max_backoff: 60s | ||
|
||
# Position to start reading from journal. Valid values: head, tail, cursor | ||
seek: tail | ||
|
||
#========================= Journalbeat global options ============================ | ||
#journalbeat: | ||
# Name of the registry file. If a relative path is used, it is considered relative to the | ||
# data path. | ||
#registry_file: registry | ||
|
||
# The number of seconds to wait before trying to read again from journals. | ||
#backoff: 1s | ||
# Multiplier of backoff value. | ||
#backoff_factor: 2 | ||
# The maximum number of seconds to wait before attempting to read again from journals. | ||
#max_backoff: 60s | ||
|
||
# Position to start reading from all journal. Possible values: head, tail, cursor | ||
#seek: head |
Oops, something went wrong.