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

renamed main branch references

This commit is contained in:
Massimo Candela
2021-06-11 15:16:58 +02:00
parent cc4526bae6
commit 0e12b463cc
15 changed files with 28 additions and 28 deletions

View File

@@ -165,7 +165,7 @@ reports:
# host: 127.0.0.1 # host: 127.0.0.1
# port: 514 # port: 514
# transport: udp # transport: udp
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md # templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}" # default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}"
# hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}" # hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
# newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}" # newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
@@ -186,7 +186,7 @@ reports:
# newprefix: informational # newprefix: informational
# visibility: debug # visibility: debug
# path: trace # path: trace
# resourceTemplates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md # resourceTemplates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: "${type}" # default: "${type}"
# hijack: "hijack::${prefix}@@${asn}" # hijack: "hijack::${prefix}@@${asn}"
# newprefix: "newprefix::${prefix}@@${asn}" # newprefix: "newprefix::${prefix}@@${asn}"
@@ -217,7 +217,7 @@ reports:
# - misconfiguration # - misconfiguration
# - rpki # - rpki
# params: # params:
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md # templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: '{"text": "${summary}"}' # default: '{"text": "${summary}"}'
# headers: # headers:
# isTemplateJSON: true # isTemplateJSON: true
@@ -329,7 +329,7 @@ monitoredPrefixesFiles:
# HTTP proxy setting: # HTTP proxy setting:
# Allow to run BGPalerter behind an HTTP/HTTPS proxy. # Allow to run BGPalerter behind an HTTP/HTTPS proxy.
# You can also specify which module can bypass the proxy. # You can also specify which module can bypass the proxy.
# More information here: https://github.com/nttgin/BGPalerter/blob/master/docs/http-proxy.md # More information here: https://github.com/nttgin/BGPalerter/blob/main/docs/http-proxy.md
# httpProxy: http://username:password@127.0.0.1:9000 # httpProxy: http://username:password@127.0.0.1:9000
@@ -337,7 +337,7 @@ monitoredPrefixesFiles:
############################ ############################
# RPKI settings: # RPKI settings:
# Global RPKI settings shared across all monitors requiring RPKI data # Global RPKI settings shared across all monitors requiring RPKI data
# More information here: https://github.com/nttgin/BGPalerter/blob/master/docs/rpki.md # More information here: https://github.com/nttgin/BGPalerter/blob/main/docs/rpki.md
rpki: rpki:
vrpProvider: ntt vrpProvider: ntt

View File

@@ -33,7 +33,7 @@ The following are advanced parameters, please don't touch them if you are not do
|---|---|---|---|---| |---|---|---|---|---|
|environment| You can specify various environments. The values "production" (not verbose) and "development" (verbose) will affect the verbosity of the error/debug logs. The value "research" is explained [here](research.md). Other values don't affect the functionalities, they will be used to identify from which environment the log is coming from. | A string | production | Yes | |environment| You can specify various environments. The values "production" (not verbose) and "development" (verbose) will affect the verbosity of the error/debug logs. The value "research" is explained [here](research.md). Other values don't affect the functionalities, they will be used to identify from which environment the log is coming from. | A string | production | Yes |
|alertOnlyOnce| A boolean that, if set to true, will prevent repetitions of the same alert in the future (which it doesn't make sense for production purposes). In this case notificationIntervalSeconds will be ignored. If set to true, the signature of all alerts will be cached in order to recognize if they already happened in the past. This may lead to a memory leak if the amount of alerts is considerable. | A boolean | false | No | |alertOnlyOnce| A boolean that, if set to true, will prevent repetitions of the same alert in the future (which it doesn't make sense for production purposes). In this case notificationIntervalSeconds will be ignored. If set to true, the signature of all alerts will be cached in order to recognize if they already happened in the past. This may lead to a memory leak if the amount of alerts is considerable. | A boolean | false | No |
|pidFile| A file where the PID of the BGP alerter master process is recorded. | A string | bgpalerter.pid | No | |pidFile| A file where the PID of the BGP alerter main process is recorded. | A string | bgpalerter.pid | No |
|maxMessagesPerSecond| A cap to the BGP messages received, over such cap the messages will be dropped. The default value is way above any production rate. Changing this value may be useful only for research measurements on the entire address space. | An integer | 6000 | No | |maxMessagesPerSecond| A cap to the BGP messages received, over such cap the messages will be dropped. The default value is way above any production rate. Changing this value may be useful only for research measurements on the entire address space. | An integer | 6000 | No |
|multiProcess| If set to true, the processing of the BGP messages will be distributed on two processes. This may be useful for research measurements on the entire address space. It is discouraged to set this to true for normal production monitoring. | A boolean | false | No | |multiProcess| If set to true, the processing of the BGP messages will be distributed on two processes. This may be useful for research measurements on the entire address space. It is discouraged to set this to true for normal production monitoring. | A boolean | false | No |
|fadeOffSeconds| If an alert is generated but cannot be yet squashed (e.g., not reached yet the `thresholdMinPeers`), it is inserted in a temporary list which is garbage collected after the amount of seconds expressed in `fadeOffSeconds`. Due to BGP propagation times, values below 5 minutes can result in false negatives.| An integer | 360 | No | |fadeOffSeconds| If an alert is generated but cannot be yet squashed (e.g., not reached yet the `thresholdMinPeers`), it is inserted in a temporary list which is garbage collected after the amount of seconds expressed in `fadeOffSeconds`. Due to BGP propagation times, values below 5 minutes can result in false negatives.| An integer | 360 | No |

