XLS Source
The xls
reads an XLS spreadsheet file and creates an OpenNMS requisition based on the worksheet content.
Parameter | Required | Description |
---|---|---|
|
* |
set |
|
* |
path of the XLS file to read relative to the |
|
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 |
---|---|---|
|
* |
will be interpreted as node label. It is also used as |
|
The monitoring location for the node. When not set, the node is monitored from the OpenNMS server, otherwise from the Minion associated with the |
|
|
* |
will be interpreted as an IP address as a new interface on the node. |
|
* |
is interpreted as |
|
will be interpreted as |
|
|
defines the |
|
|
defines the |
|
|
defines the |
|
|
will be interpreted as interface status. Use |
|
|
will be interpreted as a surveillance category. Multiple comma-separated categories can be provided. It can be used multiple times per sheet. |
|
|
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. |
|
|
will be interpreted as node-level meta-data with the given key and the default 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. |
### 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