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

Screen couldn't include items from hosts on different nodes

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 1.8.16
    • API (A), Frontend (F)
    • Distributed monitoring

      We have distributed monitoring setup with 2 nodes — master (NodeID = 1) and child (NodeID = 2).

      If we create screen on master — it couldn't include any data from hosts on child node, because it searches data only on master node:

      Time:4.7E-5 SQL: begin
      Time:0.000314 SQL: SELECT si.screenitemid,si.* FROM screens_items si WHERE (si.screenitemid IN (100100000000011)) 
      Time:0.000274 SQL: SELECT g.graphid FROM graphs g WHERE ((g.graphid BETWEEN 100000000000000 AND 199999999999999)) AND (g.graphid IN (200200000000437)) 
      Time:5.7E-5 SQL: rollback
      

      and getting error:

      ERROR: Cannot update item
      [ CScreenItem::update ] Incorrect resource provided for screen item

      Should be something like that:

      Time:7.0E-5 SQL: begin
      Time:0.000919 SQL: SELECT si.screenitemid,si.* FROM screens_items si WHERE (si.screenitemid IN (100100000000011)) 
      Time:0.000516 SQL: SELECT g.graphid FROM graphs g WHERE ((g.graphid BETWEEN 100000000000000 AND 199999999999999) OR (g.graphid BETWEEN 200000000000000 AND 299999999999999)) AND (g.graphid IN (200200000000437))
      ...
      

      Example of fix for graphs:

      --- api/classes/class.cscreenitem.php.orig	2013-09-03 08:42:11.334842454 +0000
      +++ api/classes/class.cscreenitem.php	2013-09-03 08:40:38.637228553 +0000
      @@ -501,7 +501,8 @@
       			$result = CGraph::get(array(
       				'graphids' => $graphs,
       				'output' => API_OUTPUT_SHORTEN,
      -				'preservekeys' => true
      +				'preservekeys' => true,
      +				'nodeids' => true
       			));
       			foreach ($graphs as $id) {
       				if (!isset($result[$id])) {
      

            Unassigned Unassigned
            xeron Ivan Larionov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: