graylog : fixing journald

This commit is contained in:
Ingolf Wagner 2021-07-16 06:36:04 +02:00
parent 8627dac495
commit d50c7cf461
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 1 additions and 22 deletions

View file

@ -5,19 +5,6 @@ with builtins; {
resource = { resource = {
graylog_input = { graylog_input = {
journald = {
title = "Journald Logs";
# https://javadoc.io/doc/org.graylog2/graylog2-inputs/latest/index.html
type = "org.graylog2.inputs.gelf.udp.GELFUDPInput";
global = true;
attributes = toJSON ({
bind_address = "0.0.0.0";
decompress_size_limit = 8388608;
number_worker_threads = 4;
port = 11201;
recv_buffer_size = 262144;
});
};
journalbeat = { journalbeat = {
title = "Journalbeat Logs"; title = "Journalbeat Logs";
# https://javadoc.io/doc/org.graylog2/graylog2-inputs/latest/index.html # https://javadoc.io/doc/org.graylog2/graylog2-inputs/latest/index.html
@ -40,14 +27,6 @@ with builtins; {
}; };
}; };
graylog_input_static_fields.journald = {
input_id = "\${graylog_input.journald.id}";
fields = {
from_journald = true;
systemdjournal2gelf = true;
};
};
graylog_input_static_fields.journalbeat = { graylog_input_static_fields.journalbeat = {
input_id = "\${graylog_input.journalbeat.id}"; input_id = "\${graylog_input.journalbeat.id}";
fields = { fields = {

View file

@ -21,7 +21,7 @@ with builtins; {
nextcloudLevel1.source = '' nextcloudLevel1.source = ''
rule "nextcloud : parse level 1" rule "nextcloud : parse level 1"
when when
has_field("Systemd_unit") && $message.Systemd_unit == "phpfpm-nextcloud.service" has_field("systemd_unit") && $message.systemd_unit == "phpfpm-nextcloud.service"
then then
let parsedJson = parse_json(to_string($message.message)); let parsedJson = parse_json(to_string($message.message));
set_fields(to_map(parsedJson),"nextcloud_"); set_fields(to_map(parsedJson),"nextcloud_");

Binary file not shown.