View File

@@ -13,7 +13,7 @@ The first time you run it, the auto-configuration will start.
1. Download the binary: `wget https://github.com/nttgin/BGPalerter/releases/latest/download/bgpalerter-linux-x64` 1. Download the binary: `wget https://github.com/nttgin/BGPalerter/releases/latest/download/bgpalerter-linux-x64`
2. Download [`config.yml.example`](https://raw.githubusercontent.com/nttgin/BGPalerter/master/config.yml.example) as `config.yml` (in the same directory of the binary) 2. Download [`config.yml.example`](https://raw.githubusercontent.com/nttgin/BGPalerter/main/config.yml.example) as `config.yml` (in the same directory of the binary)
3. Make the binary executable (e.g., `chmod +x bgpalerter-linux-x64`) 3. Make the binary executable (e.g., `chmod +x bgpalerter-linux-x64`)
@@ -28,7 +28,7 @@ Additionally, you can configure [BGPalerter to run as a Linux Serivce](linux-ser
1. Download the binary [here](https://github.com/nttgin/BGPalerter/releases/latest/download/bgpalerter-macos-x64). 1. Download the binary [here](https://github.com/nttgin/BGPalerter/releases/latest/download/bgpalerter-macos-x64).
2. Download [`config.yml.example`](https://raw.githubusercontent.com/nttgin/BGPalerter/master/config.yml.example) as `config.yml` (in the same directory of the binary) 2. Download [`config.yml.example`](https://raw.githubusercontent.com/nttgin/BGPalerter/main/config.yml.example) as `config.yml` (in the same directory of the binary)
3. Make the binary executable (e.g., `chmod +x bgpalerter-macos-x64`) 3. Make the binary executable (e.g., `chmod +x bgpalerter-macos-x64`)
@@ -41,7 +41,7 @@ Additionally, you can configure [BGPalerter to run as a Linux Serivce](linux-ser
1. Download the binary [here](https://github.com/nttgin/BGPalerter/releases/latest/download/bgpalerter-win-x64.exe). 1. Download the binary [here](https://github.com/nttgin/BGPalerter/releases/latest/download/bgpalerter-win-x64.exe).
2. Download [`config.yml.example`](https://raw.githubusercontent.com/nttgin/BGPalerter/master/config.yml.example) as `config.yml` (in the same directory of the binary) 2. Download [`config.yml.example`](https://raw.githubusercontent.com/nttgin/BGPalerter/main/config.yml.example) as `config.yml` (in the same directory of the binary)
3. Open cmd (press `ctrl + R` and type `cmd`) and `cd` on the directory where you downloaded the binary (usually `cd C:\Users\_USER_\Downloads`) 3. Open cmd (press `ctrl + R` and type `cmd`) and `cd` on the directory where you downloaded the binary (usually `cd C:\Users\_USER_\Downloads`)

View File

@@ -71,7 +71,7 @@ Below the complete list of attributes (the dot notation is used to represent yml
| ignoreMorespecifics | Prefixes more specific of the current one will be excluded from monitoring. | A boolean | Yes | | ignoreMorespecifics | Prefixes more specific of the current one will be excluded from monitoring. | A boolean | Yes |
| ignore | Exclude the current prefix from monitoring. Useful when you are monitoring a prefix and you want to exclude a particular sub-prefix. | A boolean | No | | ignore | Exclude the current prefix from monitoring. Useful when you are monitoring a prefix and you want to exclude a particular sub-prefix. | A boolean | No |
| includeMonitors | The list of monitors you want to run on this prefix. If this attribute is not declared, all monitors will be used. Not compatible with excludeMonitors. | An array of strings (monitors name according to config.yml) | No | | includeMonitors | The list of monitors you want to run on this prefix. If this attribute is not declared, all monitors will be used. Not compatible with excludeMonitors. | An array of strings (monitors name according to config.yml) | No |
| excludeMonitors | The list of monitors you want to exclude on this prefix. Not compatible with includeMonitors. Use monitors `name` attributes, as defined in the monitor list in [config.yml](https://github.com/nttgin/BGPalerter/blob/master/config.yml.example). | An array of strings (monitors name according to config.yml) | No | | excludeMonitors | The list of monitors you want to exclude on this prefix. Not compatible with includeMonitors. Use monitors `name` attributes, as defined in the monitor list in [config.yml](https://github.com/nttgin/BGPalerter/blob/main/config.yml.example). | An array of strings (monitors name according to config.yml) | No |
| path | A list path matching rules, read more [here](path-matching.md). | | No | | path | A list path matching rules, read more [here](path-matching.md). | | No |
| group | The name of the group that will receive alerts about this monitored prefix. See [here](usergroups.md).| A string | No | | group | The name of the group that will receive alerts about this monitored prefix. See [here](usergroups.md).| A string | No |

View File

@@ -77,6 +77,6 @@ We currently use the following automation on the repository:
5) The pre-release is tested 5) The pre-release is tested
6) After the test period, the pre-released is marked as latest and released as stable. 6) After the test period, the pre-released is marked as latest and released as stable.
1) Clients will be notified of the new release. 1) Clients will be notified of the new release.
7) The `release` branch is merged in `master` and after deleted. 7) The `release` branch is merged in `main` and after deleted.
All pull requests must happen against the `dev` branch (or rebased during review). If needed they will be cherry-picked in the `release` branch. All pull requests must happen against the `dev` branch (or rebased during review). If needed they will be cherry-picked in the `release` branch.

View File

@@ -3,6 +3,6 @@
BGPalerter can be easily updated. The configuration of BGPalerter is persisted in `config.yml` and `prefixes.yml`, as long as you preserve such files you will not need to reconfigure it after the update. BGPalerter can be easily updated. The configuration of BGPalerter is persisted in `config.yml` and `prefixes.yml`, as long as you preserve such files you will not need to reconfigure it after the update.
* If you are using the binary, go in the [releases tab](https://github.com/nttgin/BGPalerter/releases), download the new binary and replace the old one. * If you are using the binary, go in the [releases tab](https://github.com/nttgin/BGPalerter/releases), download the new binary and replace the old one.
* If you are using the source code, simply do a git pull of the master branch. After, do `npm install` to update the dependencies. * If you are using the source code, simply do a git pull of the main branch. After, do `npm install` to update the dependencies.
* If you are using docker, do `docker pull nttgin/bgpalerter:latest`, after stop and remove your current container and [run it again](installation.md#running-bgpalerter-in-docker). * If you are using docker, do `docker pull nttgin/bgpalerter:latest`, after stop and remove your current container and [run it again](installation.md#running-bgpalerter-in-docker).
* You can set [automatic updates](linux-service.md#automatic-updates). * You can set [automatic updates](linux-service.md#automatic-updates).

View File

@@ -140,7 +140,7 @@ export default class Config {
downloadDefault = () => { downloadDefault = () => {
return axios({ return axios({
url: 'https://raw.githubusercontent.com/nttgin/BGPalerter/master/config.yml.example', url: 'https://raw.githubusercontent.com/nttgin/BGPalerter/main/config.yml.example',
method: 'GET', method: 'GET',
responseType: 'blob', // important responseType: 'blob', // important
}) })

View File

@@ -80,7 +80,7 @@ export default class ConnectorRIS extends Connector {
this.ws.on('close', (error) => { this.ws.on('close', (error) => {
if (this.connected) { if (this.connected) {
this._disconnect("RIPE RIS disconnected (error: " + error + "). Read more at https://github.com/nttgin/BGPalerter/blob/master/docs/ris-disconnections.md"); this._disconnect("RIPE RIS disconnected (error: " + error + "). Read more at https://github.com/nttgin/BGPalerter/blob/main/docs/ris-disconnections.md");
} else { } else {
this._disconnect("It was not possible to establish a connection with RIPE RIS"); this._disconnect("It was not possible to establish a connection with RIPE RIS");
reject(); reject();

View File

@@ -47,7 +47,7 @@ export default class ConnectorSwUpdates extends Connector{
_checkForUpdates = () => { _checkForUpdates = () => {
return this.axios({ return this.axios({
responseType: "json", responseType: "json",
url: "https://raw.githubusercontent.com/nttgin/BGPalerter/master/package.json" url: "https://raw.githubusercontent.com/nttgin/BGPalerter/main/package.json"
}) })
.then(data => { .then(data => {
if (data && data.data && data.data.version && semver.gt(data.data.version, this.version)) { if (data && data.data && data.data.version && semver.gt(data.data.version, this.version)) {

View File

@@ -110,7 +110,7 @@ export default class InputYml extends Input {
} }
if (Object.keys(monitoredPrefixesFile).length === 0) { if (Object.keys(monitoredPrefixesFile).length === 0) {
reject(new Error("No prefixes to monitor in " + prefixesFile + ". Please read https://github.com/nttgin/BGPalerter/blob/master/docs/prefixes.md")); reject(new Error("No prefixes to monitor in " + prefixesFile + ". Please read https://github.com/nttgin/BGPalerter/blob/main/docs/prefixes.md"));
return; return;
} }

View File

@@ -44,7 +44,7 @@ export default class MonitorRPKI extends Monitor {
if (deprecated.includes(configParamKey)) { if (deprecated.includes(configParamKey)) {
this.logger.log({ this.logger.log({
level: 'error', level: 'error',
message: `The parameters ${deprecated.join(",")} are deprecated in monitorRPKI. Please use see here: https://github.com/nttgin/BGPalerter/blob/master/docs/rpki.md` message: `The parameters ${deprecated.join(",")} are deprecated in monitorRPKI. Please use see here: https://github.com/nttgin/BGPalerter/blob/main/docs/rpki.md`
}); });
} }
} }

View File

@@ -53,12 +53,12 @@ export default class Worker {
if (!this.config.multiProcess) { if (!this.config.multiProcess) {
const Consumer = require("./consumer").default; const Consumer = require("./consumer").default;
this.master(); this.main();
new Consumer(env, this.input); new Consumer(env, this.input);
} else { } else {
if (cluster.isMaster) { if (cluster.isMaster) {
this.master(cluster.fork()); this.main(cluster.fork());
} else { } else {
const Consumer = require("./consumer").default; const Consumer = require("./consumer").default;
new Consumer(env, this.input); new Consumer(env, this.input);
@@ -67,7 +67,7 @@ export default class Worker {
}; };
master = (worker) => { main = (worker) => {
const LossyBuffer = require("./utils/lossyBuffer").default; const LossyBuffer = require("./utils/lossyBuffer").default;
const ConnectorFactory = require("./connectorFactory").default; const ConnectorFactory = require("./connectorFactory").default;
@@ -90,7 +90,7 @@ export default class Worker {
if (this.config.uptimeMonitor) { if (this.config.uptimeMonitor) {
this.logger.log({ this.logger.log({
level: 'error', level: 'error',
message: "The uptime monitor configuration changed. Please see the documentation https://github.com/nttgin/BGPalerter/blob/master/docs/process-monitors.md" message: "The uptime monitor configuration changed. Please see the documentation https://github.com/nttgin/BGPalerter/blob/main/docs/process-monitors.md"
}); });
} }

View File

@@ -38,7 +38,7 @@ const fs = require('fs');
chai.use(chaiSubset); chai.use(chaiSubset);
const expect = chai.expect; const expect = chai.expect;
const volume = "volumetests/"; const volume = "volumetests/";
const asyncTimeout = 20000;
global.EXTERNAL_VERSION_FOR_TEST = "0.0.1"; global.EXTERNAL_VERSION_FOR_TEST = "0.0.1";
global.EXTERNAL_CONFIG_FILE = volume + "config.test.yml"; global.EXTERNAL_CONFIG_FILE = volume + "config.test.yml";

View File

@@ -141,7 +141,7 @@ reports:
# host: 127.0.0.1 # host: 127.0.0.1
# port: 514 # port: 514
# transport: udp # transport: udp
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md # templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}" # default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}"
# hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}" # hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
# newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}" # newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
@@ -162,7 +162,7 @@ reports:
# newprefix: informational # newprefix: informational
# visibility: debug # visibility: debug
# path: trace # path: trace
# resourceTemplates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md # resourceTemplates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: "${type}" # default: "${type}"
# hijack: "hijack::${prefix}@@${asn}" # hijack: "hijack::${prefix}@@${asn}"
# newprefix: "newprefix::${prefix}@@${asn}" # newprefix: "newprefix::${prefix}@@${asn}"
@@ -191,7 +191,7 @@ reports:
# - misconfiguration # - misconfiguration
# - rpki # - rpki
# params: # params:
# templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md # templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
# default: '{"text": "${summary}"}' # default: '{"text": "${summary}"}'
# headers: # headers:
# isTemplateJSON: true # isTemplateJSON: true
@@ -269,7 +269,7 @@ monitoredPrefixesFiles:
# HTTP proxy setting: # HTTP proxy setting:
# Allow to run BGPalerter behind an HTTP/HTTPS proxy. # Allow to run BGPalerter behind an HTTP/HTTPS proxy.
# You can also specify which module can bypass the proxy. # You can also specify which module can bypass the proxy.
# More information here: https://github.com/nttgin/BGPalerter/blob/master/docs/http-proxy.md # More information here: https://github.com/nttgin/BGPalerter/blob/main/docs/http-proxy.md
# httpProxy: http://username:password@127.0.0.1:9000 # httpProxy: http://username:password@127.0.0.1:9000

View File

@@ -59,7 +59,7 @@ reports:
host: 127.0.0.1 host: 127.0.0.1
port: 1516 port: 1516
transport: udp transport: udp
templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}" default: "++BGPalerter-3-${type}: ${summary}|${earliest}|${latest}"
hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}" hijack: "++BGPalerter-5-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}" newprefix: "++BGPalerter-4-${type}: ${summary}|${prefix}|${description}|${asn}|${newprefix}|${neworigin}|${earliest}|${latest}|${peers}"
@@ -75,7 +75,7 @@ reports:
- misconfiguration - misconfiguration
- rpki - rpki
params: params:
templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/master/docs/context.md templates: # See here how to write a template https://github.com/nttgin/BGPalerter/blob/main/docs/context.md
default: '{"text": "${summary}"}' default: '{"text": "${summary}"}'
headers: headers:
isTemplateJSON: true isTemplateJSON: true