class Annotations {
description: string;
- summary: string;
}
class CommonAlertmanagerAlert {
status: 'resolved' | 'unprocessed' | 'active' | 'suppressed';
name: string;
url: string;
- summary: string;
+ description: string;
fingerprint?: string | boolean;
}
{
status: 'active',
name: 'Something',
- summary: 'Something is active',
+ description: 'Something is active',
url: 'http://Something',
fingerprint: 'Something'
} as PrometheusCustomAlert
fingerprint: false,
status: 'active',
name: 'Something',
- summary: 'Something is firing',
+ description: 'Something is firing',
url: 'http://Something'
} as PrometheusCustomAlert
]);
const alert: PrometheusCustomAlert = {
status: 'active',
name: 'Some alert',
- summary: 'Some alert is active',
+ description: 'Some alert is active',
url: 'http://some-alert',
fingerprint: '42'
};
: this.getPrometheusNotificationStatus(alert as AlertmanagerNotificationAlert),
name: alert.labels.alertname,
url: alert.generatorURL,
- summary: alert.annotations.summary,
+ description: alert.annotations.description,
fingerprint: _.isObject(alert.status) && (alert as AlertmanagerAlert).fingerprint
};
}),
return new CdNotificationConfig(
this.formatType(alert.status),
`${alert.name} (${alert.status})`,
- this.appendSourceLink(alert, alert.summary),
+ this.appendSourceLink(alert, alert.description),
undefined,
'Prometheus'
);
severity: 'someSeverity'
},
annotations: {
- summary: `${name} is ${state}`
+ description: `${name} is ${state}`
},
generatorURL: `http://${name}`,
startsAt: new Date(new Date('2022-02-22').getTime() * timeMultiplier).toString()
alertname: name
},
annotations: {
- summary: `${name} is ${status}`
+ description: `${name} is ${status}`
},
generatorURL: `http://${name}`
} as AlertmanagerNotificationAlert;