diff --git a/agent2/alpine/Dockerfile b/agent2/alpine/Dockerfile index f8dd5bf4c..f2768b809 100644 --- a/agent2/alpine/Dockerfile +++ b/agent2/alpine/Dockerfile @@ -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 \ diff --git a/agent2/alpine/docker-entrypoint.sh b/agent2/alpine/docker-entrypoint.sh index 1476e10a4..14229d7ab 100755 --- a/agent2/alpine/docker-entrypoint.sh +++ b/agent2/alpine/docker-entrypoint.sh @@ -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" diff --git a/agent2/ol/Dockerfile b/agent2/ol/Dockerfile index 8fab2cd7a..c071ef503 100644 --- a/agent2/ol/Dockerfile +++ b/agent2/ol/Dockerfile @@ -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 && \ diff --git a/agent2/ol/docker-entrypoint.sh b/agent2/ol/docker-entrypoint.sh index 1476e10a4..14229d7ab 100755 --- a/agent2/ol/docker-entrypoint.sh +++ b/agent2/ol/docker-entrypoint.sh @@ -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" diff --git a/agent2/rhel/Dockerfile b/agent2/rhel/Dockerfile index 7f9795989..2753fc5c9 100644 --- a/agent2/rhel/Dockerfile +++ b/agent2/rhel/Dockerfile @@ -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)" && \ diff --git a/agent2/rhel/docker-entrypoint.sh b/agent2/rhel/docker-entrypoint.sh index 1476e10a4..14229d7ab 100755 --- a/agent2/rhel/docker-entrypoint.sh +++ b/agent2/rhel/docker-entrypoint.sh @@ -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" diff --git a/agent2/ubuntu/Dockerfile b/agent2/ubuntu/Dockerfile index eae3713d2..0a102b5af 100644 --- a/agent2/ubuntu/Dockerfile +++ b/agent2/ubuntu/Dockerfile @@ -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 \ diff --git a/agent2/ubuntu/docker-entrypoint.sh b/agent2/ubuntu/docker-entrypoint.sh index 1476e10a4..14229d7ab 100755 --- a/agent2/ubuntu/docker-entrypoint.sh +++ b/agent2/ubuntu/docker-entrypoint.sh @@ -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"