Ad Widget

Collapse

Zabbix 7.0 configuration.import method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • federicof
    Junior Member
    • Jul 2024
    • 2

    #1

    Zabbix 7.0 configuration.import method

    Good Morning Everyone.
    Our system engineers , set up a new Zabbix 7.0 Server for testing/developing.
    Currently we are using Zabbix 4.0 Server.
    I'm a ETL engineer , and years ago I developed a program that extracts datas from our internal db which calls zabbix API's configuration.import method and uploads datas to zabbix 4.0 server.

    We have over 10k hosts to import/update every day, this is why we use configuration.import.

    With the older configuration.import I couldimport all the informations like groups,template in only one batch.

    My job now is to adapt the old configuration.import method but for Zabbix 7.0.

    Unfortunately I can't understand how the new configuration.import works. The documentation is sparse and there is only one example online.

    Someone has any example or any suggestions?

    Thanks a lot in advance
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Can you be more specific about your problem in using that API? It looks quite straightforward and almost identical to 4.0 API.

    Markku

    Comment

    • federicof
      Junior Member
      • Jul 2024
      • 2

      #3
      Ok , so if you find it almost identical , I would give you a much detailed answer, maybe you could give me some suggestions.
      Unfortunately the only example in 4.0 configuration.import contains both host and template, the 7.0's example only template..

      1) In version 4.0, you could update host informations through the rules, you don't need uuid. You pass updated data , and with the correct rules , the API does all the work. In the new version I see the use of UUID. In doc , it's specified that if uuid is not passed but the host is created for the first time , api assigns uuid automatically. If I need to update some informations , how I retrieve the uuid? Do I need to know prior which host I will update and retrive the correct uuid and so generate a new json based on that uuid?


      2 ) Any of the json tags are changed ? groups to host_groups ? Are those the same ?

      3 ) Do you have any example of host import through configuration.import ?

      Thanks in advance for your time

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        Ok, now as I see it, you don't use configuration.import to add/update data that is exported with configuration.export but you are generating the import data yourself, right?

        Normally you would use the object-specific APIs to add/update/delete objects (that's how my automation engine works with a few thousand hosts) and use configuration.import+export only for, well, import and export, letting Zabbix to take care of the data formatting. That's my understanding of the API.

        If you think using configuration.import is still the way you want to continue, then maybe (for data update cases) using first configuration.export, then modifying the resulting data and finally importing it back would be a working way.

        Markku

        Comment

        Working...