graylog : fixing journald
This commit is contained in:
parent
8627dac495
commit
d50c7cf461
3 changed files with 1 additions and 22 deletions
|
@ -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 = {
|
||||||
|
|
|
@ -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.
Loading…
Reference in a new issue