Statistics Database Plugin Properties

Property

Value

statdb.poolsize

<integer> (default is 1)

Number of database connections in the connection pool – 1 should be enough for the batch-type update of statistics, so you should not need to increase this value.

statdb.connectionurl

<JDBC URL> (no default – this setting is required)

JDBC URL to the database

Example:
jdbc:db2:/STATDB or
jdbc:cloudscape:/db/ppstatistics

statdb.username

<Username> (defaults to empty, meaning no user will login)

If specified, this userid will be used to authenticate to the database.

statdb.credentials

<Password>

If statdb.username is specified, these credentials will be used to authenticate to the database, can optionally be encoded or encrypted using "java dk.itp.utils.PasswordUtils".

statdb.drivername

<Name of database driver class> (no default – this setting is required)

Example:
com.ihost.cs.jdbc.CloudscapeDriver or
COM.ibm.db2.jdbc.app.DB2Driver

statdb.debug

<true | false> (default false)

If true, and debug logging is enabled then the exact SQL executed will be logged.

statdb.maxconnectionlife

<Max life in seconds, or 0 to disable> (default 0 – no limit)

Contains the maximum number of seconds a database connection is considered to be valid in since it was created – if the number of seconds since creation exceeds the max, the connection will be closed and a new one will be opened.

Example:
600 – set the max to 10 minutes

statdb.maxconnectionusage

<Max number of reuses> (default 0 – no limit)

Maximum number of times a connection can be taken out of the pool and uses before being closed and reopened.

statdb.commitonrelease

<true | false> (default false)

If true, the connection will be committed on release to the connection pool.

statdb.getconnectiontimeout

<Time in milliseconds> (default 5000)

Maximum amount of time to wait for an available connection in the pool before giving up.

statdb.testonreserve

<true | false> (default false)

If true, a connection will be tested on the statdb.testtable before being returned from the connection pool to ensure it is still valid.

statdb.testtable

<table name> (default none)

If specified, and statdb.testonreserve is set to true, then the connection pool will test the connection by executing the SQL "select count(star) from <table name>" before returning it to ensure it is still valid.

If this property starts with "SQL" a custom query can be added (often much more efficient!) but this is database type specific. Example could be "SQL select 1 from <table>"

If this property is set to "ISVALID" the JDBC driver "isValid" method is called instead of executing an SQL.

statdb.disableminutestats

<true | false> (default false)

If true, statistics will not be saved in per-minute intervals / resolution but only per-hour and per-day meaning less load on the database, but also less detailed statistics available.

statdb.minuteinterval

<Number of minutes> (default 1)

Can be used to change the amount of statistics stored in the per-minute slot in the database – if e.g. set to 5, statistics will be available in 5-minute intervals, meaning they will be summed up so entries between 12:00 and 12:04 are stored in one slot, 12:05 and 12:09 in another etc. Instead of saving entries per minute.

See the statistics database section in this document for more information and background on this setting.

statdb.tablequalifier

<name> (default none)

Table qualifier, such as "user." Or other string that will be prepended to all the table names if specified.

statdb.enabled

<true | false> (default true)

If set to false, all statistics database access is disabled, and the other settings are ignored – this can be used as a quick and easy way of disabling use of the database without deleting any configuration entries.

statdb.serverprefix

<name> (default blank)

If present, this string is prepended to all server names in the database – it can be used to separate statistics from different environments, even if they do use the same database to store the statistics in.

Example:
public_ - instead of using a servername of e.g. "logserver1", "public_logserver1" is used in the database.

statdb.cleanupinterval

<Minutes> (default 240 – 4 hours)

Number of minutes between each database cleanup – a cleanup will delete any entries in the minutes table older than 24 hours, and any entries in the hours table older than 60 days.

By changing this value you can decide how often the database is cleaned up – normally you could set this to a low value such as 10 minutes, but depending on your database it might perform better to increase the time between cleanups.

No matter how its set, the database cleanup will be performed on the first run after startup.

© Ceptor ApS. All Rights Reserved.