Ad Widget

Collapse

aliens abducted server, now it is running in the future! how can i delete records?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slinx
    Junior Member
    • Feb 2010
    • 14

    #1

    aliens abducted server, now it is running in the future! how can i delete records?

    Hello, last week the clock on our zabbix server somehow got set two weeks in the future. It was running like this for a while before I noticed, so it has a lot of records from "the future" in the db. Now that I changed the clock back, it is not collecting any data, presumably because it thinks it's getting old data.

    How can I delete these "future" records from the database? We are running Zabbix 1.6 and mysql

    Thank you!

  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    There is no easy way. You will have to manage with DB manually.
    Zabbix | ex GUI developer

    Comment

    • slinx
      Junior Member
      • Feb 2010
      • 14

      #3
      Zabbix db help

      Originally posted by Aly
      There is no easy way. You will have to manage with DB manually.
      Yes, that is what I am asking. What fields do I need to edit?

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        In brief..

        1. I would strongly recommend to backup DB.
        2. Get zabbix sources from our SVN.
        3. In zabbix package, in create/schema/schema.sql file, find all lines of "t_time", those fields you will have to update.
        Zabbix | ex GUI developer

        Comment

        • slinx
          Junior Member
          • Feb 2010
          • 14

          #5
          Originally posted by Aly
          In brief..

          1. I would strongly recommend to backup DB.
          2. Get zabbix sources from our SVN.
          3. In zabbix package, in create/schema/schema.sql file, find all lines of "t_time", those fields you will have to update.
          Thanks Aly.

          I already made a backup.

          We've tried setting the "nextcheck" paramter in "items" to 0 to get it to start displaying new records, which seems to work, but there are still "future" records in there.

          I will look into what you've told me.

          Thanks for your help!

          Comment

          • slinx
            Junior Member
            • Feb 2010
            • 14

            #6
            Originally posted by Aly
            In brief..

            1. I would strongly recommend to backup DB.
            2. Get zabbix sources from our SVN.
            3. In zabbix package, in create/schema/schema.sql file, find all lines of "t_time", those fields you will have to update.
            There's no "schema.sql", do you mean "mysql.sql" (since we're using mysql)?

            Comment

            • slinx
              Junior Member
              • Feb 2010
              • 14

              #7
              Originally posted by slinx
              There's no "schema.sql", do you mean "mysql.sql" (since we're using mysql)?
              And there are no "t_time" fields to be found...

              Comment

              • Aly
                ZABBIX developer
                • May 2007
                • 1126

                #8
                svn://svn.zabbix.com/branches/1.8
                Zabbix | ex GUI developer

                Comment

                • slinx
                  Junior Member
                  • Feb 2010
                  • 14

                  #9
                  Originally posted by Aly
                  svn://svn.zabbix.com/branches/1.8
                  Thanks, but we're using 1.6...

                  I see there's a column "clock" in the "events" table - but how do I translate that to a date? Then I might be able to figure out where the "future" records are.

                  Comment

                  • Aly
                    ZABBIX developer
                    • May 2007
                    • 1126

                    #10
                    It's UNIX TIMESTAMP. http://en.wikipedia.org/wiki/Unix_time

                    PS: svn://svn.zabbix.com/branches/1.6 (it doesn't change methodology)
                    Zabbix | ex GUI developer

                    Comment

                    • slinx
                      Junior Member
                      • Feb 2010
                      • 14

                      #11
                      Originally posted by Aly
                      It's UNIX TIMESTAMP. http://en.wikipedia.org/wiki/Unix_time

                      PS: svn://svn.zabbix.com/branches/1.6 (it doesn't change methodology)
                      Oh duh, I should have known that - thanks for the tip... Now I found the events with future timestamps - is it safe to just delete them from the database?

                      Comment

                      Working...