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:
@@ -145,7 +145,10 @@ export default class Report {
|
|||||||
|
|
||||||
case "misconfiguration":
|
case "misconfiguration":
|
||||||
context.asn = content.data[0].matchedRule.asn.toString();
|
context.asn = content.data[0].matchedRule.asn.toString();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "rpki":
|
||||||
|
context.asn = content.data[0].matchedRule.asn.toString();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@@ -146,7 +146,7 @@ describe("Composition", function() {
|
|||||||
|
|
||||||
expect(config.monitors[5]).to
|
expect(config.monitors[5]).to
|
||||||
.containSubset({
|
.containSubset({
|
||||||
"channel": "rpki-monitor",
|
"channel": "rpki",
|
||||||
"name": "rpki-monitor",
|
"name": "rpki-monitor",
|
||||||
"params": {
|
"params": {
|
||||||
"thresholdMinPeers": 1,
|
"thresholdMinPeers": 1,
|
||||||
|
@@ -549,7 +549,7 @@ describe("Alerting", function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let rpkiTestCompleted = false;
|
let rpkiTestCompleted = false;
|
||||||
pubSub.subscribe("rpki-monitor", function (type, message) {
|
pubSub.subscribe("rpki", function (type, message) {
|
||||||
|
|
||||||
if (!rpkiTestCompleted) {
|
if (!rpkiTestCompleted) {
|
||||||
message = JSON.parse(JSON.stringify(message));
|
message = JSON.parse(JSON.stringify(message));
|
||||||
|
@@ -38,7 +38,7 @@ monitors:
|
|||||||
thresholdMinPeers: 2
|
thresholdMinPeers: 2
|
||||||
|
|
||||||
- file: monitorRPKI
|
- file: monitorRPKI
|
||||||
channel: rpki-monitor
|
channel: rpki
|
||||||
name: rpki-monitor
|
name: rpki-monitor
|
||||||
params:
|
params:
|
||||||
thresholdMinPeers: 1
|
thresholdMinPeers: 1
|
||||||
@@ -55,7 +55,7 @@ reports:
|
|||||||
- visibility
|
- visibility
|
||||||
- path
|
- path
|
||||||
- misconfiguration
|
- misconfiguration
|
||||||
- rpki-monitor
|
- rpki
|
||||||
params:
|
params:
|
||||||
persistAlertData: false
|
persistAlertData: false
|
||||||
alertDataDirectory: alertdata/
|
alertDataDirectory: alertdata/
|
||||||
|
Reference in New Issue
Block a user