Ad Widget

Collapse

bulkloader and hostgroup issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jbothe
    Junior Member
    • Sep 2006
    • 10

    #1

    bulkloader and hostgroup issue

    Hello. I am attempting to import a list of systems (~ 500) into zabbix using the bulkloader, however, when testing with 4-5 systems, I am experiencing some issues.

    Here's an example of the csv:
    Code:
    HOST,VS-001,10.11.0.2,10050,Monitored,Hwnode_linux_t,monitor.domain.com,Hardware_Nodes
    HOST,VS-002,10.11.0.3,10050,Monitored,Hwnode_linux_t,monitor.domain.com,Hardware_Nodes
    Hwnode_linux_t is the template, Hardware_Nodes, the Host Group.

    After importing a list of 4 systems, the first three are added to a new Host Group called "Hardware_Nodes". It was my expectation that they would be added to the current group named the exact same thing.

    All servers are properly added to the "Hwnode_linux_t template".

    When I check the zabbix DB, I see the following:
    Code:
    mysql> select * from groups;
    +---------+-----------------+
    | groupid | name            |
    +---------+-----------------+
     |     13 | Hardware_Nodes
    |       4 | Hardware_Nodes  |
    |       1 | Templates       |
    +---------+-----------------+
    3 rows in set (0.00 sec)
    
    mysql> select * from groups where name like 'Hardware_Nodes';
    +---------+----------------+
    | groupid | name           |
    +---------+----------------+
    |       4 | Hardware_Nodes |
    +---------+----------------+
    1 row in set (0.00 sec)
    mysql> select * from groups where name like 'Hardware_Nodes%';
    +---------+-----------------+
    | groupid | name            |
    +---------+-----------------+
     |     13 | Hardware_Nodes
    |       4 | Hardware_Nodes  |
    +---------+-----------------+
    2 rows in set (0.00 sec)
    It would seem that the bulkloader is adding extra characters to the other Host Group and creating a new one. Also, the last system in the CSV list is added to the correct Host Group (groupid 4 rather than 13).

    Suggestions?
  • denso
    Member
    • Sep 2005
    • 32

    #2
    Sugestion

    Check for blank spaces and the like

    Comment

    • rickardp
      Junior Member
      • Dec 2004
      • 27

      #3
      DOS crap at end of line not ignored

      I have had the same problem, I was stupid enough to use excel and to export the data from there, after the import I discovered that the ^M sign was regarded as part of the group name. The bulkloader should trim off all dos line endings.

      After running dos2unix on the file the import went well.

      This feature has been there a while http://www.zabbix.com/forum/showthread.php?t=2660
      Last edited by rickardp; 20-09-2006, 13:06.

      Comment

      • jbothe
        Junior Member
        • Sep 2006
        • 10

        #4
        Originally posted by denso
        Check for blank spaces and the like
        Grr.

        Edited the file using TextPad and saved the file using UNIX file-type (I assumed it was unix when it was not). Issue resolved.

        Thanks!

        Comment

        Working...