nixos-config/terranix/graylog/config/gogs.nix
Ingolf Wagner 54bab918d7
init
2019-10-24 02:24:33 +02:00

36 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)";
#};
}