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

NVPS calculation logic of frontend (PHP) is not syncing with server (C)

    Details

      Description

      It seems that NVPS calculation logic of frontend is not syncing with server.

      Here is the current svn code in frontends/php/include/func.inc.php:

      // comments: !!! Don't forget sync code with C !!!
      $row = DBfetch(DBselect(
      'SELECT SUM(1.0/i.delay) AS qps'.
      ' FROM items i,hosts h'.
      ' WHERE i.status='.ITEM_STATUS_ACTIVE.
      ' AND i.hostid=h.hostid'.
      ' AND h.status='.HOST_STATUS_MONITORED.
      ' AND i.delay<>0'
      ));

      In above code, it doesn't care the value of flags column in items table.
      It means that items.flags = ZBX_FLAG_DISCOVERY_PROTOTYPE is included in calculation and distort NVPS value.

      Trapper just ignores ZBX_FLAG_DISCOVERY_PROTOTYPE when checking active items in C code, so need to
      do same thing in frontend, doesn't it?

      I've attached a patch to fix this glitch between C and PHP code for svn HEAD.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kenhys HAYASHI Kentaro
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: