Ad Widget

Collapse

Log to file in a docker container

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alga
    Junior Member
    • Aug 2021
    • 1

    #1

    Log to file in a docker container

    Hi all,

    my Zabbix environment is completely based on docker container, as database I use mariadb also in a docker container.
    The docker-entrypoint.sh from the server has no variable for log method, I can log only to the console:

    update_zbx_config() {
    echo "** Preparing Zabbix server configuration file"

    ZBX_CONFIG=$ZABBIX_ETC_DIR/zabbix_server.conf

    update_config_var $ZBX_CONFIG "ListenIP" "${ZBX_LISTENIP}"
    update_config_var $ZBX_CONFIG "ListenPort" "${ZBX_LISTENPORT}"

    update_config_var $ZBX_CONFIG "SourceIP" "${ZBX_SOURCEIP}"
    update_config_var $ZBX_CONFIG "LogType" "console"
    update_config_var $ZBX_CONFIG "LogFile"
    update_config_var $ZBX_CONFIG "LogFileSize"

    update_config_var $ZBX_CONFIG "PidFile"


    Can you please set for LogType, LogFile and LogSize also variables?
    Or rather give the possibility map the zabbix_server.conf from the host into container?

    Regards
    Wladimir
Working...