Ad Widget

Collapse

Adding Widgets in Zabbix 6.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tom_minerd
    Junior Member
    • Jun 2022
    • 6

    #1

    Adding Widgets in Zabbix 6.4

    Following the guide for adding a new Widget via the /zabbix/ui/modules directory, when I scan the directory, I do not see the new module in the list. I'm not sure what I'm doing wrong but I would assume it would work.

    I'm using the info on this page: https://www.zabbix.com/documentation...torials/widget. Any help would be appreciated.
  • valeryf
    Junior Member
    • Jun 2022
    • 10

    #2
    Hi tom,

    same issue here. Installed a 6.0 LTS on Debian 11 and having the front zabbix ui in /usr/share/zabbix. Adding my widgets in /usr/share/zabbix/modules where i guess they should be... and same effect : No modules found at scan.

    Part of the solution may be located in /app/controllers/CControllerModuleScan.php. Hacking a bit there should reveal me where actually the scan is performed, controlling the real value of APP::getRootDir()

    Real dir scan is perfomed at line §59 of this file.

    Actually having two different implementations for this file, using APP::getRootDir() (local dev) and other using APP::ModuleManager()->getModulesDir() that seems more recent.
    Last edited by valeryf; 14-03-2023, 11:27. Reason: Exploration Update

    Comment

    • valeryf
      Junior Member
      • Jun 2022
      • 10

      #3
      Could determine in my case several issues :

      A single Json error in manifest.json breaks scan without notice.

      On a very general behaviour : any fault in manifest processing will lead to an unexplicited error (silent). This is due to the implementation of ModuleManager::LoadManifest() which silently ignores anything that do not cope with internal tests.

      Second issue : my manifest was in version 2.0 as required by tutorial. My 6.0 version only accepts 1.0, again silently ignoring.

      If you want to get some usefull debug info, hard trap any "return null;" statement in this function, and explicit it with a die("Something clear")... It helps

      Now the point i am :

      Modules are detected correctly, and possible to enable... Enabled ... no effect on dashboard widget choice.... still to dig inside...

      Comment

      • tom_minerd
        Junior Member
        • Jun 2022
        • 6

        #4
        So it looks like the tutorial needs to be corrected. When I put my directory and files in the location you suggested, it just worked! No additional troubleshooting was needed. Thanks valeryf!

        Comment

        • m.lassing@net4it.nl
          Junior Member
          • Apr 2023
          • 1

          #5
          Using Zabbix 6.0.2

          CModuleManager loads modules from module path in my case /usr/share/zabbix/modules

          Found the same issue
          const MAX_MANIFEST_VERSION = 1;

          // Check manifest version.
          if (!is_numeric($manifest['manifest_version']) || $manifest['manifest_version'] > self::MAX_MANIFEST_VERSION) {
          return null;
          }

          So what's the suggested location to put the files to make this work ?

          Comment

          • skocdopolet
            Junior Member
            • Feb 2022
            • 5

            #6
            Hello Tom,

            implementing widgets as frontend modules for Zabbix before 6.4 is possible, but there are some difficulties. On Zabbix 6.4 - there is new "framework" for widgets and is relatively easy.

            We are developing custom widgets for our customers and we have widgets working in 6.0, 6.2 and in 6.4 too... If you need help with something, contact me.

            Regards Tomas S.

            Comment

            • garymorozov
              Junior Member
              • Apr 2021
              • 2

              #7
              Originally posted by skocdopolet
              Hello Tom,

              implementing widgets as frontend modules for Zabbix before 6.4 is possible, but there are some difficulties. On Zabbix 6.4 - there is new "framework" for widgets and is relatively easy.

              We are developing custom widgets for our customers and we have widgets working in 6.0, 6.2 and in 6.4 too... If you need help with something, contact me.

              Regards Tomas S.
              Ihave the same problem on Zabbiz 6.4.7 How can I add new ui module?

              Comment

              • anik3tMatodkar
                Junior Member
                • Dec 2023
                • 1

                #8
                Can anyone guide me adding gauge widget in zabbix 6.0 , as tutorial provided for 6.4 v is not working in zabbix 6
                ​​​.0 . I had change manifest.json version to 1 & was able to add the module in zabbix but it is not reflecting in dashboards for some reason .

                Comment

                Working...