• Sprint 96 (Jan 2023), Sprint 97 (Feb 2023), Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023), Sprint 101 (Jun 2023)
    • 10

      We need to introduce a new value type (aka Type of information) Binary. It must be stored as a blob in a new table history_binary. The first (and the only, for now) use for this type is to store screenshots from browser tests.

      It's understood that introducing a new value type is a lot of work in all components so we need to reduce the scope of the changes to as narrow as possible. We also need to keep the number of design decisions to the minimum. For instance, rather than figuring out how triggers should work with the Binary type, we can state that triggers do not support this type and thus can be kept off value cache.

      Other functionality we can now sacrifice in the name of narrow scope is preprocessing and support for item types other than Dependent (thus, no need to support it in agents, SNMP, sender, etc). In the UI/API we must also figure how to get away with as few changes as possible (e.g. Items form apparently needs to be changed, but no need to invent how to get and display history in Latest data, just string "binary" is enough).

      Please research this change request and:

      • Evaluate the impact and list all components/areas that need to be changed
      • Estimate development efforts
      • List limitations that are worth introducing to limit the scope

        1. 7F.png
          7F.png
          6 kB
        2. CX.jpg
          CX.jpg
          170 kB
        3. def1.png
          def1.png
          81 kB
        4. def2.png
          def2.png
          87 kB
        5. example1.png
          example1.png
          80 kB
        6. image-2023-02-09-18-08-24-494.png
          image-2023-02-09-18-08-24-494.png
          296 kB
        7. image-2023-03-22-18-07-54-272.png
          image-2023-03-22-18-07-54-272.png
          39 kB
        8. remove_ITEM_VALUE_TYPE_MAX_patch.txt
          14 kB
        9. screenshot-1.png
          screenshot-1.png
          22 kB
        10. screenshot-2.png
          screenshot-2.png
          9 kB
        11. Screenshot 2023-02-20 at 18.41.54.png
          Screenshot 2023-02-20 at 18.41.54.png
          256 kB
        12. Screenshot 2023-04-20 at 14.18.08.png
          Screenshot 2023-04-20 at 14.18.08.png
          683 kB
        13. screenshot-3.png
          screenshot-3.png
          15 kB
        14. zabbix_wcache_values_bin.patch.txt
          2 kB

          [ZBXNEXT-8211] New item value type Binary

          Available in versions:

          Artjoms Rimdjonoks added a comment - Available in versions: pre-7.0.0alpha1 7e14946a3b4

          Martins Valkovskis added a comment - - edited

          Updated documentation ('binary' value type added):

          API documentation:

          Martins Valkovskis added a comment - - edited Updated documentation ('binary' value type added): Item configuration Host export Template export Newline-delimited JSON export protocol Restrictions on binary item use mentioned for Triggers , Plain text widget , Item value widget , Top hosts widget API documentation: history.get Item object Item prototype object

          I would like to draw attention to loadable module binary compatibility issue introduced with this feature.

          The problem is very similar to ZBX-10428. A new field char *bin was introduced in AGENT_RESULT structure. As a result an offset of int type field has changed and it made SET_*_RESULT()/ZBX_ISSET_*() macros in different versions of Zabbix incompatible with each other. At the same time ZBX_MODULE_API_VERSION remained unchanged.

          Fortunately, unlike ZBX-10428, the issue was caught before the major release and you still have an opportunity to restore compatibility or bump API version before the release.

          Of course, module authors would appreciate restoring compatibility. For AGENT_RESULT it can be easily achieved by moving new char *bin field to the end of struct, hence the offset of int type will not be affected. Also ZBX_HISTORY_WRITE_CBS needs to be restored to its original shape. If needed, new history_bin_cb field can be introduced in a whole new ZBX_HISTORY_WRITE_CBS_v2 returned by whole new zbx_module_history_write_cbs_v2().

          Glebs Ivanovskis added a comment - I would like to draw attention to loadable module binary compatibility issue introduced with this feature. The problem is very similar to ZBX-10428 . A new field char *bin was introduced in AGENT_RESULT structure. As a result an offset of int type field has changed and it made SET_*_RESULT() / ZBX_ISSET_*() macros in different versions of Zabbix incompatible with each other. At the same time ZBX_MODULE_API_VERSION remained unchanged. Fortunately, unlike ZBX-10428 , the issue was caught before the major release and you still have an opportunity to restore compatibility or bump API version before the release. Of course, module authors would appreciate restoring compatibility. For AGENT_RESULT it can be easily achieved by moving new char *bin field to the end of struct , hence the offset of int type will not be affected. Also ZBX_HISTORY_WRITE_CBS needs to be restored to its original shape. If needed, new history_bin_cb field can be introduced in a whole new ZBX_HISTORY_WRITE_CBS_v2 returned by whole new zbx_module_history_write_cbs_v2() .

          Andris Mednis added a comment - - edited

          Thanks, cyclone, for reporting this!

          Andris Mednis added a comment - - edited Thanks, cyclone , for reporting this!

          The module problem will be solved in ZBX-23672.

          Alex Kalimulin added a comment - The module problem will be solved in ZBX-23672 .

            arimdjonoks Artjoms Rimdjonoks
            Kalimulin Alex Kalimulin
            Team D
            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: