From 2799c464e83a4039e61b86429fd1cc3de22b6162 Mon Sep 17 00:00:00 2001 From: Robert Middleswarth Date: Sun, 2 Mar 2014 17:19:42 -0500 Subject: Add an Advanced Parameters to the proxy settings. --- config/zabbix2/zabbix2-proxy.xml | 10 ++++++++++ config/zabbix2/zabbix2.inc | 2 ++ 2 files changed, 12 insertions(+) (limited to 'config') diff --git a/config/zabbix2/zabbix2-proxy.xml b/config/zabbix2/zabbix2-proxy.xml index c857bec1..8dc41e4e 100644 --- a/config/zabbix2/zabbix2-proxy.xml +++ b/config/zabbix2/zabbix2-proxy.xml @@ -129,6 +129,16 @@ 10 true + + Advanced Parameters + advancedparams + base64 + textarea + 5 + 50 + Advanced paramete. There are some rearly used parameters that sometimes need defined. Value has form, example: StartDiscoverers=10 + + sync_package_zabbix2(); diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc index 92aad309..c08c5487 100644 --- a/config/zabbix2/zabbix2.inc +++ b/config/zabbix2/zabbix2.inc @@ -193,6 +193,7 @@ function sync_package_zabbix2(){ $zbproxy_config = $config['installedpackages']['zabbixproxy']['config'][0]; if ($zbproxy_config['proxyenabled']=="on"){ $Mode=(is_numericint($zbproxy_config['proxymode'])?$zbproxy_config['proxymode'] : 0); + $AdvancedParams=base64_decode($zbagent_config['advancedparams']); $zbproxy_conf_file = <<< EOF Server={$zbproxy_config['server']} @@ -206,6 +207,7 @@ FpingLocation=/usr/local/sbin/fping #there's currently no fping6 (IPv6) dependency in the package, but if there was, the binary would likely also be in /usr/local/sbin Fping6Location=/usr/local/sbin/fping6 ProxyMode={$Mode} +{$AdvancedParams} EOF; file_put_contents(ZABBIX_PROXY_BASE . "/etc/zabbix22/zabbix_proxy.conf", strtr($zbproxy_conf_file, array("\r" => ""))); -- cgit v1.2.3