Distributed environment, group dropdown broken

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Critical
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Linux 2.6, CentOS 5

      As explained in summary. In distrubuted environments the host groups dropdown menu's seem broken. Following query is performed from out the function get_viewed_groups

      Following lines trigger the problem
      851 if(ZBX_DISTRIBUTED)

      { 852 $def_sql['select'][] = 'n.name'; 853 $def_sql['from'][] = 'nodes n'; 854 $def_sql['where'][] = 'n.nodeid='.DBid2nodeid('g.groupid'); 855 $def_sql['order'][] = 'n.name'; 856 }

      As the hostgroup isretrieved as g.name and node names as n.name following happends when you get the result back from mysql:

      ---------------------------------------------------------------

      groupid name name

      ---------------------------------------------------------------

      100100000000023 Hosts - ALL NODE1

      As you can see the first column name is automatically overwriten by the second name

      I was able to fix it for now with changing the line to

      852 $def_sql['select'][] = 'n.name as nodename';

            Assignee:
            Alexei Vladishev
            Reporter:
            Rick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: