Skip to content

Commit

Permalink
zabbix_return: also consider zabbix_agent2.conf
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Flowdalic committed Dec 3, 2021
1 parent 5b08e38 commit 34ab329
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/61313.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The zabbix returner now also considers the configuration file from Zabbix agent 2 ('zabbix_agent2.conf').
2 changes: 2 additions & 0 deletions salt/returners/zabbix_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 34ab329

Please sign in to comment.