Ad Widget

Collapse

Migrated to TimescaleDB, occasional: duplicate key value violates unique constraint

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #1

    Migrated to TimescaleDB, occasional: duplicate key value violates unique constraint

    I just migrated to Timescaledb and now I'm getting an error like below every 10-20 minutes. Its always 337_337_history_log_pkey but the statement is always different.

    Anyone have a hint? It's strange that zabbix might be trying to insert the same log entry twice. I don't quite follow.

    ```
    ERROR: duplicate key value violates unique constraint "337_337_history_log_pkey"
    DETAIL: Key (itemid, clock, ns)=(99380, 1709699986, 877000000) already exists.
    STATEMENT: insert into history_log (itemid,clock,ns,timestamp,source,severity,value,l ogeventid) values (99380,1709699986,877000000,1709699957,'Schannel', 4,'The following fatal alert was received: 40.',36887);
    ```

    After thinking about this... I might have two items for collecting similar windows event logs for different purposes. I wonder if that somehow exposed this issue.
    Unofficial Zabbix Expert
    Blog, Corporate Site
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #2
    Looked at this a bit more. It turns out these are coming from older Windows servers collecting the system event log. In the actual windows event viewer, there are multiple logs with the same time stamp that appear identical which seems to match up with the error.
    Unofficial Zabbix Expert
    Blog, Corporate Site

    Comment

    Working...