Skip to content

Feature/alarm system v2#236

Open
renereimann wants to merge 7 commits intodevelopfrom
feature/alarm_system_v2
Open

Feature/alarm system v2#236
renereimann wants to merge 7 commits intodevelopfrom
feature/alarm_system_v2

Conversation

@renereimann
Copy link
Contributor

Adding additional features to the alarm system:

Modifications to watchdog.py

  • Support an optional "enable" parameter for each check in check_endpoints. If the enable parameter is present and False, the check is skipped. This allows to quickly and temporarly disable the check e.g. if a device is powered off or is known to be in a bad state.
  • The config file is automatically reloaded before each check_interval. This allows for modifications in the config file to take immidiete effects and the docker container does not have to be restarted if an additional check of an endpoint is added.
  • The slack_hook is stored in a separate file. If the slack hook is exposed to git (even in private repos), slack / git detects the hook disables it due to security concerns. Thus we could not commit changes of the config file to git. By separating the slack_hook the main part can go into github.

An additional HTTP Server using the flask app is setup. The HTTP Server displays a table with all endpoints that are checked.
Web forms allow to Add, Delete and Update the configuration of checked endpoints (see picture below). In combination with the modifications to watchdog this allows to fast enabling / disabling and modification of the endpoint checks.

image

…t have to expose the hook to the version control system. 2. The config file is loaded at each checkinterval, thus updates to the alarm system are automatic and do not need a container restart. 3. The check_endpoints support an additional optional enable filed. If enable is present AND false, the test is skipped. This allows to temporarly disable the checks without to fully deleting the configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant