35 lines
808 B
Nix
35 lines
808 B
Nix
with builtins; {
|
|
|
|
resource = {
|
|
|
|
graylog_pipeline_connection = {
|
|
nextcloud = {
|
|
stream_id = "\${graylog_stream.journald.id}";
|
|
pipeline_ids = [ "\${graylog_pipeline.nextcloud.id}" ];
|
|
};
|
|
};
|
|
|
|
graylog_pipeline = {
|
|
nextcloud.source = ''
|
|
pipeline "nextcloud : parsing"
|
|
stage 10 match either
|
|
rule "nextcloud : parse level 1"
|
|
end
|
|
'';
|
|
};
|
|
|
|
graylog_pipeline_rule = {
|
|
nextcloudLevel1.source = ''
|
|
rule "nextcloud : parse level 1"
|
|
when
|
|
has_field("Systemd_unit") && $message.Systemd_unit == "phpfpm-nextcloud.service"
|
|
then
|
|
let parsedJson = parse_json(to_string($message.message));
|
|
set_fields(to_map(parsedJson),"nextcloud_");
|
|
end
|
|
'';
|
|
};
|
|
|
|
};
|
|
}
|