brexhq / substation

Substation is a toolkit for routing, normalizing, and enriching security event and audit logs.
https://substation.readme.io
MIT License
330 stars 21 forks source link

feat(CLI): adds force-sink flag #84

Closed shellcromancer closed 1 year ago

shellcromancer commented 1 year ago

Description

This adds a -force-sink flag to the development app to mutate the Sink configuration to a user overridden value. This currently only supports the standard output sink but can be extended to override HTTP, S3 or any sink.

Motivation and Context

When iterating on Substation configs and checking output for pipelines typically destined to a remote output a developer needs to edit the configuration's sink to check results. This change often meant for local testing is an error prone chore which can be automated for this use case via the new -force-sink stdout flag for the development app.

How Has This Been Tested?

I've been using this locally for a few months to save some config while testing.

$ substation -h
...
  -force-sink string
        force sink output to value (supported: stdout)
...
$ substation -force-sink stdout ...

Types of changes

Checklist: