ForeignSource/foreignId Data Storage How-To

From OpenNMS
Jump to: navigation, search

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 redefined, 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. Edit the configuration file etc/opennms.properties and see that the following line exists and is uncommented.

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.

See Also