Fixed params for Zabbix agent 2

This commit is contained in:
Alexey Pustovalov 2020-08-24 16:08:18 -04:00
parent a23386310f
commit bb5cee87f0
2 changed files with 2 additions and 19 deletions

View File

@ -103,10 +103,6 @@ This variable is boolean (``true`` or ``false``) and enables or disables feature
The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent 2 container. You may specify port of Zabbix server or Zabbix proxy in such syntax: ``zabbix-server:10061,zabbix-proxy:10072``.
### `ZBX_LOADMODULE`
The variable is list of comma separated loadable Zabbix modules. It works with volume ``/var/lib/zabbix/modules``. The syntax of the variable is ``dummy1.so,dummy2.so``.
### `ZBX_DEBUGLEVEL`
The variable is used to specify debug level. By default, value is ``3``. It is ``DebugLevel`` parameter in ``zabbix_agent2.conf``. Allowed values are listed below:
@ -168,10 +164,6 @@ Please use official documentation for [``zabbix_agent2.conf``](https://www.zabbi
The volume allows include ``*.conf`` files and extend Zabbix agent 2 using ``UserParameter`` feature.
### ``/var/lib/zabbix/modules``
The volume allows load additional modules and extend Zabbix agent 2 using ``LoadModule`` feature.
### ``/var/lib/zabbix/enc``
The volume is used to store TLS related files. These file names are specified using ``ZBX_TLSCAFILE``, ``ZBX_TLSCRLFILE``, ``ZBX_TLSKEY_FILE`` and ``ZBX_TLSPSKFILE`` variables.

View File

@ -145,7 +145,6 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "ListenPort" "${ZBX_LISTENPORT}"
update_config_var $ZBX_AGENT_CONFIG "ListenIP" "${ZBX_LISTENIP}"
update_config_var $ZBX_AGENT_CONFIG "StartAgents" "${ZBX_STARTAGENTS}"
: ${ZBX_ACTIVE_ALLOW:="true"}
if [ "$ZBX_ACTIVE_ALLOW" == "true" ]; then
@ -167,8 +166,8 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "StatusPort" "31999"
fi
update_config_var $ZBX_AGENT_CONFIG "HostInterface" "${ZBX_HOSTINTERFACE}"
update_config_var $ZBX_AGENT_CONFIG "HostInterfaceItem" "${ZBX_HOSTINTERFACEITEM}"
# update_config_var $ZBX_AGENT_CONFIG "HostInterface" "${ZBX_HOSTINTERFACE}"
# update_config_var $ZBX_AGENT_CONFIG "HostInterfaceItem" "${ZBX_HOSTINTERFACEITEM}"
update_config_var $ZBX_AGENT_CONFIG "Hostname" "${ZBX_HOSTNAME}"
update_config_var $ZBX_AGENT_CONFIG "HostnameItem" "${ZBX_HOSTNAMEITEM}"
@ -183,8 +182,6 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "Timeout" "${ZBX_TIMEOUT}"
update_config_var $ZBX_AGENT_CONFIG "Include" "/etc/zabbix/zabbix_agentd.d/"
update_config_var $ZBX_AGENT_CONFIG "UnsafeUserParameters" "${ZBX_UNSAFEUSERPARAMETERS}"
update_config_var $ZBX_AGENT_CONFIG "LoadModulePath" "$ZABBIX_USER_HOME_DIR/modules/"
update_config_multiple_var $ZBX_AGENT_CONFIG "LoadModule" "${ZBX_LOADMODULE}"
update_config_var $ZBX_AGENT_CONFIG "TLSConnect" "${ZBX_TLSCONNECT}"
update_config_var $ZBX_AGENT_CONFIG "TLSAccept" "${ZBX_TLSACCEPT}"
update_config_var $ZBX_AGENT_CONFIG "TLSCAFile" "${ZBX_TLSCAFILE}"
@ -198,12 +195,6 @@ prepare_zbx_agent_config() {
update_config_multiple_var $ZBX_AGENT_CONFIG "DenyKey" "${ZBX_DENYKEY}"
update_config_multiple_var $ZBX_AGENT_CONFIG "AllowKey" "${ZBX_ALLOWKEY}"
if [ "$(id -u)" != '0' ]; then
update_config_var $ZBX_AGENT_CONFIG "User" "$(whoami)"
else
update_config_var $ZBX_AGENT_CONFIG "AllowRoot" "1"
fi
}
prepare_agent() {