Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-8186

Build zabbix-proxy-sqlite3 docker image without using shared memory for MikroTik

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 6.0.12
    • Proxy (P)
    • MikroTik RouterOS 7.6

      Mikrotik in version 7 supports Docker. It would be great to run a zabbix proxy on a $79 router.

      I tried running "zabbix/zabbix-proxy-sqlite3:alpine-6.0-latest" docker image on router MikroTik hAP ac².

      The container starts without any problem but finally crashes with this error:

      "zabbix_proxy [2]: cannot create locks: cannot allocate shared memory for locks"

      I looked it up, and it's a MikroTik "bug/missing feature": https://forum.mikrotik.com/viewtopic.php?t=178342#p886791

      Shared Memory (SHM) is not enabled and (/dev/shm) is missing

      Link to the official documentation: https://help.mikrotik.com/docs/display/ROS/Container

      Is it possible to create zabbix-proxy-sqlite3 docker image without using shared memory?

       

      [mikrotik] > /disk/format-drive 0 file-system=ext4 partition-table=yes label=flashdrive
        formatted: 100%
      
      [mikrotik] > /disk/print
      Flags: M, r - RAID-MEMBER; p - PARTITION
      Columns: SLOT, MODEL, SERIAL, INTERFACE, NAME, FS, LABEL
      #    SLOT        MODEL                  SERIAL                 INTERFACE         NAME   FS    LABEL
      0    usb1         USB  SanDisk 3.2Gen1  050.....7bd7  USB 2.10 480Mbps       1 Mp usb1-part1                                                                                                                                                                     disk3  ext4  flashdrive
      [mikrotik] > 
      
      [mikrotik] > /interface/veth/add name=veth1 address=10.70.3.2/24 gateway=10.70.3.1
      [mikrotik] > /interface/bridge/add name=dockers
      [mikrotik] > /ip/address/add address=10.70.3.1/24 interface=dockers
      [mikrotik] > /interface/bridge/port add bridge=dockers interface=veth1
      [mikrotik] > /ip/firewall/nat/add chain=srcnat action=masquerade src-address=10.70.3.0/24
      
      [mikrotik] > /container/config/set ram-high=32M
      
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_HOSTNAME value="mikrotik.example.net"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_SERVER_HOST value="zabbix.example.net"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_TIMEOUT value="15"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_STARTPOLLERS value="2"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_STARTTRAPPERS value="1"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_CONFIGFREQUENCY value="30"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_TLSPSKIDENTITY value="mikrotik.example.net"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_TLSPSKFILE value="/etc/zabbix/zabbix_proxy.psk"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_TLSCONNECT value="psk"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_TLSACCEPT value="psk"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_CACHESIZE value="2M"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_HISTORYCACHESIZE value="4M"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_HISTORYINDEXCACHESIZE value="2M"
      [mikrotik] > /container/envs/add name=zabbixproxy_envs key=ZBX_VMWARECACHESIZE value="1M"
      
      [mikrotik] > /container/mounts/add name=zabbixproxy_psk src=disk3/zabbixproxy.psk dst=/etc/zabbix/zabbix_proxy.psk
      
      [mikrotik] > /container/config/set registry-url=https://registry-1.docker.io tmpdir=disk3/pull
      
      [mikrotik] > /container/add remote-image="zabbix/zabbix-proxy-sqlite3:alpine-6.0-latest" interface=veth1 root-dir="disk3/zabbixproxy" mounts=zabbixproxy_psk envlist=zabbixproxy_envs hostname="mikrotik.example.net"
      
      [mikrotik] > /container/print
       0 name="40ecd139-4104-46b4-8daf-05824001ef89" tag="zabbix/zabbix-proxy-sqlite3:alpine-6.0-latest" os="linux" arch="arm" interface=veth1 envlist="zabbixproxy_envs" root-dir=disk3/zabbixproxy
         mounts=zabbixproxy_psk dns="" hostname="mikrotik.example.net" workdir="/var/lib/zabbix" logging=yes status=stopped
      [mikrotik] > 
       

       

            wiper Andris Zeila
            tuxmartin Martin Vancl
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: