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

Please implement readCache(), writeCache(), updateCache() JS functions

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 7.0.0, 7.0.1rc1
    • Frontend (F), Server (S)
    • None

      I want to keep non-persistent, temporary data available between the items in host or host groups.

      Now we are developing more and more templates for cloud services or heavy-load solutions like AWS, Azure, GCP, Velocloud, Meraki, etc. All such services are monitored by HTTP via HTTP REST API requests. On small installations, this approach works fine, but problems arise when installations grow larger. The number of requests increases, resulting in numerous requests that DDoS the target service due to the limits of Zabbix's current architecture.

      How do we deal with this problem now?

      1. We try to improve code by splitting a single master item with solid code into fewer, smaller items with blocks of code from the original one to create different delays, reducing simultaneous requests. This helps slightly, but for very large installations, it still isn't a complete solution, although it improves the situation.
      2. We recommend tweaking the delays of the metric to retrieve data less frequently, reducing the number of requests done synthetically. This could be a solution, but there is a limit to how much you can increase the delay before it becomes critical.
      3. We decided to move the integration to a plugin. A plugin could:
        • Queue requests
        • Cache data and reuse it among other metrics

      However, the issues with a plugin are expensive development, complexity of support, and a time-consuming process.

      I'm not sure that we can control the queue of requests right now, but we can definitely work with the value cache.

      As far as I know, Zabbix already stores all the values in the ValueCache before writing them to the database, so we don't need to implement any new functionality here. We need to be able to use the Ductape JS Script items and preprocessing to:

      • Read the data written to the cache
      • Write new data to the cache
      • Update existing data stored in the cache
      • Control the access scopes of the stored data (to specific items, to all host items, to all group host items)

      Implementing this functionality would allow us to move to the next level of template building, greatly improve the performance of huge cloud templates by reducing requests and storing non-persistent data, provide flexibility with data flow, and reduce the amount of data required to be written to the database.

      I assume that existing ValueCache could be used for this purposes.

      Or a new one to:

      • isolate it from other values
      • control the volume of the cache
      • apply some additional params(encryption, own structure, ect.)

       

      Examples:

      Now New

        1. image-2024-07-10-01-52-43-367.png
          56 kB
          Alexander Bakaldin
        2. image-2024-07-10-01-52-57-314.png
          110 kB
          Alexander Bakaldin

            zabbix.dev Zabbix Development Team
            abiba Andrew Biba
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: