I am getting duplicate key problems that are preventing zabbix from inserting into the database and causing the Server process to exit. It happens with the events and alerts tables. Server is Zabbix 1.4.5 on CentOS 5.1 x86_64, database is Postgres 8.3 on CentOS 5.1 x86_64
Errors look like this:
2941:20080512:092136 Query::insert into alerts (alertid, actionid,triggerid,userid,clock,mediatypeid,sendto ,subject,message,status,retries) values (5254,11,17207,3,1210598496,1,'[email protected]', 'Server SERVER is unreachable: ON','Server SERVER is unreachable: ON',0,0)
2941:20080512:092136 Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key value violates unique constraint "alerts_pkey"
How does zabbix create the alertid (and eventid) that is causing it to create duplicates and how on earth am I going to fix it?
Right now the only way we have to keep zabbix up and running is to have a loop that tries to launch it over and over as eventually zabbix will get past the problem.
Errors look like this:
2941:20080512:092136 Query::insert into alerts (alertid, actionid,triggerid,userid,clock,mediatypeid,sendto ,subject,message,status,retries) values (5254,11,17207,3,1210598496,1,'[email protected]', 'Server SERVER is unreachable: ON','Server SERVER is unreachable: ON',0,0)
2941:20080512:092136 Query failed:PGRES_FATAL_ERROR:ERROR: duplicate key value violates unique constraint "alerts_pkey"
How does zabbix create the alertid (and eventid) that is causing it to create duplicates and how on earth am I going to fix it?
Right now the only way we have to keep zabbix up and running is to have a loop that tries to launch it over and over as eventually zabbix will get past the problem.

Comment