mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-15 12:24:26 +01:00
Fixed persistent storage location for agent2
This commit is contained in:
parent
5b17d2c0d3
commit
f9d45a586c
@ -25,6 +25,7 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
apk add --no-cache --clean-protected \
|
||||
tini \
|
||||
tzdata \
|
||||
|
@ -156,7 +156,7 @@ prepare_zbx_agent_config() {
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "1"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferPeriod" "${ZBX_PERSISTENTBUFFERPERIOD}"
|
||||
else
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "0"
|
||||
|
@ -35,6 +35,7 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
mkdir -p /etc/yum/vars/ && \
|
||||
echo "" > /etc/yum/vars/ociregion && \
|
||||
echo "oracle.com" > /etc/yum/vars/ocidomain && \
|
||||
|
@ -156,7 +156,7 @@ prepare_zbx_agent_config() {
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "1"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferPeriod" "${ZBX_PERSISTENTBUFFERPERIOD}"
|
||||
else
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "0"
|
||||
|
@ -62,6 +62,7 @@ RUN set -eux && INSTALL_PKGS="bash \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /sbin/tini && \
|
||||
curl -L https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini.asc -o /tmp/tini.asc && \
|
||||
export GNUPGHOME="$(mktemp -d)" && \
|
||||
|
@ -156,7 +156,7 @@ prepare_zbx_agent_config() {
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "1"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferPeriod" "${ZBX_PERSISTENTBUFFERPERIOD}"
|
||||
else
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "0"
|
||||
|
@ -34,6 +34,7 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
apt-get -y update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
|
||||
tini \
|
||||
|
@ -156,7 +156,7 @@ prepare_zbx_agent_config() {
|
||||
|
||||
if [ "${ZBX_ENABLEPERSISTENTBUFFER,,}" == "true" ]; then
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "1"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferFile" "$ZABBIX_USER_HOME_DIR/buffer/agent2.db"
|
||||
update_config_var $ZBX_AGENT_CONFIG "PersistentBufferPeriod" "${ZBX_PERSISTENTBUFFERPERIOD}"
|
||||
else
|
||||
update_config_var $ZBX_AGENT_CONFIG "EnablePersistentBuffer" "0"
|
||||
|
Loading…
Reference in New Issue
Block a user