Skip to content

Commit

Permalink
added rpkiMetadata payload to all rpki events
Browse files Browse the repository at this point in the history
  • Loading branch information
massimocandela committed Oct 27, 2023
1 parent 7c9fa6a commit e7f711b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/monitors/monitorRPKI.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default class MonitorRPKI extends Monitor {
const origin = result.origin.getValue();
if (result && !this.rpki.getStatus().stale) {

const rpkiMetadata = this.rpki.getMetadata();

const cacheKey = "a" + [prefix, origin]
.join("-")
.replace(/\./g, "_")
Expand All @@ -123,20 +125,20 @@ export default class MonitorRPKI extends Monitor {
prefix,
matchedRule,
message,
{ covering: null, valid: null, roaDisappeared: true, subType: "rpki-disappear" });
{ rpkiMetadata, covering: null, valid: null, roaDisappeared: true, subType: "rpki-disappear" });
} else if (this.params.checkUncovered) {
this.publishAlert(key,
prefix,
matchedRule,
message,
{ covering: null, valid: null, subType: "rpki-unknown" });
{ rpkiMetadata, covering: null, valid: null, subType: "rpki-unknown" });
}
} else if (result.valid === false) {
this.publishAlert(key,
prefix,
matchedRule,
message,
{ covering: result.covering, valid: false, subType: "rpki-invalid" });
{ rpkiMetadata, covering: result.covering, valid: false, subType: "rpki-invalid" });

} else if (result.valid) {

Expand Down

0 comments on commit e7f711b

Please sign in to comment.