-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from northpowered/5-mkdocs-documentation
5 mkdocs documentation
- Loading branch information
Showing
17 changed files
with
870 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Documentation deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10 | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Examples | ||
|
||
## Typical full config file | ||
|
||
```yaml | ||
Server: | ||
bind_address: '0.0.0.0' | ||
port: 8800 | ||
refresh_time: 2 | ||
|
||
Global: | ||
unit: 'ms' | ||
|
||
Local: | ||
src_addr: '0.0.0.0' | ||
timeout: 1 | ||
ttl: 64 | ||
size: 56 | ||
|
||
Devices: | ||
- name: 'RT_1' | ||
type: 'cisco' | ||
transport: 'telnet' | ||
address: '192.168.0.1' | ||
username: 'user' | ||
password: 'password' | ||
port: 23 | ||
- name: 'RT_2' | ||
type: 'juniper' | ||
transport: 'ssh' | ||
address: '192.168.0.9' | ||
username: 'user' | ||
password: 'password' | ||
port: 22 | ||
|
||
|
||
Policies: | ||
- name: mypolicy | ||
max_rtt: 0.9 | ||
|
||
ServicesGroups: | ||
- name: mygroup | ||
device: 'RT_1' | ||
services: | ||
- name: serv1 | ||
target: '10.26.6.3' | ||
delay: 3 | ||
policy: mypolicy | ||
- name: serv2 | ||
target: '10.26.6.9' | ||
delay: 8 | ||
|
||
Services: | ||
- name: 'service01' | ||
device: 'simplesla-local' | ||
target: '192.168.0.24' | ||
delay: 16 | ||
- name: 'service02' | ||
device: 'RT_2' | ||
target: '16.2.6.9' | ||
delay: 5 | ||
policy: mypolicy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Configuration structure | ||
|
||
All configuration options defined in one YAML file, ex `config.yaml`, that has some sections, represented below. | ||
|
||
## *Server* | ||
|
||
Settings for a HTTP server of Prometheus endpoint | ||
|
||
```yaml | ||
Server: | ||
bind_address: '0.0.0.0' | ||
port: 8800 | ||
refresh_time: 20 | ||
``` | ||
**`bind address`** - Ipv4 or DSN for binding http server with metrics | ||
|
||
**`port`** - Port for http server | ||
|
||
**`refresh_time`** (seconds) - Time of updating data in prometheus endpoint. This is independent from collectors of these metrics | ||
|
||
## *Global* | ||
|
||
Global settings for metric collectors | ||
|
||
```yaml | ||
Global: | ||
unit: 'ms' | ||
``` | ||
**`unit`** - Unit of Round-Trip-Time (RTT) in collected metrics | ||
|
||
## *Local* | ||
|
||
Settings of `simplesla-local` device for ICMP checks | ||
|
||
```yaml | ||
Local: | ||
src_addr: '0.0.0.0' | ||
timeout: 1 | ||
ttl: 64 | ||
size: 56 | ||
``` | ||
**`src_addr`** - Source address for ICMP requests from SimpleSLA | ||
|
||
**`timeout`** (seconds) - Timeout for ICMP requests | ||
|
||
**`ttl`** - TTL for outgoing packets | ||
|
||
**`size`** (bytes) - Payload size of ICMP packets | ||
|
||
## *Devices* | ||
|
||
List of registered devices | ||
|
||
```yaml | ||
Devices: | ||
- name: 'my_device' | ||
type: 'cisco' | ||
transport: 'ssh' | ||
address: '192.168.0.1' | ||
username: 'user' | ||
password: 'password' | ||
port: 22 | ||
``` | ||
**`name`** - Unique name of device, using in metric`s labels | ||
|
||
**`type`** - Type of device, see full list of supported devices [here](../supported_devices.md) | ||
|
||
**`transport`** - protocol to connect to the device, `ssh` and `telnet` are supported now | ||
|
||
**`address`** - IPv4 or DSN of the device | ||
|
||
**`username`** - Username to login to the device | ||
|
||
**`password`** - Password for the account | ||
|
||
**`port`** - Port number for connection | ||
|
||
## *Policies* | ||
|
||
List of policies to define status of service | ||
|
||
```yaml | ||
Policies: | ||
- name: mypolicy | ||
max_rtt: 0.15 | ||
``` | ||
|
||
**`name`** - Unique name of the policy | ||
|
||
**`max_rtt`** - Max value of RTT to change service status | ||
|
||
## *Services* | ||
|
||
List of single services for metric collection | ||
|
||
```yaml | ||
Services: | ||
- name: 'my_service01' | ||
device: 'simplesla-local' | ||
target: '192.168.0.10' | ||
delay: 3 | ||
policy: mypolicy | ||
- name: 'my_service02' | ||
device: 'my_device' | ||
target: '10.35.45.91' | ||
delay: 7 | ||
``` | ||
|
||
**`name`** - Unique name of the service, using on metric`s labels | ||
|
||
**`device`** - Name of the source device. Device MUST be defined in [Devices](index.md#devices) section | ||
|
||
**`target`** - IPv4 or DSN as a destionation for checks | ||
|
||
**`delay`** (seconds) - Pause between checking sessions | ||
|
||
**`policy`** (*OPTIONAL*) - If using, MUST be defined in [Policies](index.md#policies) section | ||
|
||
## *ServicesGroups* | ||
|
||
```yaml | ||
ServicesGroups: | ||
- name: mygroup | ||
device: 'my_device' | ||
delay: 3 | ||
policy: mypolicy | ||
services: | ||
- name: serv1 | ||
target: '10.71.206.2' | ||
policy: mypolicy | ||
- name: serv2 | ||
target: '10.71.206.75' | ||
delay: 3 | ||
``` | ||
|
||
**`name`** - Unique name of service group | ||
|
||
**`device`** - Device for all sub services | ||
|
||
**`delay`** (seconds) - Delay for all sub services | ||
|
||
**`policy`** - Policy for all sub services | ||
|
||
**`services`** - List of sub services. `delay` and `policy` can be overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# How it works | ||
|
||
![Schema](img/simplesla.svg) | ||
|
||
SimpleSLA can handle ICMP checks and provide them to Prometheus with HTTP exporter. There are two ways to collect metrics: | ||
* Local device | ||
* Remote device | ||
|
||
## Local device | ||
SimpleSLA creates local device by default and without any need to define it through config file. Local device has default name **`simplesla-local`** and that\`s the ability to ping with ICMP packets right from the server or local PC with deployed SimpleSLA | ||
|
||
Configuration of `simplesla-local` are described [here](configuration/index.md#local) | ||
|
||
## Remote device | ||
SimpleSLA can connect to other devices and collect RTT to some destinations, that cannot be reachable right from SimpleSLA. | ||
|
||
These some steps of check algorithm: | ||
1. Connect to device | ||
2. Send `ping` command in appropriate format | ||
3. Recieve raw output | ||
4. Parse raw output to some value | ||
5. Push the value as a metric in `Metric collector` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.