Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #11 from SimplyVC/miguel/update_v1.1.0
Browse files Browse the repository at this point in the history
Changes for update to v1.1.0
  • Loading branch information
migueldingli1997 authored Dec 9, 2019
2 parents 84d7187 + 18bcc92 commit 6c6a7f9
Show file tree
Hide file tree
Showing 40 changed files with 1,099 additions and 372 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.idea/
__pycache__/

logs/*.log
logs/*/*.log
logs/*.log*
logs/*/*.log*
!logs/alerts/.gitkeep
!logs/general/.gitkeep

Expand Down
101 changes: 51 additions & 50 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions config/example_user_config_main.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ host = localhost
port = 6379
password = HMASDNoiSADnuiasdgnAIO876hg967bv99vb8buyT8BVuyT76VBT76uyi

[periodic_alive_reminder]
enabled = True
interval_seconds = 3600
email_enabled = False
telegram_enabled = True
2 changes: 1 addition & 1 deletion config/example_user_config_nodes.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ node_name = Sentry 2
node_rpc_url = http://11.22.33.44:26657
node_is_validator = false
include_in_node_monitor = false
include_in_network_monitor = false
include_in_network_monitor = false
2 changes: 1 addition & 1 deletion config/example_user_config_repos.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ include_in_github_monitor = true
[repo_2]
repo_name = Gaia
repo_page = cosmos/gaia/
include_in_github_monitor = false
include_in_github_monitor = false
9 changes: 6 additions & 3 deletions config/internal_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ twiml_instructions_url = https://twimlets.com/echo

[redis]
redis_database = 10
redis_rest_database = 11
redis_test_database = 11

redis_twilio_snooze_key = twilio_snooze
redis_github_releases_key_prefix = github_releases_
redis_node_monitor_alive_key_prefix = node_monitor_alive_
redis_network_monitor_alive_key_prefix = network_monitor_alive_
redis_network_monitor_last_height_key_prefix = network_monitor_last_height_checked_
redis_periodic_alive_reminder_mute_key = alive_reminder_mute

redis_node_monitor_alive_key_timeout = 86400
redis_network_monitor_alive_key_timeout = 86400
Expand All @@ -34,15 +35,17 @@ redis_network_monitor_alive_key_timeout = 86400
[monitoring_periods]
node_monitor_period_seconds = 10
network_monitor_period_seconds = 10
github_monitor_period_seconds = 300
network_monitor_max_catch_up_blocks = 500
github_monitor_period_seconds = 3600
# These define how often a monitor runs an iteration of its monitoring loop

[alert_intervals_and_limits]
downtime_alert_interval_seconds = 900
max_missed_blocks_interval_seconds = 120
max_missed_blocks_in_time_interval = 10
validator_peer_danger_boundary = 1
full_node_peer_danger_boundary = 15
validator_peer_safe_boundary = 5
full_node_peer_danger_boundary = 10
missed_blocks_danger_boundary = 5
github_error_interval_seconds = 3600
# These limit the number of alerts of a specific type received using either
Expand Down
44 changes: 43 additions & 1 deletion doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,51 @@
# Change Log

## 1.1.0

Released on December 05, 2019.

### Update Instructions

To update an instance of P.A.N.I.C. to this version:
```shell script
git fetch # Fetch these changes
git checkout v1.1.0 # Switch to this version

pipenv update # Update dependencies
pipenv run python run_util_update_to_v1.1.0.py
```

The `run_util_update_to_v1.1.0.py` script updates `user_config_main.ini` so that it becomes compatible with the v1.1.0 `user_config_main.ini` file.

P.A.N.I.C. can now be started up. If the alerter was running as a Linux service, the service should now be restarted:

```shell script
sudo systemctl restart panic_alerter
```

### Features
* Add **authenticated SMTP**, so that email channel can use public SMTP servers, such as smtp.gmail.com, by supplying a valid username and password.
* Add **periodic alive reminder** as a way for the alerter to inform the user that it is still running. It is turned on through the setup process and can be muted/unmuted using commands from Telegram.
* Add **validator peer safe boundary** (`validator_peer_safe_boundary`, default: 5) to limit peer change alerts up to a certain number of peers.
* Add **max catch up blocks** (`network_monitor_max_catchup_blocks`, default: 500) to limit the number of historical blocks that the network monitor checks if it is not in sync, so that it focuses on the more important present events.
* Add **current network monitor block height** to Telegram status message.

### Changes and Improvements
* Email channel now supports multiple recipients.
* Internal config
* Changed default GitHub monitor period to 3600 seconds (1h).
* Changed default `full_node_peer_danger_boundary` to 10 for less alerts.
* Other:
* Updated Telegram bot to use new context-based callbacks.
* Now .gitignoring numbered log files (e.g. `*.log.1`)

### Bug Fixes
* Fixed full node peer increase alert not sent if the new number of peers is equal to the danger boundary.
* Setup processes now clear config file before adding new entries.

## 1.0.0

Released on August 23, 2019.

### Added

* First version of the P.A.N.I.C. alerter by Simply VC
Loading

0 comments on commit 6c6a7f9

Please sign in to comment.