Ad Widget

Collapse

Cannot execute discovery rules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wsdx
    Junior Member
    • Oct 2022
    • 3

    #1

    Cannot execute discovery rules

    Hello,

    I'm trying to execute several discovery rules on different hosts and with different templates but get the error:
    • Error in query [INSERT INTO task_check_now (taskid,itemid) VALUES ('80','89865')] [Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`task_check_now`, CONSTRAINT `c_task_check_now_1` FOREIGN KEY (`taskid`) REFERENCES `task_old` (`taskid`) ON DELETE CASCADE)]
    • SQL statement execution has failed "INSERT INTO task_check_now (taskid,itemid) VALUES ('80','89865')".
    I've checked - the last record in task_check_now has taskid 79 so 80 looks like to be ok to insert.

    Could you please help me with the trouble. Thank you.
  • wsdx
    Junior Member
    • Oct 2022
    • 3

    #2
    Nobody knows?

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      You need to fix the database schema. Find the reference schema in the zabbix distribution for your version of Zabbix server and DB server and check all the links and keys for the task_check_now table.

      Comment

      • wsdx
        Junior Member
        • Oct 2022
        • 3

        #4
        Thank you. I've found a discrepancy and fixed that.

        Comment

        Working...