From 7e69acd64c9d39de18d8edd60661e5bbda3c4764 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 5 Jul 2012 13:57:14 -0400 Subject: whitespace cleanup --- config/zabbix-proxy/zabbix-proxy.xml | 365 +++++++++++++++++------------------ 1 file changed, 182 insertions(+), 183 deletions(-) diff --git a/config/zabbix-proxy/zabbix-proxy.xml b/config/zabbix-proxy/zabbix-proxy.xml index fce266c6..551c42b5 100644 --- a/config/zabbix-proxy/zabbix-proxy.xml +++ b/config/zabbix-proxy/zabbix-proxy.xml @@ -1,120 +1,120 @@ - zabbixproxy - Services: Zabbix Proxy - Monitoring - 1.01 - Zabbix Proxy has been created/modified. - Zabbix Proxy has been deleted. - /usr/local/etc/rc.d/zabbix_proxy.sh restart - - Zabbix Proxy - Setup Zabbix Proxy specific settings -
Services
- /pkg_edit.php?xml=zabbix-proxy.xml&id=0 -
- - zabbix-proxy - zabbix-proxy.sh - zabbix_proxy - - - - Settings - /pkg_edit.php?xml=zabbix-proxy.xml&id=0 - - - - - - Server - server - List of comma delimited IP addresses (or hostnames) of ZABBIX servers - 127.0.0.1 - input - 100 - true - - - Server Port - serverport - Server port (generally 10051) - 10051 - input - 6 - true - - - Hostname - hostname - Unique, case-sensitive proxy name. Make sure the proxy name is known to the server - localhost - input - 100 - true - - - Active Mode - activemode - Check to run Zabbix proxy in active mode (default) - on - checkbox - true - - - Config Frequency - configfrequency - How often the proxy retrieves configuration data from the Zabbix server in seconds. Ignored if the proxy runs in passive mode. - 3600 - input - 10 - true - - + zabbixproxy + Services: Zabbix Proxy + Monitoring + 1.01 + Zabbix Proxy has been created/modified. + Zabbix Proxy has been deleted. + /usr/local/etc/rc.d/zabbix_proxy.sh restart + + Zabbix Proxy + Setup Zabbix Proxy specific settings +
Services
+ /pkg_edit.php?xml=zabbix-proxy.xml&id=0 +
+ + zabbix-proxy + zabbix-proxy.sh + zabbix_proxy + + + + Settings + /pkg_edit.php?xml=zabbix-proxy.xml&id=0 + + + + + + Server + server + List of comma delimited IP addresses (or hostnames) of ZABBIX servers + 127.0.0.1 + input + 100 + true + + + Server Port + serverport + Server port (generally 10051) + 10051 + input + 6 + true + + + Hostname + hostname + Unique, case-sensitive proxy name. Make sure the proxy name is known to the server + localhost + input + 100 + true + + + Active Mode + activemode + Check to run Zabbix proxy in active mode (default) + on + checkbox + true + + + Config Frequency + configfrequency + How often the proxy retrieves configuration data from the Zabbix server in seconds. Ignored if the proxy runs in passive mode. + 3600 + input + 10 + true + + "zabbix_proxy.sh", - "start" => "{$start}", - "restart" => "$stop\n" . "sleep 5\n" . "{$start}", - "stop" => "$stop" - ) - ); + $stop = "echo \"Stopping Zabbix Proxy\"\n"; + $stop .= "kill `cat /var/run/zabbix/zabbix_proxy.pid`\n"; + /* write out rc.d start/stop file */ + write_rcfile(array( + "file" => "zabbix_proxy.sh", + "start" => "{$start}", + "restart" => "$stop\n" . "sleep 5\n" . "{$start}", + "stop" => "$stop" + ) + ); - conf_mount_ro(); + conf_mount_ro(); ]]> @@ -133,98 +133,97 @@ if (!preg_match("/^\d+$/", $ConfigFrequency)) { $input_errors[]='Config Frequency is not numeric.'; } - ]]> + ]]> - '2097152', - 'kern.ipc.shmmax' => '2147483648', - 'kern.ipc.semmsl' => '250' - ); - $sysctls = array(); - if (file_exists("/etc/sysctl.conf")) { - $sc = file_get_contents("/etc/sysctl.conf"); - $sc = explode("\n", $sc); - foreach ($sc as $num => $line) { - list($sysctl, $val) = explode("=", $line, 2); - if (array_key_exists($sysctl, $want_sysctls) || empty($sysctl)) - unset($sc[$num]); - } - } - foreach ($want_sysctls as $ws => $wv) { - $sc[] = "{$ws}={$wv}"; - exec("/sbin/sysctl {$ws}={$wv}"); - } - file_put_contents("/etc/sysctl.conf", implode("\n", $sc) . "\n"); - - $want_tunables = array( - 'kern.ipc.semopm' => '100', - 'kern.ipc.semmni' => '128', - 'kern.ipc.semmns' => '32000', - 'kern.ipc.shmmni' => '4096' - ); - $tunables = array(); - if (file_exists("/boot/loader.conf")) { - $lt = file_get_contents("/boot/loader.conf"); - $lt = explode("\n", $lt); - foreach ($lt as $num => $line) { - list($tunable, $val) = explode("=", $line, 2); - if (array_key_exists($tunable, $want_tunables) || empty($tunable)) - unset($lt[$num]); - } + $conf = "Server=$Server\n"; + $conf .= "ServerPort=$ServerPort\n"; + $conf .= "Hostname=$Hostname\n"; + $conf .= "PidFile=/var/run/zabbix/zabbix_proxy.pid\n"; + $conf .= "DBName=/var/db/zabbix/proxy.db\n"; + $conf .= "LogFile=/var/log/zabbix/zabbix_proxy.log\n"; + $conf .= "ConfigFrequency=$ConfigFrequency\n"; + $conf .= "FpingLocation=/usr/local/sbin/fping\n"; + /* there's currently no fping6 (IPv6) dependency in the package, but if there was, the binary would likely also be in /usr/local/sbin */ + $conf .= "Fping6Location=/usr/local/sbin/fping6\n"; + $conf .= "ProxyMode=$Mode\n"; + + file_put_contents("/usr/local/etc/zabbix/zabbix_proxy.conf", $conf); + + $want_sysctls = array( + 'kern.ipc.shmall' => '2097152', + 'kern.ipc.shmmax' => '2147483648', + 'kern.ipc.semmsl' => '250' + ); + $sysctls = array(); + if (file_exists("/etc/sysctl.conf")) { + $sc = file_get_contents("/etc/sysctl.conf"); + $sc = explode("\n", $sc); + foreach ($sc as $num => $line) { + list($sysctl, $val) = explode("=", $line, 2); + if (array_key_exists($sysctl, $want_sysctls) || empty($sysctl)) + unset($sc[$num]); } - foreach ($want_tunables as $wt => $wv) { - $lt[] = "{$wt}={$wv}"; + } + foreach ($want_sysctls as $ws => $wv) { + $sc[] = "{$ws}={$wv}"; + exec("/sbin/sysctl {$ws}={$wv}"); + } + file_put_contents("/etc/sysctl.conf", implode("\n", $sc) . "\n"); + + $want_tunables = array( + 'kern.ipc.semopm' => '100', + 'kern.ipc.semmni' => '128', + 'kern.ipc.semmns' => '32000', + 'kern.ipc.shmmni' => '4096' + ); + $tunables = array(); + if (file_exists("/boot/loader.conf")) { + $lt = file_get_contents("/boot/loader.conf"); + $lt = explode("\n", $lt); + foreach ($lt as $num => $line) { + list($tunable, $val) = explode("=", $line, 2); + if (array_key_exists($tunable, $want_tunables) || empty($tunable)) + unset($lt[$num]); } - file_put_contents("/boot/loader.conf", implode("\n", $lt) . "\n"); - chmod("/var/log/zabbix", 0755); - chmod("/var/run/zabbix", 0755); - conf_mount_ro(); + } + foreach ($want_tunables as $wt => $wv) { + $lt[] = "{$wt}={$wv}"; + } + file_put_contents("/boot/loader.conf", implode("\n", $lt) . "\n"); + chmod("/var/log/zabbix", 0755); + chmod("/var/run/zabbix", 0755); + conf_mount_ro(); - ]]> + ]]> -
\ No newline at end of file -- cgit v1.2.3