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

rename checkOnlyAsns to checkOnlyASns for consistency

This commit is contained in:
Massimo Candela
2021-06-05 01:55:25 +02:00
parent 2faadc3458
commit e01a570ba4
4 changed files with 7 additions and 7 deletions

View File

@@ -62,7 +62,7 @@ monitors:
enableExpirationCheckTA: true
enableDeletedCheckTA: true
roaExpirationAlertHours: 2
checkOnlyAsns: false
checkOnlyASns: true
toleranceDeletedRoasTA: 20
toleranceExpiredRoasTA: 20

View File

@@ -367,7 +367,7 @@ Note, while BGPalerter will perform the check near real time, many RIRs have del
**Important 1:** for a complete monitoring, configure also the `monitorASns` section. Setting only prefix matching rules is not sufficient: prefix matching rules are based on the longest prefix match, less specific ROAs impacting the prefix will NOT be matched. On the other side, setting only the `monitorASns` section is instead perfectly fine for ROA monitoring purposes.
**Important 2:** prefix matching rules have always priorities on `monitorASns` rules. If an alert matches both a prefix rule and an AS rule, it will be sent only to the prefix rule, except if the `checkOnlyAsns` params is set to true (see parameters below). In the example above, a ROA change impacting `1.2.3.4/24` is only sent to the user group `noc1` and not to `noc2`; whatever other ROA change impacting a prefix not in the list (no prefix matching rule) will be sent to `noc2` instead.
**Important 2:** prefix matching rules have always priorities on `monitorASns` rules. If an alert matches both a prefix rule and an AS rule, it will be sent only to the prefix rule, except if the `checkOnlyASns` params is set to true (see parameters below). In the example above, a ROA change impacting `1.2.3.4/24` is only sent to the user group `noc1` and not to `noc2`; whatever other ROA change impacting a prefix not in the list (no prefix matching rule) will be sent to `noc2` instead.
**Important 3:** alerts about the generic health status of TAs are generated according to the provided VRP file. This types of alerts are not necessarily related to the monitored resources and they are send to the `default` user group.
@@ -403,7 +403,7 @@ Parameters for this monitor module:
|enableExpirationCheckTA| Enables alerts about TA malfunctions detected when too many ROAs expire in the same TA. Default true.|
|enableDeletedCheckTA| Enables alerts about TA malfunctions detected when too many ROAs are deleted in the same TA. Default true.|
|roaExpirationAlertHours| If a ROA is expiring in less than this amount of hours, an alert will be triggered. The default is 2 hours. I strongly suggest to keep this value, ROAs are almost expiring every day, read above what this expiration time means. |
|checkOnlyAsns| If set to true (default false), ROAs diff alerts will be generated based only on the ASns contained in the `monitorASns` of `prefixes.yml`. This means that no ROA diffs will be matched against prefix matching rules (see example above). |
|checkOnlyASns| If set to true (default), ROAs diff alerts will be generated based only on the ASns contained in the `monitorASns` of `prefixes.yml`. This means that no ROA diffs will be matched against prefix matching rules (see example above). If you are monitoring the origin AS of your prefixes, leave this option to true to avoid noise.|
|toleranceExpiredRoasTA|The percentage of expiring ROAs in a single TA tolerated before triggering a TA malfunction alert. Default 20.|
|toleranceDeletedRoasTA|The percentage of deleted ROAs in a single TA tolerated before triggering a TA malfunction alert. Default 20.|

View File

@@ -89,7 +89,7 @@ export default class Config {
enableExpirationCheckTA: true,
enableDeletedCheckTA: true,
roaExpirationAlertHours: 2,
checkOnlyAsns: false,
checkOnlyASns: true,
toleranceDeletedRoasTA: 20,
toleranceExpiredRoasTA: 20
}

View File

@@ -20,7 +20,7 @@ export default class MonitorROAS extends Monitor {
// Default parameters
this.roaExpirationAlertHours = params.roaExpirationAlertHours || 2;
this.checkOnlyAsns = params.checkOnlyAsns || false;
this.checkOnlyASns = params.checkOnlyASns || true;
this.toleranceExpiredRoasTA = params.toleranceExpiredRoasTA || 20;
this.toleranceDeletedRoasTA = params.toleranceDeletedRoasTA || 20;
this.timesExpirationTAs = {};
@@ -111,7 +111,7 @@ export default class MonitorROAS extends Monitor {
let alerts = [];
if (relevantVrps.length) {
if (!this.checkOnlyAsns) {
if (!this.checkOnlyASns) {
alerts = this._checkExpirationPrefixes(relevantVrps);
}
for (let asn of asnsIn) {
@@ -183,7 +183,7 @@ export default class MonitorROAS extends Monitor {
const prefixesIn = this.monitored.prefixes.map(i => i.prefix);
const asns = this.monitored.asns.map(i => i.asn.getValue());
let alerts = [];
if (!this.checkOnlyAsns){
if (!this.checkOnlyASns){
alerts = this._diffVrpsPrefixes(this._oldVrps, newVrps, prefixesIn);
}
for (let asn of asns) {