Skip to content

Commit

Permalink
More debug numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
paalbra committed Jun 15, 2020
1 parent c05ddd7 commit 1b8c517
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zabbix_auto_config/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ def do_update(self):
zabbix_managed_hosts.append(host)

db_hostnames = set(db_hosts.keys())
zabbix_hostnames = set(zabbix_hosts.keys())
zabbix_managed_hostnames = {host["host"] for host in zabbix_managed_hosts}
zabbix_manual_hostnames = {host["host"] for host in zabbix_manual_hosts}

Expand All @@ -518,6 +519,8 @@ def do_update(self):
hostnames_in_both = list(db_hostnames.intersection(zabbix_managed_hostnames) - zabbix_manual_hostnames)
hostnames_in_manual_and_source = list(db_hostnames.intersection(zabbix_manual_hostnames))

logging.debug("Total in zabbix: %d", len(zabbix_hostnames))
logging.debug("Total in db: %d", len(db_hostnames))
logging.debug("Manual in zabbix: %d", len(zabbix_manual_hostnames))
logging.debug("Manual and in source: %d", len(hostnames_in_manual_and_source))
logging.debug("Manual and in source: %s", " ".join(hostnames_in_manual_and_source[:10]))
Expand Down

0 comments on commit 1b8c517

Please sign in to comment.