Java CSV collector properties file reference

Use this information to understand how the Java™ CSV collector properties file is constructed.

The location of the Java CSV collector properties file within $NCHOME/precision/collectors/javaCollectors/ is listed in Table 1. Using this .properties file you can map the network data to one or more files.
Note: Properties specified in the collector-specific properties file override any related properties specified in the generic Java collector properties file, $NCHOME/precision/collectors/javaCollectors/framework/collector.properties.
Table 1. Java CSV Collector properties file
Collector Location of properties file within
Java CSV collector csv/csvcollector.properties

Sample .properties file for the Java CSV collector

The following code fragment presents sample settings from a the Java CSV collector .properties file. This code fragment defines the directory where the CSV data files are located, and then proceeds to define formatting for CSV data in one of those files, the devices.csv file, which defines main entity data.
# Directory containing CSV data
CSVDir = ../csv/exampleCsvData/

# Main entity data (device data) is in devices.csv
MainEntityData.file = devices.csv

# The delimiter for the file is a |
MainEntityData.delimiter = \\|

# There are 6 columns of data in the file
MainEntityData.numCols = 6

# Only read lines that start with 10.1.1.
MainEntityData.lineMatch = 10\\.1\\.1\\..+

# Map the first data column to the device management IP address (<ip>)
MainEntityData.1.name = ManagementIpAddress
MainEntityData.1.mapsTo = DEVICE_MANAGEMENT_IP_ADDRESS

# Arbitrary mapping of extra information
# Map column 6 to <extraInfo><systemInfo>…</systemInfo></extraInfo>
MainEntityData.6.name = AdditionalSystemInfo
MainEntityData.6.mapsTo = EXTRA_INFO.systemInfo

Properties and mappings

The Java CSV collector properties files includes the following properties:
Base directory
For the Java CSV collector, the base directory is defined in the CSVDir property.
Data file properties
For the Java CSV collector, a set of properties are defined for the different CSV data files used as input.
The following table lists the properties held in CSV data files. For each property, data_type is one of the supported data types, listed in Table 4.
Table 2. Data file properties
Property Descriptions
data_type.file File name containing the CSV data.
data_type.delimiter Delimiter for the data in the CSV file. The default delimiter is a comma ,.
data_type.lineMatch Regular expression syntax pattern. This instructs the collector to read only those lines that start with the pattern.
data_type.numCols Number of columns of data in the file.
data_type.useCols If not all columns are needed, this expression uses a comma separated list, for example, 1,3, to indicate which columns of data to use from the file.
The following table how data in CSV data files is mapped to attributes.
Table 3. Data mappings
Property Descriptions
data_type.column_number.name Human readable name for the column data.
data_type.column_number.description Human readable description for the column data.
data_type.column_number.mapsTo Mapping to an attribute supported for the data type.

Data types

The following table lists the supported data types.

Table 4. Data types
Property Descriptions
MainEntityData Main entity (device) data.
InterfaceData Interface data.
EntityData Entity data in ENTITY-MIB format.
GenericEntityData Entity data in non-ENTITY-MIB format.
L1ConnectivityData Layer 1 connectivity data.
L2ConnectivityData Layer 2 connectivity data.
L3ConnectivityData Layer 3 connectivity data.
L2VpnData Layer 2 VPN data.
L3VpnData Layer 3 VPN data.
L3VpnInterfaceData Layer 3 VPN interface data.
L3VpnRTData Layer 3 VPN route target data.
LabelSwitchPathData Label switch path data.
MplsInterfaceData MPLS interface data.

Data source configuration

You can optionally configure details about the originating element management system (EMS) by configuring the fields listed in the following table. If you configure this EMS information , then data from these fields will be used by Network Manager to model the EMS.

Table 5. Data source configuration
Property Descriptions
DataSource.id This field takes the value 1, indicating that this is the primary data source.
DataSource.descr Description of the EMS.
DataSource.emsHost Hostname of the EMS.
DataSource.emsName Name of the EMS.
DataSource.emsVersion Version of the EMS
DataSource.emsIdentifier Identifier for the EMS
DataSource.emsRole Role of the EMS. Takes one of the following values:
  • unknown
  • primary
  • backup
  • other
DataSource.emsStatus Role of the EMS. Takes one of the following values:
  • unknown
  • up
  • down
  • other