mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
log when a vrp file is marked as stale
This commit is contained in:
@@ -300,7 +300,23 @@ export default class RpkiUtils {
|
|||||||
if (!!this.params.preCacheROAs) {
|
if (!!this.params.preCacheROAs) {
|
||||||
const digest = md5(JSON.stringify(this.getVRPs()));
|
const digest = md5(JSON.stringify(this.getVRPs()));
|
||||||
if (this.oldDigest) {
|
if (this.oldDigest) {
|
||||||
this.status.stale = this.oldDigest === digest;
|
const stale = this.oldDigest === digest;
|
||||||
|
|
||||||
|
if (this.status.stale !== stale) {
|
||||||
|
if (stale) {
|
||||||
|
this.logger.log({
|
||||||
|
level: 'error',
|
||||||
|
message: "The VRP file is stale"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.logger.log({
|
||||||
|
level: 'info',
|
||||||
|
message: "The VRP file is back to normal"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.status.stale = stale;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.oldDigest = digest;
|
this.oldDigest = digest;
|
||||||
|
Reference in New Issue
Block a user