mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-16 04:02:56 -06:00
Changed some logging messages and removed import logging statement from troubleshooting
This commit is contained in:
parent
20096a215b
commit
06f97b132a
@ -145,12 +145,12 @@ class PhysicalDevice():
|
|||||||
def get_templates_context(self):
|
def get_templates_context(self):
|
||||||
""" Get Zabbix templates from the device context """
|
""" Get Zabbix templates from the device context """
|
||||||
if "zabbix" not in self.config_context:
|
if "zabbix" not in self.config_context:
|
||||||
e = ("Key 'zabbix' not found in config "
|
e = (f"Host {self.name}: Key 'zabbix' not found in config "
|
||||||
f"context for template host {self.name}")
|
"context for template")
|
||||||
raise TemplateError(e)
|
raise TemplateError(e)
|
||||||
if "templates" not in self.config_context["zabbix"]:
|
if "templates" not in self.config_context["zabbix"]:
|
||||||
e = ("Key 'templates' not found in config "
|
e = (f"Host {self.name}: Key 'templates' not found in config "
|
||||||
f"context 'zabbix' for template host {self.name}")
|
"context 'zabbix' for template host")
|
||||||
raise TemplateError(e)
|
raise TemplateError(e)
|
||||||
return self.config_context["zabbix"]["templates"]
|
return self.config_context["zabbix"]["templates"]
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
"""Module that hosts all functions for virtual machine processing"""
|
"""Module that hosts all functions for virtual machine processing"""
|
||||||
|
|
||||||
from os import sys
|
from os import sys
|
||||||
from logging import getLogger
|
|
||||||
from modules.device import PhysicalDevice
|
from modules.device import PhysicalDevice
|
||||||
from modules.hostgroups import Hostgroup
|
from modules.hostgroups import Hostgroup
|
||||||
from modules.interface import ZabbixInterface
|
from modules.interface import ZabbixInterface
|
||||||
|
Loading…
Reference in New Issue
Block a user