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.5: Minor Journalbeat fixes and additions #9006

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.5 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)
@kvch kvch merged commit e1c3e0e into elastic:6.5 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 9, 2018
@jsoriano
Copy link
Member

@urso I think we should backport the fix for the registry file for 6.6.0 even if it is breaking, if we release a journalbeat docker as of elastic/beats-docker#58 or #9433 and as some people is already requesting, keeping the registry between docker restarts will require additional steps that would need to be documented. I think it'd be better to fix this while it is experimental.

leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
### 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 29eabc8)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
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