Ad Widget

Collapse

Enter previous data manually

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thorstenmueller
    Junior Member
    • Jun 2007
    • 9

    #1

    Enter previous data manually

    Hello,

    i have a script which uses zabbix_sender to send daily spamcount to zabbix so that we can see a graph of our spamlevel.
    This works really fine, but i want to have data in zabbix before we used zabbix

    Is it possible to enter past data values in zabbix (maybe directly to the database).
    We need to enter the value and the date.

    If this is possible to do within the database, which table is right?

    Best regards
    Thorsten Müller
  • thorstenmueller
    Junior Member
    • Jun 2007
    • 9

    #2
    Hello,

    has nobody any kind of idea?

    Is the database schema published anywhere, so that i know,
    where to enter the values manually to the database.

    Regards
    Thorsten Müller

    Comment

    • thorstenmueller
      Junior Member
      • Jun 2007
      • 9

      #3
      Okay, i found the table with the relevant data.

      I entered all data by this way:
      INSERT INTO history_uint values (18945,1185140797,4264);
      ...

      This seems to work and in the web gui i see the "last 500 values" correctly,
      but the graph didn't change.

      How can i get the graph to be newly generated with all the values in the database table.

      Regards
      Thorsten

      Comment

      • swaterhouse
        Senior Member
        • Apr 2006
        • 268

        #4
        See my answer in the folowing thread:

        Comment

        • thorstenmueller
          Junior Member
          • Jun 2007
          • 9

          #5
          Thanks for your replay.

          But does this mean that i can not import my previous data to be displayed
          graphical.
          Because i don't really understand the syntax of the "trend" table and how to fill in my values.

          Best Regards
          Thorsten Müller

          Comment

          • dmz
            Junior Member
            • Jun 2005
            • 26

            #6
            Originally posted by thorstenmueller
            Thanks for your replay.

            But does this mean that i can not import my previous data to be displayed
            graphical.
            Because i don't really understand the syntax of the "trend" table and how to fill in my values.

            Best Regards
            Thorsten Müller
            I think the best way would be to write your own perl or other script that will update the trend & history files with the correct timestamp & other info. I don't see why you couldn't import it, it's just data and you have the timestamps from the old data.

            I don't think zabbix_send will work because you can't control the time and trend data, you'll have to write directly to database.

            Sorry but i don't know the format to insert it, but it's all in the code somewhere

            Good luck, and post if you do anything, a good import tool could be helpful.

            Comment

            • thorstenmueller
              Junior Member
              • Jun 2007
              • 9

              #7
              Hello,

              i found a "workaround" which works perfectly for us.

              I wrote a perlscript which parses a csv file with all the dates and values,
              sets the system time of our zabbix server and sends the value with zabbix_sender.

              After all values are sent the system time is syncd by ntp.

              So we have all our values in our database and the graph looks perfect.

              Thanks for all hints.

              Thorsten Müller

              Comment

              • swaterhouse
                Senior Member
                • Apr 2006
                • 268

                #8
                Thorsten,

                If possible you might want to post your script with instructions either to the forum or better yet to the wiki. You are not the first one who wanted to do this and you certainly wont be the last!

                Comment

                • thorstenmueller
                  Junior Member
                  • Jun 2007
                  • 9

                  #9
                  Hello swaterhouse,

                  of course.
                  Maybe you can see this as my little contribution to this great software.

                  I wrote my script down to the wiki, but because this is my first wiki article i'm not sure if it's in the correct place.

                  Please feel free to move it to the correct place.

                  http://www.zabbix.com/wiki/doku.php?...horstenmueller

                  Regards
                  Thorsten Müller

                  Comment

                  Working...