Ad Widget

Collapse

Slow import hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sterling94
    Junior Member
    • Sep 2018
    • 1

    #1

    Slow import hosts

    Hello,

    I used Zabbix 1.8.3 and I try to import 2800 hosts from the frontend with one template for each hosts. In the template, I have one item and one trigger. The import is very very slow, more than 30 minutes to import the hosts. Before, with Zabbix 1.6.9, the same import was less than 10 minutes. I also tried to use Zabcon, but I could not import a host with a template.

    Someone have an idea to help me to improve this import or maybe a script that I could used to automatically load this 2800 nodes in one command ?

    thanks
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    During add/delete hosts/templates many tables are locked and with default for example MySQL settings it is not even possible to read monitoring data already collected in zabbix DB.
    Export each host to separated json/xml file and then import all those hosts one by one using API.
    If it is initial import of the settings from existing database and you are going to move all hosts or almost all you should not be using export->import but just migrate database content to new location.
    If you are using MySQL as DB backend to unlock for read other tables you can add transaction-isolation=READ-COMMITTED.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    Working...