diff --git a/modules/device.py b/modules/device.py index 524be55..bdde4a1 100644 --- a/modules/device.py +++ b/modules/device.py @@ -428,16 +428,16 @@ class PhysicalDevice: tags = ZabbixTags( self.nb, self._tag_map(), - config['tag_sync'], - config['tag_lower'], + tag_sync=config['tag_sync'], + tag_lower=config['tag_lower'], tag_name=config['tag_name'], tag_value=config['tag_value'], logger=self.logger, host=self.name, ) - if tags.sync is False: + if config['tag_sync'] is False: self.tags = [] - + return False self.tags = tags.generate() return True diff --git a/modules/tags.py b/modules/tags.py index 441ebe2..659966c 100644 --- a/modules/tags.py +++ b/modules/tags.py @@ -15,7 +15,7 @@ class ZabbixTags: self, nb, tag_map, - tag_sync, + tag_sync=False, tag_lower=True, tag_name=None, tag_value=None, @@ -130,4 +130,6 @@ class ZabbixTags: if t: tags.append(t) - return remove_duplicates(tags, sortkey="tag") + tags = remove_duplicates(tags, sortkey="tag") + self.logger.debug(f"Host {self.name}: Resolved tags: {tags}") + return tags