Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #8973 to 6.x: Minor Journalbeat fixes and additions #9007

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Nov 9, 2018

Cherry-pick of PR #8973 to 6.x branch. Original message:

Refactoring of option seek

Previously, the option was string, so deciding which seeker function has to be called used string comparisons. I added SeekMode so the mode can be an iota and provided its own Unpack function. This also takes care of validating the user configured value.

Field renaming

I renamed custom.* prefix to journald.custom.*, so users know where those custom fields are coming from.

Dashboard

It is a minimal dashboard with a few predefined searches. When modules are available to parse messages coming from journald, it is going to be possible create prettier visualizations.

journalbeat-dashboard

Skip last event when seek is set to tail

Previously, if seek was set to tail, the last event in the journal was read. Now this last event is skipped to avoid duplication.

Unstoppable Journalbeat (haha)

If the output was unreachable Journalbeat got stuck when it retried to connect to the output. As the Beat never stops trying, it never returned from the last client.Publish call. Thus, publishAll function never stopped, because it never received any signal from the done channel of the input.
The client of each input is closed during Stop of each input.

Registry file path

Previously, Journalbeat put its registry file under /registry when installed from deb package. From now the registry file resides under the folder specified by -path.data.

### Refactoring of option `seek`

Previously, the option was string, so deciding which seeker function has to be called used string comparisons. I added `SeekMode` so the mode can be an `iota` and provided its own `Unpack` function. This also takes care of validating the user configured value.

### Field renaming

I renamed `custom.*` prefix to `journald.custom.*`, so users know where those custom fields are coming from.

### Dashboard

It is a minimal dashboard with a few predefined searches. When modules are available to parse messages coming from journald, it is going to be possible create prettier visualizations.

### Skip last event when `seek` is set to `tail`

Previously, if `seek` was set to `tail`, the last event in the journal was read. Now this last event is skipped to avoid duplication.

### Unstoppable Journalbeat (haha)

If the output was unreachable Journalbeat got stuck when it retried to connect to the output. As the Beat never stops trying, it never returned from the last `client.Publish` call. Thus, `publishAll` function never stopped, because it never received any signal from the `done` channel of the input.
The client of each input is closed during `Stop` of each input.

### Registry file path

Previously, Journalbeat put its registry file under `/registry` when installed from deb package. From now the registry file resides under the folder specified  by `-path.data`.
(cherry picked from commit 7fee516)
@@ -87,6 +88,8 @@ func NewCheckpoint(file string, maxUpdates int, interval time.Duration) (*Checkp
save: make(chan JournalState, 1),
}

c.file = paths.Resolve(paths.Data, c.file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have been set directly on c initialization.

@kvch kvch merged commit 7c6081d into elastic:6.x Nov 9, 2018
kvch added a commit to kvch/beats that referenced this pull request Nov 9, 2018
kvch added a commit that referenced this pull request Nov 28, 2018
…9275)

* Revert "Minor Journalbeat fixes and additions (#8973) (#9007)"

This reverts commit 7c6081d.

* Add missing journalbeat non breaking fixes (#9106)

Backported from master:

* refactoring of `SeekMode`
* journalbeat can be stopped when no output is available
* add dashboard

++ add deprecation warnings for options I want to remove in 7.0
(cherry picked from commit f7638a5)
DStape pushed a commit to DStape/beats that referenced this pull request Aug 20, 2019
### Refactoring of option `seek`

Previously, the option was string, so deciding which seeker function has to be called used string comparisons. I added `SeekMode` so the mode can be an `iota` and provided its own `Unpack` function. This also takes care of validating the user configured value.

### Field renaming

I renamed `custom.*` prefix to `journald.custom.*`, so users know where those custom fields are coming from.

### Dashboard

It is a minimal dashboard with a few predefined searches. When modules are available to parse messages coming from journald, it is going to be possible create prettier visualizations.

### Skip last event when `seek` is set to `tail`

Previously, if `seek` was set to `tail`, the last event in the journal was read. Now this last event is skipped to avoid duplication.

### Unstoppable Journalbeat (haha)

If the output was unreachable Journalbeat got stuck when it retried to connect to the output. As the Beat never stops trying, it never returned from the last `client.Publish` call. Thus, `publishAll` function never stopped, because it never received any signal from the `done` channel of the input.
The client of each input is closed during `Stop` of each input.

### Registry file path

Previously, Journalbeat put its registry file under `/registry` when installed from deb package. From now the registry file resides under the folder specified  by `-path.data`.
(cherry picked from commit 7fee516)
DStape pushed a commit to DStape/beats that referenced this pull request Aug 20, 2019
… fixes (elastic#9275)

* Revert "Minor Journalbeat fixes and additions (elastic#8973) (elastic#9007)"

This reverts commit 7c6081d.

* Add missing journalbeat non breaking fixes (elastic#9106)

Backported from master:

* refactoring of `SeekMode`
* journalbeat can be stopped when no output is available
* add dashboard

++ add deprecation warnings for options I want to remove in 7.0
(cherry picked from commit f7638a5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants