diff --git a/examples/workflows/autosupress.yml b/examples/workflows/autosupress.yml new file mode 100644 index 000000000..d9952098e --- /dev/null +++ b/examples/workflows/autosupress.yml @@ -0,0 +1,16 @@ +workflow: + id: autosupress + description: demonstrates how to automatically suppress alerts + triggers: + - type: alert + filters: + - key: name + value: r"(somename)" + actions: + - name: dismiss-alert + provider: + type: mock + with: + enrich_alert: + - key: dismissed + value: "true" diff --git a/keep/providers/mock_provider/mock_provider.py b/keep/providers/mock_provider/mock_provider.py index 12d207d28..a8af0f945 100644 --- a/keep/providers/mock_provider/mock_provider.py +++ b/keep/providers/mock_provider/mock_provider.py @@ -23,6 +23,14 @@ def _query(self, **kwargs): """ return kwargs.get("command_output") + def _notify(self, **kwargs): + """This is mock provider that just return the command output. + + Returns: + _type_: _description_ + """ + return kwargs + def dispose(self): """ No need to dispose of anything, so just do nothing.