best practice WRT use of "provision.pl requisition import ..."
"Hernandez, Paul" <[email protected]>
| Newsgroups | gmane.network.opennms.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
We are writing a routine used to populate a fresh instance of OpenNMS. It loops over a list of a few thousand host names and performs:
provision.pl requisition add ... # if it sees it is a not yet defined requisition name
provision.pl node add ...
provision.pl interface add ...
provision.pl interface set ... snmp-primary P"
provision.pl node set ... # city, location, room
provision.pl asset add ... # three asset lines like this
provision.pl service add ... # only ICMP, SNMP, SSH for now
but we would like to know what is the best practice use of "provision.pl requisition import ... " and which argument flavor to insure first time population of the db.
So my choices are:
1) Embed the call to "provision.pl requisition import ..." within the above loop basically calling it for each host added after the services are added
2) call once outside the loop to import the thousands of hosts into the db
and for the above choice, use which of:
1) provision.pl requisition import ...
2) provision.pl requisition import ... rescanExisting true
3) provision.pl requisition import ... rescanExisting false
4) provision.pl requisition import ... rescanExisting dbonly
I have read the help:
requisition import <foreign-source> [rescanExisting] [value]
Import the requisition with the given foreign source.
If the optional argument "rescanExisting" is specified,
the value must be one of the following:
* true, to update the database and execute the scan
phase
* false, to add/delete nodes on the DB sckipping the
scan phase
* dbonly, to add/detete/update nodes on the DB
skipping the scan phase
but can't say this helps me understand what is the best practice.
I am thinking one call to the simple "provision.pl requisition import ..." outside of the loop. And assuming the loop doesn't fail on any host, this makes sense, but then again ideally we'd want only that one host to fail being defined, not the entire routine.
Thanks in advance,
Paul
Paul Hernandez
Sr. System Engineer - Grid Computing / Global Technologies & Infrastructure - Americas
46871 Bayside Pkwy #A1-415, Fremont, CA 94538
Tel: (+1) (510) 354-7400
[email protected]<http://@mentor.com> / www.mentor.com<http://www.mentor.com/>
[iMattB:Users:Matt:Desktop:LOGOZ:1-FINAL-LOGOS-Folder-To-Server:LOGOS:0-Mentor(r)--A_Siemens_Business:OTHER--VERSIONS--of-Mentor-ASB-Logos:Mentor(r)--Logos-for-Wikipedia:Mentor-ASB-Logo-Color-1000.png]
... better an approximate answer to the right question, ... than an exact answer to the wrong question ...
John Tukey, 1962
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
image001.png
(image/png, 4.5 KB) - not displayed