mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
improved documentation
This commit is contained in:
14
README.md
14
README.md
@@ -27,18 +27,10 @@ If you enable email reporting, download also the directory `reports/email_templa
|
||||
|
||||
|
||||
## More information for users
|
||||
Below thre are some basic topics, more information will be soon [in the wiki](https://github.com/nttgin/BGPalerter/wiki).
|
||||
|
||||
### Auto generate prefixes.yml
|
||||
To auto generate the monitored prefixes file (by default called `prefixes.yml`) execute:
|
||||
* If you are using the binary `./bgpalerter-linux-x64 generate -a ASN(S) -o OUTPUT_FILE` (e.g. `./bgpalerter-linux-x64 generate -a 2914 -o test.yml`).
|
||||
* If you are using the source code `npm run generate-prefixes -- --a ASN(S) --o OUTPUT_FILE` (e.g. `npm run generate-prefixes -- --a 2914 --o nttprefixes.yml`).
|
||||
|
||||
The script will download the currently announced prefixes of the selected AS (according to RIPEstat data). A warning will be triggered in case of not valid RPKI prefixes.
|
||||
|
||||
To exclude prefixes from being monitored, add to the command `-e prefix1,prefix2`.
|
||||
|
||||
Multiple ASns can be moniotred in the same file e.g.`npm run generate-prefixes -a 2914,4713 -o nttprefixes.yml` (see comma-separated ASns). Additionally, multiple files can be monitored by adding them under `monitoredPrefixesFiles` in `config.yml`.
|
||||
- [Monitored prefixes List](docs/prefixes/#prefixes)
|
||||
- [Auto-generate](docs/prefixes/#generate)
|
||||
- [Fields and meaning](docs/prefixes/#prefixes-fields)
|
||||
|
||||
### Composition
|
||||
|
||||
|
53
docs/prefixes.md
Normal file
53
docs/prefixes.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# <a name="prefixes"></a>Monitored Prefixes List
|
||||
|
||||
## <a name="generate"></a>Auto-generate prefixes list
|
||||
|
||||
To auto generate the monitored prefixes file (by default called `prefixes.yml`) execute:
|
||||
* If you are using the binary `./bgpalerter-linux-x64 generate -a ASN(S) -o OUTPUT_FILE` (e.g. `./bgpalerter-linux-x64 generate -a 2914 -o prefixes.yml`).
|
||||
* If you are using the source code `npm run generate-prefixes -- --a ASN(S) --o OUTPUT_FILE` (e.g. `npm run generate-prefixes -- --a 2914 --o prefixes.yml`).
|
||||
|
||||
The script will detect whatever is currently announced by the provided AS and will take this as "the expected status".
|
||||
|
||||
A warning will be triggered in case of not valid RPKI prefixes, anyway, you should always check the generated list, especially if you are using the option `-i`
|
||||
|
||||
Below the list of possible parameters. **Remember to prepend them with a `--` instead of `-` if you are using the source code version.**
|
||||
|
||||
| Parameter | Description | Expected format | Example | Required |
|
||||
|---|---|---|---|---|
|
||||
| -a | The AS number(s) you want to generate the list for | A comma-separated list of integers | 2914,3333 | Yes |
|
||||
| -o | The YAML output file | A string ending in ".yml" | prefixes.yml | Yes
|
||||
| -e | Prefixes to exclude from the list | A comma-separated list of prefixes | 165.254.255.0/24,192.147.168.0/24 | No |
|
||||
| -i | Avoid monitoring delegated prefixes. If a more specific prefix is found and it results announced by an AS different from the one declared in -a, then set `ignore: true` and `ignoreMorespecifics: true` | Nothing | | No
|
||||
|
||||
|
||||
## <a name="prefixes-fields"></a>Prefixes list fields
|
||||
|
||||
The prefix list is a file containing a series of blocks like the one below, one for each prefix to monitor.
|
||||
|
||||
```
|
||||
165.254.255.0/24:
|
||||
description: Rome peering
|
||||
asn: 2914
|
||||
ignoreMorespecifics: false
|
||||
```
|
||||
|
||||
> Tip: In yml, arrays of values are described with dashes, like below:
|
||||
```
|
||||
asn:
|
||||
- 2914
|
||||
- 3333
|
||||
```
|
||||
|
||||
Below the complete list of attributes:
|
||||
|
||||
| Attribute | Description | Expected type | Required |
|
||||
|---|---|---|---|
|
||||
| asn | The expected origin AS(es) of the prefix | An integer or an array of integers. | Yes |
|
||||
| description | A description that will be reported in the alerts | A string | 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 |
|
||||
| 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. | An array of strings (monitors name according to config.yml) | No |
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user