Configuration Reference

Use the following properties, found in ${OPENNMS_HOME}/etc/opennms.properties, to configure and tune Newts.

General

Name Description Default

org.opennms.newts.config.keyspace

Name of the keyspace to use.

newts

org.opennms.newts.config.hostname

IP address or host names of the Cassandra nodes. Separate multiple hosts by a comma.

localhost

org.opennms.newts.config.port

CQL port used to connect to the Cassandra nodes.

9042

org.opennms.newts.config.username

Username to use when connecting to Cassandra via CQL.

cassandra

org.opennms.newts.config.password

Password to use when connecting to Cassandra via CQL.

cassandra

org.opennms.newts.config.ssl

Enable/disable SSL when connecting to Cassandra.

false

org.opennms.newts.config.core-connections-per-host

Core number of connections per host.

Driver default

org.opennms.newts.config.max-connections-per-host

Maximum number of connections per host.

Driver default

org.opennms.newts.config.max-requests-per-connection

Maximum number of requests that can be in flight on a single connection at the same time.

Driver default

org.opennms.newts.config.read_consistency

Consistency level for read operations. See Configuring data consistency for a list of available options.

ONE

org.opennms.newts.config.write_consistency

Consistency level for write operations. See Configuring data consistency for a list of available options.

ANY

org.opennms.newts.config.max_batch_size

Maximum number of records to insert in a single transaction. Limited by the size of the Cassandra cluster’s batch_size_fail_threshold_in_kb property.

16

org.opennms.newts.config.ring_buffer_size

Maximum number of records that can be held in the ring buffer. Must be a power of two.

8192

org.opennms.newts.config.writer_threads

Number of threads used to pull samples from the ring buffer and inserted into Newts.

16

org.opennms.newts.config.ttl

Number of seconds after which samples will automatically be deleted. Defaults to one year, in seconds.

31540000

org.opennms.newts.config.resource_shard

Duration in seconds for which samples will be stored at the same key. Defaults to 7 days, in seconds.

604800

org.opennms.newts.query.minimum_step

Minimum step size in milliseconds. Used to prevent large queries.

300000

org.opennms.newts.query.interval_divider

If the query does not specify an interval, the step will be divided into this many intervals when aggregating values.

2

org.opennms.newts.query.heartbeat

Duration in milliseconds. Used when no heartbeat is specified. Should generally be 1.5 times your largest collection interval.

450000

org.opennms.newts.query.parallelism

Maximum number of threads that can be used to compute aggregates. Defaults to the number of available cores.

Number of cores

org.opennms.newts.config.cache.strategy

Canonical name of the class used for resource-level caching. See the table below for all of the available options.

See below

org.opennms.newts.config.cache.max_entries

Maximum number of records to keep in the cache when using an in-memory caching strategy.

8192

org.opennms.newts.nan_on_counter_wrap

Disables the processing of counter wraps, replacing these with NANs instead.

false

org.opennms.newts.config.cache.priming.disable

Disables the cache primer, which preemptively loads the cache with indexed resources on startup.

false

org.opennms.newts.config.cache.priming.block_ms

Block startup for this many milliseconds while waiting for the cache to be primed. Set this value to -1 to disable blocking. Set this value to 0 to block indefinitely waiting for all of the records to be read.

120000

Table 1. Available caching strategies
Name Class Default

In-Memory Cache

org.opennms.netmgt.newts.support.GuavaSearchableResourceMetadataCache

Y

Redis-based Cache

org.opennms.netmgt.newts.support.RedisResourceMetadataCache

N

Redis Cache

When enabled, the following options can be used to configure the Redis-based cache.

Name Description Default

org.opennms.newts.config.cache.redis_hostname

IP address of hostname of the Redis server.

localhost

org.opennms.newts.config.cache.redis_port

TCP port used to connect to the Redis server.

6379

Recommendations

You will likely want to change the values of cache.max_entries and the ring_buffer_size to suit your installation.

Horizon caches metadata related to resources to avoid writing redundant records in Cassandra. If you are collecting data from a large number of resources, you should increase the cache.max_entries to reflect the number of resources you are collecting from, with a suitable buffer.

The samples the collectors gather are temporarily stored in a ring buffer before they are persisted to Cassandra using Newts. You should increase the value of the ring_buffer_size if you expect large peaks of collectors returning at once or latency in persisting these to Cassandra. However, note that the memory the ring buffer uses is reserved, and larger values may require an increased heap size.

Newts uses cache priming to help reduce the number of records that need to be indexed after restarting Horizon. This works by rebuilding the cache using the index data that has already been persisted in Cassandra. If you continue to see large spikes of index-related inserts after rebooting, consider increasing the amount of time spent priming the cache.