Skip to content

Commit

Permalink
Add high severity support
Browse files Browse the repository at this point in the history
  • Loading branch information
karlism committed Jul 6, 2022
1 parent 62be099 commit 1994ebc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/DataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,19 @@ export class AlertmanagerDataSource extends DataSourceApi<CustomQuery, GenericOp
}

parseAlertAttributes(alert: any, fields: any[]): string[] {
let severityValue = 4;
let severityValue = 0;
switch (alert.labels['severity']) {
case 'critical':
severityValue = 1;
severityValue = 4;
break;
case 'high':
severityValue = 3;
break;
case 'warning':
severityValue = 2;
break;
case 'info':
severityValue = 3;
severityValue = 1;
break;
default:
break;
Expand Down

0 comments on commit 1994ebc

Please sign in to comment.