Hello.
I'm testing zabbix 1.3.4 with postgresql 8.2.3 and php-pgsql-4.4.5.
Installation was successful except issue with php and bcmath (http://www.zabbix.com/forum/showthread.php?t=5619). But now I have strange problem. When I add new host to monitor (localhost in my case), things work fine for about a minute, and then something breakes. Messages like:
starts flooding zabbix_server.log
Restarting of zabbix_server doesn't help - it continues flooding after restart
Although I'm not familiar with php, I've found some similar code in include/db.inc.php file of GUI.
Seems that values are not calculated by higlited expressions
The most strange thing that it works in the beginning (for about a minute or less), as i can see on graphs - there are short lines there representing some data. You can see example image, attached. Do anybody have any suggestions about this issue?
I'm testing zabbix 1.3.4 with postgresql 8.2.3 and php-pgsql-4.4.5.
Installation was successful except issue with php and bcmath (http://www.zabbix.com/forum/showthread.php?t=5619). But now I have strange problem. When I add new host to monitor (localhost in my case), things work fine for about a minute, and then something breakes. Messages like:
Code:
16648:20070328:135347 Query::insert into ids (nodeid,table_name,field_name,nextid) values (0,'events'
,'eventid',)
16648:20070328:135347 Query failed:PGRES_FATAL_ERROR:ERROR: syntax error at or near ")"
LINE 1: ...table_name,field_name,nextid) values (0,'events','eventid',)
^
Restarting of zabbix_server doesn't help - it continues flooding after restart
Although I'm not familiar with php, I've found some similar code in include/db.inc.php file of GUI.
Code:
function get_dbid($table,$field)
{
global $ZBX_CURNODEID;
if(!isset($ZBX_CURNODEID)) init_nodes();
/* $row=DBfetch(DBselect("select max($field) as id from $table where ".DBid2nodeid($field)." in (".$ZBX_CURNODEID.")"));
if($row && !is_null($row["id"]))
{
return bcadd($row["id"],1);
}
else
{
return bcadd(bcmul($ZBX_CURNODEID,"100000000000000"),1);
}*/
$found = false;
do
{
$row = DBfetch(DBselect("select nextid from ids where nodeid=$ZBX_CURNODEID and table_name='$table' and field_name='$field'"));
if(!$row || is_null($row["nextid"]))
{
$row=DBfetch(DBselect("select max($field) as id from $table where ".DBid2nodeid($field)." in (".$ZBX_CURNODEID.")"));
if(!$row || is_null($row["id"]))
{
[COLOR=Red] DBexecute("insert into ids (nodeid,table_name,field_name,nextid) values ($ZBX_CURNODEID,'$table','$field',".bcadd(bcmul($ZBX_CURNODEID,"100000000000000"),1).")");[/COLOR]
}
else
{
[COLOR=Red]DBexecute("insert into ids (nodeid,table_name,field_name,nextid) values ($ZBX_CURNODEID,'$table','$field',".$row["id"].")");[/COLOR]
}
continue;
}
else
{
$ret1 = $row["nextid"];
DBexecute("update ids set nextid=nextid+1 where nodeid=$ZBX_CURNODEID and table_name='$table' and field_name='$field'");
$row = DBfetch(DBselect("select nextid from ids where nodeid=$ZBX_CURNODEID and table_name='$table' and field_name='$field'"));
if(!$row || is_null($row["nextid"]))
{
/* Should never be here */
continue;
}
else
{
$ret2 = $row["nextid"];
if(bccomp(bcadd($ret1,1),$ret2) ==0)
{
$found = true;
}
}
}
}
while(false == $found);
return $ret2;
}
The most strange thing that it works in the beginning (for about a minute or less), as i can see on graphs - there are short lines there representing some data. You can see example image, attached. Do anybody have any suggestions about this issue?
Comment