Skip to content

Commit

Permalink
feat: add escalation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sbgap committed Oct 23, 2023
1 parent 0e4fc33 commit 4ef207d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alertaclient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ def housekeeping(self, expired_delete_hours=None, info_delete_hours=None):
if response.status_code != 200:
raise UnknownError(response.text)

def escalate(self):
self.http.session.get('escalate', auth=self.http.auth)


class ApiKeyAuth(AuthBase):

Expand Down
9 changes: 9 additions & 0 deletions alertaclient/commands/cmd_escalate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import click


@click.command('escalate', short_help='Escalate alerts using escaltion rules')
@click.pass_obj
def cli(obj):
"""Trigger escalation of alerts"""
client = obj['client']
client.escalate()

0 comments on commit 4ef207d

Please sign in to comment.