Wednesday, October 5, 2011

NPC Sites and Groups 6 of 7: GXMLG - Automatic Config File Generation

Part of a series of posts.  To see all posts, click here.

At this point, this is all the information strictly needed to start with a Sites/Networks list and end up with a fully populated Sites group in NPC, a NetVoyant that should be discovering all devices at all sites, a SuperAgent that only needs an active monitor port, and a UCMonitor that only needs an active monitor port (if monitoring only Cisco telephony).

The obvious next step is to implement this into the product in such a way that this configuration is done in NPC and synchronized to the sub-products. However, since CA is currently sans an NPC Product manager, we’ll have to suffice ourselves with a third party tool.


I’ve built an app (remember I’m not a coder, but I do have experience with MS Access) that will take a Networks/Sites list and generate all the XML and CSV files needed to configure NPC, SuperAgent, NetVoyant, and UCMonitor.

I need beta testers for the tool.  If you're interested, request a copy of the beta version of the tool.

Sites/Networks List Creation
This tool depends on the Sites/Networks list existing in tool. To get the list in the tool, there are three options: import a simple CSV, import XML previously exported from an ‘All Sites’ group that already exists in NPC, and/or manually entering the list.

Importing a CSV
Importing a CSV into the tool is the best way to get started with a new installation of NPC or an installation that doesn’t yet utilize an ‘All Sites’ group. The first line should be as follows:

NetworkNumber,NetworkMask,Site

The remaining lines should detail one network per line, following the syntax above. The values do not need to be surrounded with quotes, but can be if so desired (the tool actually does need the values enclosed in quotes; however, if the CSV file doesn’t have them, it will put them in, making a backup file of the original). An example is shown below:

NetworkNumber,NetworkMask,Site
10.1.0.0,16,New York
10.2.0.0,15,Los Angeles (Bldg 1)
10.4.0.0,16,Los Angeles (Bldg 2 – Corp)
10.5.0.0,16,Los Angeles (Bldg 2 – Sales)
172.16.1.0,24,Los Angeles (Bldg 2 – DC)
10.100.0.0,16,London
10.150.0.0,16,Singapore
192.168.150.0,24,Singapore

Upon launching the tool, click the ‘Import Network CSV…’ button. You can see the imported Sites and Networks on the ‘Sites/Networks’ list. If the CSV you imported was complete, you shouldn’t need to modify anything on the ‘Sites/Networks’ tab.

Importing NPC XML
If you have already built site groups and have them all grouped into an ‘All Sites’ like group, you can use NPCCmd to export the group definitions into an XML file then import that information into the tool. Upon opening the tool, click the ‘Import XML…’ button and browse to the XML file from NPCCmd. The tool will compare the name of the site in the tool to the name of the sites in the XML file. Any site groups that don’t exist in the tool will be added, any that already exist in the tool will be updated with the ID numbers and other properties available in the XML. This allows the same groups to be updated using the configuration files that will be exported by the tool.

There is an option when importing to overwrite the existing site definitions. If this option is unchecked, the properties available in the XML file will not be added for existing sites. In this case, only sites that do not exist in the tool will be added with the properties from the XML file.

If you have rules that add devices to a site based on IP address, the tool will extract that from the XML and create the corresponding network record in the tool. If no rules exist in the XML, the tool will only have enough information to create/update the site group definition. You will need to go to the ‘Sites/Networks’ tab to add networks for each site. The same applies for rules that exist matching devices with a by device name.

Manual List Input
The ‘Sites/Networks’ tab in the tool allows for manual addition or modification of the sites and networks in the tool. This includes a subnet generator. If your corporate network uses a standard IP addressing scheme (i.e. all sites use a /19 network), you can input that information in the calculator and automatically populate the subnets list. Each subnet that actually belongs to a site should be tied to the site by choosing the appropriate site in the drop down box in the subnets table.


To be continued...