Skip to content

Commit

Permalink
chore: add ilert example
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Jan 7, 2024
1 parent ab77249 commit 28c3dd1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions examples/workflows/ilert-incident-upon-alert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
id: aad72d69-92b9-4e21-8f67-97d2a69bf8ac
description: Create ILert incident upon Keep Alert
triggers:
- filters:
- key: source
value: keep
type: alert
owners: []
services: []
steps: []
actions:
- name: ilert-action
provider:
config: '{{ providers.ilert-default }}'
type: ilert
with:
affectedServices:
- impact: OPERATIONAL
service:
id: 339743
message: A mock incident created with Keep!
status: INVESTIGATING
summary: Keep Incident {{ alert.name }}
4 changes: 2 additions & 2 deletions keep/providers/ilert_provider/ilert_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def validate_scopes(self):
self.logger.info("Scopes validated", extra=scopes)
return scopes

def _query(
def _notify(
self,
summary: str,
status: IlertIncidentStatus = IlertIncidentStatus.INVESTIGATING,
message: str = "",
affectedServices: str = "[]",
affectedServices: str | list = "[]",
id: str = "0",
**kwargs: dict,
):
Expand Down

0 comments on commit 28c3dd1

Please sign in to comment.