Ad Widget

Collapse

Zabbix proxy: init-command

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SimpleRezo
    Junior Member
    • Sep 2020
    • 19

    #1

    Zabbix proxy: init-command

    Hi

    We are using zabbix_proxy docker image.

    I'm trying to setup an initial command on mysql connection, for changing wait_timeout and interactive_timeout (because those settings are low (300) on used mysql server):
    Code:
    SET SESSION wait_timeout=86400; SET SESSION interactive_timeout=86400;
    Unfortunely I cannot find a way to do it. I tried with /etc/my.cnf.d/zabbix.cnf, but if I set up into [client] section, mysqladmin is complaining about it:
    Code:
    zabbix_proxy    | mysqladmin: unknown variable 'init-command=SET SESSION wait_timeout=86400; SET SESSION interactive_timeout=86400;'
    zabbix_proxy    | **** MySQL server is not available. Waiting 5 seconds...
    zabbix_proxy    | mysqladmin: unknown variable 'init-command=SET SESSION wait_timeout=86400; SET SESSION interactive_timeout=86400;'
    zabbix_proxy    | **** MySQL server is not available. Waiting 5 seconds...
    ​
    First, I don't know if zabbix_proxy is supporting this "init-command" option (I hope so), and if it's the case, how can I setup this.
    I'm thinking about client group ("[client-XXX]" section in .cnf file) but I cannot find an option to define it in proxy configuration.

    Thanks for your help!
Working...