Ad Widget

Collapse

Create custom widget for use with zabbix/zabbix-web-nginx-pgsql docker image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • preisinger
    Junior Member
    • May 2024
    • 3

    #1

    Create custom widget for use with zabbix/zabbix-web-nginx-pgsql docker image

    In my compose file i have a zabbix-web section

    HTML Code:
     zabbix-web:
        # https://hub.docker.com/r/zabbix/zabbix-web-nginx-pgsql
        image: zabbix/zabbix-web-nginx-pgsql:${ZBX_IMAGE_TAG}
        restart: always
        network_mode: "host"
        environment:
          ZBX_SERVER_HOST: ${ZBX_SERVER_HOST}
          DB_SERVER_HOST: ${DB_SERVER_HOST}
          DB_SERVER_PORT: ${DB_SERVER_PORT}
          POSTGRES_USER: ${ZABBIX_DB_USER}
          POSTGRES_PASSWORD: ${ZABBIX_DB_PASSWORD}
          POSTGRES_DB: ${ZABBIX_DB_NAME}
        volumes:
          - ./volumes/zabbix-web/etc/ssl/nginx:/etc/ssl/nginx:ro
          - ./volumes/zabbix-web/etc/zabbix/web/certs:/etc/zabbix/web/certs:ro
          # - ./volumes/zabbix-web/usr/share/zabbix/modules:/usr/share/zabbix/modules
          # - ./volumes/zabbix-web/usr/share/zabbix/widgets:/usr/share/zabbix/widgets
    If i uncomment those two volumes above, place my custom widget in the widgets directory and do a "Scan Directory" zabbix does find the widget but then all the other widgets are gone, I just see mine. To undo what I just did I have to comment those two volume mappings, scan the directory then enable all the original widgets that are found again.

    How do I add a custom widget to a zabbix docker container implementation? I seem to be missing something.

    Thanks,

    Paul
  • preisinger
    Junior Member
    • May 2024
    • 3

    #2
    After further reading I noticed that cusotm widgets need to go in the modules directory not widgets. I uncommented the modules volume, placed the widge in there, re-scanned and t worked.

    Comment

    Working...