Ad Widget

Collapse

IS it possible to change zabbix server_id without loosing all historical data?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vitaly_il
    Junior Member
    • Apr 2008
    • 21

    #1

    IS it possible to change zabbix server_id without loosing all historical data?

    I changed server_id on my zabbix server (1.4.5-1) and converted DB after that.
    But when I started zabbix again it loose all historical data.
    Is there some way to preserve all historical data when I change server_id?

    thanks!
  • xs-
    Senior Member
    Zabbix Certified Specialist
    • Dec 2007
    • 393

    #2
    theoretically it's possible, but . . . you'd have to manually modify all *id fields in all tables.
    Not something you actually wanna do.

    Comment

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

      #3
      Probably you forgot to set NodeID in zabbix_server.conf, or the NodeID does not match the one set by -n <nodeid>.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • vitaly_il
        Junior Member
        • Apr 2008
        • 21

        #4
        I did it as following:
        1) changed node_id to 1
        vi /etc/zabbix/zabbix_server.conf

        2)cd /usr/sbin/
        [root@zabbix sbin]# ./zabbix_server -n 1 -c /etc/zabbix/zabbix_server.conf

        3) restarted zabbix

        as result I I see only new data...

        Comment

        • xs-
          Senior Member
          Zabbix Certified Specialist
          • Dec 2007
          • 393

          #5
          You can only modify a database (and afaik this only goes for unused, out-of-the-box, 'schema.sql+data.sql+images.sql') from no node-id to an initial node-id.
          You cant change the node-id on a zabbix server which already has been converted at some point (without manually converting all id and related fields).

          Comment

          • vitaly_il
            Junior Member
            • Apr 2008
            • 21

            #6
            >and afaik this only goes for unused, out-of-the->box, 'schema.sql+data.sql+images.sql'

            This is probably an explanation of my problem.
            But this is strange - what if I'm running a standalone Zabbix and some day want to add proxy server? it should be nice to have such possibility.

            Comment

            Working...