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

introduced disableCanary parameter in ConnectorRIS

This commit is contained in:
Massimo Candela
2022-01-12 14:06:34 +01:00
parent fe670451bc
commit 887bb2b3b8
2 changed files with 7 additions and 2 deletions

View File

@@ -131,6 +131,7 @@ Parameters for this connector module:
|subscription| Dictionary containing the parameters required by RIS. Refer to the [official documentation](https://ris-live.ripe.net/) for details.|
|carefulSubscription| If this parameter is set to true (default), the RIS server will stream only the data related to our prefix. This is an advanced parameter useful only for research purposes. |
|perMessageDeflate| Enable gzip compression on the connection. |
|disableCanary| ConnectorRIS automatically receives BGP announcements about [RIS beacons](https://www.ripe.net/analyse/internet-measurements/routing-information-service-ris/current-ris-routing-beacons). RIS beacons are prefixes periodically announced and withdrawn for research purposes. BGPalerter uses these beacons to detect faulty data streams. By setting this parameter to true, you will disable such a check.|
#### connectorRISDump
It connects to the RIPEstat's BGPlay API and retrieves a RIS dump about the monitored resources. The retrieved dump is 2 hours old, due to limitations on the API side.

View File

@@ -57,11 +57,15 @@ export default class ConnectorRIS extends Connector {
}
});
if (this.environment !== "research") { // The canary feature may impact performance if you are planning to get all the possible updates of RIS
if (this._shouldCanaryMonitoringStart()) { // The canary feature may impact performance if you are planning to get all the possible updates of RIS
this._startCanaryInterval = setInterval(this._startCanary, 60000);
}
};
_shouldCanaryMonitoringStart = () => {
return this.environment !== "research" && !this.params.disableCanary;
};
_openConnect = (resolve, data) => {
resolve(true);
this._connect(`${this.name} connector connected (instance:${this.instanceId} connection:${data.connection})`);
@@ -72,7 +76,7 @@ export default class ConnectorRIS extends Connector {
_messageToJson = (message) => {
const messageObj = JSON.parse(message);
if (this.environment !== "research") {
if (this._shouldCanaryMonitoringStart()) {
this._checkCanary();
}
this._message(messageObj);