I am trying to do a bulk import of hosts using the Opsview Api.

I have a csv source file with

Host,ip,alias,parent

 

I am reading in the csv, printing the xml to a file then reading in the
xml file with the api.

I am trying to clone a host but I seem I see this error

## START ERROR SNIPPET

<opsview>

  <result>

    <detail>Element host failed to validate content

</detail>

    <status>XML-INVALID</status>

  </result>

## END ERROR

 

Here is one the test xml files generated

<opsview>

<authentication>

<username>bob</username>

<password>somepass</password>

</authentication>

<host action="create">

        <clone><name>ms-va-somehost-ms01</name></clone>

        <name>testname2</name>

<ip>10.5.5.6</ip>

<parents>Appdev-sql</parents>

</host></opsview>

 

Has anyone been able to bulk import hosts with parents included?

I suspect Opsview may be griping because the parents I am referencing
don't exist yet which would make some sense, but then it means my perl
script is going to have to get a bit smarter.

 

Has anyone else out there already worked through this through, I like
the challenge but I have plenty of other challenges to tackle already.

 

James Whittington

VC3, Inc.

 

803-978-2723 direct line

803-978-1160 main office

800-422-5941 toll free help desk

 

_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to