XLS Source

The xls reads an XLS spreadsheet file and creates an OpenNMS requisition based on the worksheet content.

Parameter Required Description

source

*

set xls to use the XLS source for this requisition

source.file

*

path of the XLS file to read relative to the requisition.properties

source.encoding

encoding of the xls file. Default is ISO-8859-1

The structure of the spreadsheet has to follow these rules. The source reads from a sheet named after the requisition you are requesting. The first row of each sheet is reserved for column names. These column names have to start with certain prefixes to be recognized.

Prefixes Required Description

Node_

*

will be interpreted as node label. It is also used as foreignId if no ID_ header is present.

Location

The monitoring location for the node. When not set, the node is monitored from the OpenNMS server, otherwise from the Minion associated with the Location.

IP_

*

will be interpreted as an IP address as a new interface on the node.

MgmtType_

*

is interpreted as snmp-primary flag and controls how the interface can be used to communicate with the SNMP agent. Valid are P (Primary), S (Secondary) and N (None).

ID_

will be interpreted as foreignId for the node. If no foreignId is definded the Node_ value is used as foreignId.

Parent_Foreign_Id

defines the foreignId for the parent node. Used for path outages.

Parent_Foreign_Source

defines the foreignSource for the parent node. Used for path outages.

Parent_Node_Label

defines the nodeLabel of the parent node. Used for path outages.

InterfaceStatus

will be interpreted as interface status. Use 1 for monitored and 3 for not monitored.

cat_

will be interpreted as a surveillance category. Multiple comma-separated categories can be provided. It can be used multiple times per sheet.

svc_

will be interpreted as a service on the interface of the node. Multiple comma-separated services can be provided. It can be used multiple times per sheet.

MetaData_

will be interpreted as node-level meta-data with the given key and the default context requisition. You can use MetaData_Context:Key to specify a custom context.

Please note, that this datasource only allows to specify node-level meta-data.

This source also supports all asset-fields by using Asset_ as a prefix followed by the asset-field-name. The city field of the assets can be addressed like this: Asset_City. This is not case-sensitive.

To add a node with multiple interfaces, add a subsequent row with the same node label (Node_). This row will be added as a new interface based on the data from the IP_, MgmtType_, svc_ columns.

The order in which the columns are arranged is irrelevant. Also additional columns can be present.

Check the format of cells to avoid problems with data like IP address.
Example configuration for the requisition myRouter from an XLS spreadsheet
### File: myRouter/requisition.properties
# This example imports devices from a spreadsheet
# named "myRouter" from the myInventory.xls file
# Path to the XLS fils is relative to
# requisitions.properties
source = xls
source.file = ../myInventory.xls

### default no-operation mapper
mapper = echo