Skip to main content

Topology Loader Utility Command Reference

The Topology Loader utility topology_loader is a command line utility to add nodes, links and optional link descriptions to an existing topology.

The utility is located at $MOOGSOFT_HOME/bin.

See Load a Topology for more information.

Usage

topology_loader [-h] [-b=BATCH_SIZE] [--credentials=USERNAME:PASSWORD] -f=CSV_FILE [--hostname=HOSTNAME] -t=TOPOLOGY

Argument

Input

Description

-b, --batch-size

Integer <batch size>

Number of links to create in each batch. Default is 10,000.

--credentials

String <username:password>

Graze API username and password. Default is graze:graze.

-f, --file

String <csv_filename>

Name of the .csv file containing the pairs of connected nodes with optional link descriptions.

--hostname

String <hostname>

Name of your Moogsoft Enterprise host running Nginx. Default is localhost.

-t, --topology

String <topology name>

Name of the topology in which to create the nodes and links. You must create the topology before you run the utility.

-h, --help

-

Display the utility options and syntax.

Example

An example to load nodes and links from the file "physical_topology.csv" into the "physical" topology on host "example.com" in batches of 15,000 is as follows:

topology_loader -b=15000 --credentials=phil:password123 -f=physical_topology.csv --hostname=example.com -t=physical

The utility produces the following example output:

Executing:  topology_loader

INFO : [main][20200320 16:35:21.308 +0000] [CTopologyLoader.java:97] +|Starting, reading from: physical_topology.csv|+
INFO : [main][20200320 16:35:21.348 +0000] [CCertificateProvider.java:83] +|Found ssl_certificate setting: ssl_certificate /etc/nginx/ssl/certificate.pem;|+
INFO : [main][20200320 16:35:21.352 +0000] [CTopologyProcessorHelper.java:66] +|Using certificate: /etc/nginx/ssl/certificate.pem|+
INFO : [main][20200320 16:35:22.074 +0000] [CTopologyLoader.java:105] +|Read 10 link(s) for topology physical, processing in batches of 15,000|+
INFO : [main][20200320 16:35:23.067 +0000] [CTopologyProcessor.java:196] +|-- [204: https://example.com/api/v1/topologies/physical/links]|+
INFO : [main][20200320 16:35:23.068 +0000] [CTopologyProcessor.java:144] +|10 of 10 sent (100%)|+
INFO : [main][20200320 16:35:23.068 +0000] [CTopologyLoader.java:109] +|Finished|+