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

Journald input in Filebeat #7955

Closed
kvch opened this issue Aug 13, 2018 · 17 comments
Closed

Journald input in Filebeat #7955

kvch opened this issue Aug 13, 2018 · 17 comments

Comments

@kvch
Copy link
Contributor

kvch commented Aug 13, 2018

Add new input to Filebeat to collect entries from journald journals. The feature's already been under development. But now it's blocked.

Input files

If paths is empty, the default journal is opened. It's possible to provide directories and single journal files as inputs.

Filtering

It is possible to filter entries at journald level by providing key-value pairs. Thus, Filebeat does not need to filter at all or needs to filter less incoming events. Filter expressions needs to be match exactly the values of fields.

Example configuration

- type: journald
  paths:
    - /dev/log
    - /var/log/messages/my-journal-file
  filters:
    unit: nginx.service
    level: error

Why is it blocked?

The way journald tracks its offsets is not yet supported by Filebeat registry. Handling and saving positions if Filebeat needs a refactoring, so it becomes possible to save journald state info.

@kvch
Copy link
Contributor Author

kvch commented Sep 17, 2018

Journalbeat issue: #8323

@ksemaev
Copy link

ksemaev commented Oct 16, 2018

@kvch the current situation is - we have both systemd and syslog type of logs at the same time on most of operating systems. That is not truely desirable to have two type of beats running on each instance just because of different log types. As I see - journalbeat is like fluentd - it just supports journald logs. Do we have any beat that can handle both systemd and syslog types of logs?

@kvch
Copy link
Contributor Author

kvch commented Oct 17, 2018

Unfortunately, right now there is no Beat which supports both inputs at the same time. However, we are still planning to add journald input to Filebeat. The necessary refactoring are in progress, but we don't know exactly when the new input going to be added.

For users who does not mind running a separate Beat to collect journald entries we would like to provide a new Journalbeat in a future release.

@jain108shubhamtbt
Copy link

hi,

when will we get journald input support in filebeat ? Please update.

@kvch
Copy link
Contributor Author

kvch commented Feb 20, 2019

Unfortunately, there hasn't been any notable updates since my last post. The registry refactoring is still in progress. In the meantime, Journalbeat is being developed, so when the time comes, you are getting a mature input.

@earlpotter0
Copy link

Any update?

@kvch
Copy link
Contributor Author

kvch commented Jun 17, 2019

Unfortunately, there is no update. For future reference, when there is an update with the Journald input, it will be added to this ticket. So if one subscribes, he/she can get notified.

@zgfh
Copy link

zgfh commented Jul 19, 2019

Any update?

@earlpotter0
Copy link

While the above is cool, it would be nice to have an Elastic supported tool.

  1. Journalbeat works but is experimental and not supported by Elastic.
  2. Beats and the ECS make a lot of sense, but having 3 or 4 (File, Metric, Audit, Journal) beats running on a machine starts to chew up a lot of resources. It does make a lot of sense to have these all as a module in one beat that are enabled as needed.

@M0rdecay
Copy link

Any update here?
The need for journald support in Fliebeat is really important right now...

@colttt
Copy link

colttt commented Aug 12, 2021

I guess there is no update(3years later),but as @earlpotter0 said, its annoying to have a lot of beats running on one machine.

@odinho
Copy link

odinho commented Aug 12, 2021

We migrated to Vector, which supports journald, instead.

@morganchristiansson
Copy link

After apt install rsyslogd the expected logfiles are created under /var/log and filebeat ingests them by default and it works with the filebeat system module...

I thought maybe the filebeat syslog input could also work but haven't tried. It wouldn't work with default modules which expect logfiles tho.

@nimarezainia
Copy link
Contributor

Completed in 7.16

@earlpotter0
Copy link

Still experimental, but it's a start!! https://www.elastic.co/guide/en/beats/filebeat/7.16/filebeat-input-journald.html

@morganchristiansson
Copy link

Works for me. This is fantastic work. I can now remove journalbeat and use filebeat only.

Next can the filebeat system module and dashboards work with input type: journald? I've currently installed rsyslogd as workaround which logs to all expected files in /var/log that system module expects. It would be better if journald is used which is default in Ubuntu Server. (Tested on Ubuntu 21.04).

The current system module inputs are hardcoded to input: log:

(this should be it's own issue...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests