Example Configuration

This is an example of parser code which copies events from one repository to another.

logscale
copyEvent("cloned_event") | case { #type="cloned_event" | repo := "target-repo-name"; * }

In this example this snippet achieves the following: copyEvent("cloned-event") creates a copy of the event, where the #type="cloned_event" field is set. So after the copyEvent call, we now have two events flowing through the parser, one where #type = "cloned_event", and one without that field. We then use the case construct to direct the two events to different targets.