Ad Widget

Collapse

Bug in function 'CHostsInfo'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • exkg
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified Specialist
    • Mar 2007
    • 718

    #1

    Bug in function 'CHostsInfo'

    Hi,


    In 1.5.3 we have a bug in hosts status (include/classes/chostsinfo.mod.php), the hosts (avail,not avail and uncn) have a stranger count.



    []s,
    Luciano
    --
    Luciano Alves
    www.zabbix.com
    Brazil | México | Argentina | Colômbia | Chile
    Zabbix Performance Tuning
  • exkg
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified Specialist
    • Mar 2007
    • 718

    #2
    Bug in function 'CHostsInfo' (SOLVED)

    Hi,


    In function 'function BodyToString()' (around line 53) we have this:

    ===
    $db_host_cnt = DBselect('SELECT COUNT(*) as cnt '.
    ' FROM hosts h, hosts_groups hg'.
    ' WHERE h.available='.HOST_AVAILABLE_TRUE.
    ' AND hg.groupid IN ('.$accessible_groups.') '.$cond);
    ===


    We change:

    ===
    $db_host_cnt = DBselect('SELECT COUNT(*) as cnt '.
    ' FROM hosts h LEFT JOIN hosts_groups hg ON hg.hostid = h.hostid'.
    ' WHERE h.available='.HOST_AVAILABLE_TRUE.
    ' AND hg.groupid IN ('.$accessible_groups.') '.$cond);
    ===

    Its OK now.

    Aly, what u think about put the 'hosts count total for group' in this display ? To managers know the total of servers in each group.




    []s,
    Luciano
    --
    Luciano Alves
    www.zabbix.com
    Brazil | México | Argentina | Colômbia | Chile
    Zabbix Performance Tuning

    Comment

    • Aly
      ZABBIX developer
      • May 2007
      • 1126

      #3
      The fix is slightly different Putting a total value is OK, I'll commit it to svn in near future.
      Zabbix | ex GUI developer

      Comment

      Working...