Ad Widget

Collapse

Zabbix 1.5.5 Trunk: 5973 - Zabbix_Server -"count" Function of type Item Type Text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5.5 Trunk: 5973 - Zabbix_Server -"count" Function of type Item Type Text

    Zabbix 1.5.5 Trunk: 5973 - Zabbix_Server -"count" Function of type Item Type Text

    Not sure if count is suppose to work with item types of "text" but the code in libs/zbxserver/evalfunc.c does not recognize table_txt.

    Code:
            switch(item->value_type)
            {
                    case ITEM_VALUE_TYPE_FLOAT:     table = table_float;    break;
                    case ITEM_VALUE_TYPE_UINT64:    table = table_ui64;     break;
                    case ITEM_VALUE_TYPE_LOG:       table = table_log;      break;
                    case ITEM_VALUE_TYPE_STR:       table = table_str;      break;
                    default:
                            return FAIL;
            }
    Also missing SQL part of code for select count for type text

    Code:
                    {
                            result = DBselect("select count(value) from history_str where clock>%d and value like '%s' and itemid=" ZBX_FS_UI64,
                                    now-atoi(period),
                                    cmp_esc,
                                    item->itemid);
                    }
            }
    Last edited by Palmertree; 11-09-2008, 05:39.
Working...