Ad Widget

Collapse

Database Integrity check

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoelG
    Member
    • Aug 2007
    • 32

    #1

    Database Integrity check

    A utility to verify/correct internal zabbix database referential integrity. I think I know how it happened, but I have been unable to correct the problem. I get a series of messages in the log:

    Code:
     23873:20080305:155414 Expression [{30870}=0] cannot be evaluated [Unable to get value for functionid [30870]]
     23873:20080305:155414 Expression [({30525}<1)&({30524}<1)] cannot be evaluated [Unable to get value for functionid [30525]]
     23873:20080305:155622 Expression [{30862}=0] cannot be evaluated [Unable to get value for functionid [30862]]
     23873:20080305:155653 Expression [{30860}=0] cannot be evaluated [Unable to get value for functionid [30860]]
    If there was a utility that scanned the database to ensure the basic relationships were intact, and then report/correct any that were incomplete, this would help to make the product a little more robust.

    For example, making sure that all hosts/items/triggers/templates/alerts were complete, reporting any orphans (shouldn't be any), and fixing or making any recommendation on how to fix would be very helpful. The database schema is not that large or complex that this would be difficult to implement. It would also go a long way to documenting the schema that many have asked about here in the forums.
  • maruscya
    Senior Member
    Zabbix Certified Specialist
    • Jul 2007
    • 129

    #2
    Try this ... http://www.zabbix.com/forum/showthre...ble+functionid

    Comment

    • JoelG
      Member
      • Aug 2007
      • 32

      #3
      maybe

      I have tried this solution, I had many more records updated (2K-3K) then I expected.

      Of course, since this change, I have had Zabbix server shut down twice, during housekeeping process, so I am not sure that this is the best solution.

      I still think a database referential integrity check program would be a nice feature. Verifying that all relationships are valid can go a long way to helping to debug any problems. Just checking templates, host, items, triggers, alerts would be a big step, there is no need (at this point) to scan the large tables (history*).

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        FYI The "Unable to get value..." message may or may not indicate referential integrity problem. I am pretty sure there is no actual problem here.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        Working...