Ad Widget

Collapse

Duplicate keys crashing Zabbix Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SMB
    Member
    • Sep 2007
    • 30

    #1

    Duplicate keys crashing Zabbix Server

    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.
  • vinny
    Senior Member
    • Jan 2008
    • 145

    #2
    hi smb,
    go to your zabbix db :
    select * from ids where table_name = 'alerts';

    then you ll have to update the field "nextid"

    vinny
    -------
    Zabbix 1.8.3, 1200+ Hosts, 40 000+ Items...zabbix's everywhere

    Comment

    Working...