From 34ab329e6c9be36274439180e39094cfc515b1b0 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 2 Dec 2021 12:50:34 +0100 Subject: [PATCH] zabbix_return: also consider zabbix_agent2.conf It is also possible to use the configuration file of Zabbix's Agent 2 for zabbix_sender, hence this file also also be considered as argument for zabbix_sender's --config command line paramter. Fixes #61313. --- changelog/61313.fixed | 1 + salt/returners/zabbix_return.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog/61313.fixed diff --git a/changelog/61313.fixed b/changelog/61313.fixed new file mode 100644 index 000000000000..473bdba773a7 --- /dev/null +++ b/changelog/61313.fixed @@ -0,0 +1 @@ +The zabbix returner now also considers the configuration file from Zabbix agent 2 ('zabbix_agent2.conf'). diff --git a/salt/returners/zabbix_return.py b/salt/returners/zabbix_return.py index ea99eff0a931..a387a26e0417 100644 --- a/salt/returners/zabbix_return.py +++ b/salt/returners/zabbix_return.py @@ -30,7 +30,9 @@ ZABBIX_CONFIG_CANDIDATES = [ "/usr/local/zabbix/etc/zabbix_agentd.conf", + "/usr/local/zabbix/etc/zabbix_agent2.conf", "/etc/zabbix/zabbix_agentd.conf", + "/etc/zabbix/zabbix_agent2.conf", ] ZABBIX_SENDER = next((p for p in ZABBIX_SENDER_CANDIDATES if os.path.exists(p)), None)