From 0c798ec96890da56a7d39d40e5314070217238e9 Mon Sep 17 00:00:00 2001 From: Wouter de Bruijn Date: Wed, 26 Feb 2025 11:10:56 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20quiet=20param?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netbox_zabbix_sync.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netbox_zabbix_sync.py b/netbox_zabbix_sync.py index 5d6606e..75ad65c 100755 --- a/netbox_zabbix_sync.py +++ b/netbox_zabbix_sync.py @@ -65,6 +65,9 @@ def main(arguments): logger.setLevel(logging.DEBUG) if arguments.debug_all: logging.getLogger().setLevel(logging.DEBUG) + if arguments.quiet: + logging.getLogger().setLevel(logging.ERROR) + env_vars = ["ZABBIX_HOST", "NETBOX_HOST", "NETBOX_TOKEN"] if "ZABBIX_TOKEN" in environ: env_vars.append("ZABBIX_TOKEN") @@ -328,5 +331,6 @@ if __name__ == "__main__": help="Turn on debugging for all modules.", action="store_true", ) + parser.add_argument("-q", "--quiet", help="Turn off warnings.", action="store_true") args = parser.parse_args() main(args)