1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

fix reporting undefined

This commit is contained in:
Massimo Candela
2020-04-28 22:36:16 +02:00
parent a068f4c83b
commit f9595fb872
4 changed files with 7 additions and 4 deletions

View File

@@ -145,7 +145,10 @@ export default class Report {
case "misconfiguration":
context.asn = content.data[0].matchedRule.asn.toString();
break;
case "rpki":
context.asn = content.data[0].matchedRule.asn.toString();
break;
default:

View File

@@ -146,7 +146,7 @@ describe("Composition", function() {
expect(config.monitors[5]).to
.containSubset({
"channel": "rpki-monitor",
"channel": "rpki",
"name": "rpki-monitor",
"params": {
"thresholdMinPeers": 1,

View File

@@ -549,7 +549,7 @@ describe("Alerting", function () {
};
let rpkiTestCompleted = false;
pubSub.subscribe("rpki-monitor", function (type, message) {
pubSub.subscribe("rpki", function (type, message) {
if (!rpkiTestCompleted) {
message = JSON.parse(JSON.stringify(message));

View File

@@ -38,7 +38,7 @@ monitors:
thresholdMinPeers: 2
- file: monitorRPKI
channel: rpki-monitor
channel: rpki
name: rpki-monitor
params:
thresholdMinPeers: 1
@@ -55,7 +55,7 @@ reports:
- visibility
- path
- misconfiguration
- rpki-monitor
- rpki
params:
persistAlertData: false
alertDataDirectory: alertdata/