Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12117

History export module loaded in zabbix_proxy always return 0 values

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.2.11rc1, 4.0 (plan)
    • 3.2.4, 3.2.5
    • Proxy (P)
    • None
    • Team C
    • Sprint 18, Sprint 19, Sprint 20, Sprint 21
    • 0.5

      Hi,

      The following code of loadable module return always 0 values (0.0000 for float) if module loaded with zabbix_proxy.
      Same module with zabbix_server prints non zero history values.

      .itemid and .clock has correct values in both cases.

      static void     cb_history_float_cb(const ZBX_HISTORY_FLOAT *history, int history_num)
      {
              int     i;
      
              for (i = 0; i < history_num; i++)
              {
          zabbix_log(LOG_LEVEL_INFORMATION, "float %d: %f %d", history[i].itemid, history[i].value, history[i].clock);
              }
      }
      
      static void     cb_history_integer_cb(const ZBX_HISTORY_INTEGER *history, int history_num)
      {
              int     i;
      
              for (i = 0; i < history_num; i++)
              {
                zabbix_log(LOG_LEVEL_INFORMATION, "int %d: %u %d", history[i].itemid, history[i].value, history[i].clock);
              }
      }
      
      ZBX_HISTORY_WRITE_CBS   zbx_module_history_write_cbs(void)
      {
              static ZBX_HISTORY_WRITE_CBS    cb_callbacks =
              {
                      cb_history_float_cb,
                      cb_history_integer_cb,
          NULL, NULL, NULL
              };
      
              return cb_callbacks;
      }
      

            glebs.ivanovskis Glebs Ivanovskis (Inactive)
            cm2k05@gmail.com Sergey Ignatov
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: