37 lines
830 B
Nix
37 lines
830 B
Nix
|
# filters gogs messages
|
||
|
{
|
||
|
resource."graylog_pipeline_rule" = {
|
||
|
|
||
|
routeToGogsMessage = {
|
||
|
|
||
|
description = "route gogs messages to gogs stream (TF)";
|
||
|
source = ''
|
||
|
rule "route gogs message"
|
||
|
when
|
||
|
to_string($message.facility) == "gogs"
|
||
|
then
|
||
|
route_to_stream(id:"''${ graylog_stream.gogs.id }", remove_from_default: true);
|
||
|
end
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
};
|
||
|
|
||
|
graylog.all_messages.rules = ["route gogs message"];
|
||
|
|
||
|
graylog.stream.gogs = {
|
||
|
index_set_id = "\${data.graylog_index_set.default.id}";
|
||
|
#pipelines = [ "\${graylog_pipeline.processGogsMessage.id}" ];
|
||
|
};
|
||
|
|
||
|
#graylog.pipeline.processGogsMessage = {
|
||
|
# source = ''
|
||
|
# stage 0 match all
|
||
|
# rule "extract firewall deny";
|
||
|
# '';
|
||
|
# description = "process messages of the gogs stream(TF)";
|
||
|
#};
|
||
|
|
||
|
|
||
|
}
|