From 661fa646915907c0f909b8e79c51fbb2f455007b Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 23 Aug 2023 09:32:43 +0000 Subject: T5448: Add configuration host-name for zabbix-agent Ability to configure host-name for zabbix-agent set service monitoring zabbix-agent host-name 'r-vyos' --- data/templates/zabbix-agent/zabbix-agent.conf.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data/templates/zabbix-agent') diff --git a/data/templates/zabbix-agent/zabbix-agent.conf.j2 b/data/templates/zabbix-agent/zabbix-agent.conf.j2 index 77f57f32f..e6dcef872 100644 --- a/data/templates/zabbix-agent/zabbix-agent.conf.j2 +++ b/data/templates/zabbix-agent/zabbix-agent.conf.j2 @@ -1,4 +1,4 @@ -# Generated by ${vyos_conf_scripts_dir}/service_zabbix_agent.py +# Generated by ${vyos_conf_scripts_dir}/service_monitoring_zabbix-agent.py PidFile=/run/zabbix/zabbix_agent2.pid LogFile=/var/log/zabbix/zabbix_agent2.log @@ -45,6 +45,10 @@ Server={{ server | bracketize_ipv6 | join(',') }} ServerActive={{ servers | join(',') }} {% endif %} +{% if host_name is vyos_defined %} +Hostname={{ host_name }} +{% endif %} + {% if port is vyos_defined %} ListenPort={{ port }} {% endif %} -- cgit v1.2.3