PDA

View Full Version : Zabbix 1.5.3 - Screens - Plain Text


Palmertree
17-06-2008, 16:07
Zabbix 1.5.3 - Screens - Plain Text

Problem with refresh of items on the following screen type:

Screen cell configuration
Type: Plain Text
Item Type: Zabbix Agent (Active) Log[Path, "Pattern"]

Does not refresh but graphs will on the same screen.

I am going to dig around in the code to see if I can find anything.

DoubleP
17-06-2008, 16:42
I am having that same problem...

Palmertree
18-06-2008, 13:39
I'm still looking into this to see if I can find anything. :D

Palmertree
20-06-2008, 12:48
Found the problem. The item key was changed from text type to log type and log type was not supported in the function get_screen_plaintext. Added what is in red and everything works like a champ. :D

screens.inc.php
# Show screen cell containing plain text values

function get_screen_plaintext($itemid,$elements){



if($itemid == 0){

$table = new CTableInfo(S_ITEM_NOT_EXISTS);

$table->SetHeader(array(S_TIMESTAMP,S_ITEM));

return $table;

}



global $DB;



$item=get_item_by_itemid($itemid);

switch($item["value_type"])

{

case ITEM_VALUE_TYPE_FLOAT: $history_table = "history"; break;

case ITEM_VALUE_TYPE_UINT64: $history_table = "history_uint"; break;

case ITEM_VALUE_TYPE_TEXT: $history_table = "history_text"; break;

case ITEM_VALUE_TYPE_LOG: $history_table = "history_log"; break;

default: $history_table = "history_str"; break;

Aly
20-06-2008, 13:30
Thank You. Fixed.