Ad Widget

Collapse

Zabbix 5.0.19 on postgresql post alert message unsuccessfully

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gdpglc
    Junior Member
    • Jun 2024
    • 4

    #1

    Zabbix 5.0.19 on postgresql post alert message unsuccessfully

    Zabbix 5.0.19 on postgresql, alert message aren't posted and found error in server.log: PGRES_FATAL_ERROR: ERROR: duplicate key value violates unique constraint "alerts_pkey"

    I think it may be a bug. In order to make alert action work, I remove "alerts_pkey" constraint in talbe "alerts", Then alert message posted successfully, but I found new errors in server.log, more primary key conflicts, eg:

    events_pkey, escalations_pkey, event_recovery_pkey etc.

    How to solve the problem? Does the zabbix on postgresql have bug?
  • gdpglc
    Junior Member
    • Jun 2024
    • 4

    #2
    Anyone know how to solve the problem? Do I have to give up postgresql?

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      It is not bug, its normal PG error message, when application is trying to insert data, that is already present, but primary key cannot be duplicate... Here it seems, that it is trying to insert a record to alerts table with alertid, that is already present. Why exactly this happens, I cannot comment.. Things happen sometimes... But GIYF... Start for example from here .. https://stackoverflow.com/questions/...que-constraint There are some further links to articles etc...

      Comment


      • gdpglc
        gdpglc commented
        Editing a comment
        Our host would break down silently, because the zabbix don't post alert emails to monitor administrator. It's a serious problem!
    • gdpglc
      Junior Member
      • Jun 2024
      • 4

      #4
      I have found the reason caused the problem. My associate make a mistake to start two zabbix server base on one postgresql instance. It make zabbix producing duplicate table primary keys.
      Thanks guys , I hope the information is useful for you.

      Comment

      Working...