Off-heap Storage

If a Minion loses connectivity with the broker (i.e. Kafka or ActiveMQ), then any received messages (i.e. syslog, flows, SNMP traps) are queued until connectivity is restored. This queue is limited by a fixed (and configurable) number of messages queued in the JVM heap and can optionally queue additional messages by persisting directly to the filesystem avoiding heap memory usage. Once the queue is full, additional messages will be dropped.

The off-heap storage feature allows us to extend the storage capacity by queuing messages outside of the JVM heap.

Connect to the Karaf shell with user admin and password admin
ssh -p 8201 admin@localhost
Configuring Off-heap Storage
config:org.opennms.core.ipc.sink.offheap(1)
config:property-set offHeapSize 1GB(2)
config:property-set entriesAllowedOnHeap 100000(3)
config:property-set offHeapFilePath /opt/minion/data (4)
config:update(5)
1 Edit the Minion configartion for the Off-Heap feature
2 Set a maximum off heap size in KB, MB or GB, e.g. 128MB or 65536KB, the size must be a power of 2
3 Set a maximum number of entries queued on the heap
4 Path storing the queue files, if not set it defaults to the Karaf data directory
5 Save and update the configuration
The offHeapSize can also be left empty or set to 0 to disable queueing off heap. In this case only heap memory will be used for queueing.