Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handling of missing prerequisites #53

Open
paalbra opened this issue Mar 17, 2023 · 1 comment
Open

Better handling of missing prerequisites #53

paalbra opened this issue Mar 17, 2023 · 1 comment

Comments

@paalbra
Copy link
Contributor

paalbra commented Mar 17, 2023

Zac will crash if Zabbix doesn't contain some prerequisites, like the host groups All-auto-disabled-hosts and All-hosts.

Maybe create a simple function that can sanity check Zabbix for all prerequisites upon startup and create a better error log/handle the "crash" in a better way?

@paalbra
Copy link
Contributor Author

paalbra commented Mar 17, 2023

E.g currently it'll just crash with something like:

...
  File "zabbix-auto-config/zabbix_auto_config/processing.py", line 391, in disable_host
    disabled_hostgroup_id = self.api.hostgroup.get(filter={"name": self.config.hostgroup_disabled})[0]["groupid"]
IndexError: list index out of range
2023-03-17T15:36:12+0100 ERROR [MainProcess 183722] [root] A child has died: zabbix-host-updater. Exiting
...

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

No branches or pull requests

1 participant