unioslo / zabbix-auto-config

MIT License
3 stars 6 forks source link

Approve changes when failsafe is hit #73

Closed pederhan closed 8 months ago

pederhan commented 10 months ago

When we hit a failsafe on the number of hosts to modify, we usually have to manually inspect the changes ZAC wants to make* in order to approve the changes. Afterwards, we have to temporarily change the config to allow for a greater number of hosts than usual to be modified, restart the application, let it run, then change the config back and restart it again.

This is cumbersome and not super ideal. We should have some way to signal to the application that we approve the changes. After the application has made the changes, the approval (however we give it) should be voided, so that we have to re-approve the next time the failsafe is hit.

How to approve

There are many ways to implement one-time approval. Here are some suggestions:

Intrinsic Solutions

The following changes don't require changes to the architecture or associated services of the application. They are purely source code-driven changes.

Extrinsic (add-on) solutions

These changes require larger changes to the codebase itself via new dependencies or via new services attached to it. Could be good for similar issues in the future, but overkill for this issue alone.


* Inspecting the changes it wants to make is not easy, and often requires either print debugging or attaching a debugger. Lack of introspection is a huge issue.

pederhan commented 8 months ago

Basic introspection by dumping list of hosts to add/remove as a JSON file is added in #74.