Storing data with foreign sources

Introduction

If you use Provisiond to populate all or part of your node database, you have an additional option for defining how the data is stored. Instead of directories named with the nodeId, you may opt to store the data in directories named with the foreignSource and foreignId assigned to the node during the provisioning process. This has advantages when nodes are deleted and reprovisioned, either accidentally or intentionally. As long as the foreignSource and ForeignId aren’t changed in the requisition, collected data will continue to be stored in the same directory even though the nodeId will have changed.

Configuration

Enabling this feature is quite simple. Create (or edit) a .properties file in the $OPENNMS_HOME/etc/opennms.properties.d/ directory and add the following setting:

org.opennms.rrd.storeByForeignSource=true

Example

As an example, a node with foreignSource/foreignId “mysource/12345” will have its data
stored in ${rrd.base.dir}/snmp/fs/mysource/12345. Nodes that do not have both a foreignSource and a foreignId defined in the database will continue to store data in ${rrd.base.dir}/snmp/n where n is the nodeId of the node.

2 Likes