Print

Config

This section does not apply to RioDB Cloud.

By default, RioDB loads configuration settings from the file conf/riodb.conf

ALL properties are optional. Details about each property are documented in the default riodb.conf file.

Optionally, you can start riodb.sh or riodb.bat with argument -f to specify a different conf file location.

./riodb.sh -f /home/riodb/test/test.conf

You want to ensure that access to the conf file is properly restricted by OS permissions.

conf/riodb.conf

This file contains the following properties to configure the RioDB environment:

clear_warning_interval

RioDB is designed to process a million records per second. If there is a problem, such as a NUMBER field is receiving TEXT values from the stream, RioDB will not generate millions of WARN messages into your log file. Instead, it will write a log entry only once, and silence all subsequent warnings for a period of time. After that period of time is past, RioDB will clear the warning flag, and if the issue occurs again, it will again write a new warning to the log. This property defines the interval at which RioDB clears warning flags.
The value is provided in seconds, and the default value is 600 (or 10 minutes):

clear_warning_interval 600

console

RioDB comes with STDIN input, which allows you to enter events into a stream by typing them in the terminal. And it also comes with an STDOUT output, which allows you to have query results printed in the terminal. These two plugins may be turned off, if you need to ensure that RioDB inputs and outputs cannot interact with the terminal.

console false

credentials_file

Credentials for HTTPS users are stored as a hash in this file. Note that remote access can be disabled altogether for max security.
credentials_file .access/users.dat

default_date_format

Default date/time format for date fields that don’t specify a format:
default_date_format "yyyy/MM/dd HH:mm:ss"

host

Optionally, restrict SQL statement connections allowing only from a whitelisted source, like localhost:
host 127.0.0.1

http_port OR https_port

HTTP OR HTTPS listener configuration for the HTTP API, to receive SQL statements:
http_port 2333
or
https_port 2333
For HTTPS, please see also https_keystore_file and https_keystore_pwd.

https_keystore_file and https_keystore_pwd

SSL configuration, required by HTTPS listener:
https_keystore_file .ssl/keystore.jks
https_keystore_pwd passwdForSelfSignedCert!

logback_properties

Location of the logback.xml configuration file, for logging:
logback_properties conf/logback.xml

_log_stream_level

In addition to exporting system even logs through Logback, RioDB also run an internal stream called _log. You can create queries against the _log stream and use RioDB’s native processing and output to ship logs to an external system such as ElasticSearch.
This property sets the log level of the internal _log stream:
_log_stream_level info

min_sleep_secs

RioDB is designed to process a million events per second. When a user writes a query, and the query condition is always met, then RioDB will invoke the query OUTPUT section a million times. This may be very undesirable. For example, generating a million email alerts would be awful. Users should have a SLEEP clause in their queries to prevent such problems. But what happens if a user forgets the sleep clause?
This property makes a system wide sleep rule. Users can always specify a higher SLEEP value for their queries, but never a lower value than this property. If users do not specify a SLEEP clause for their query, this system-wide rule is activated always, to prevent a high frequency OUTPUT from the query.
The value is entered in seconds. THERE IS NO DEFAULT, because RioDB is sometimes used as a forwarder, using a query that outputs every record from the stream.

min_sleep_secs 1

public_user_level

When using HTTP instead of HTTPS for communicating with RioDB, all commands sent are executed by a “public” user, meaning, there’s no credentials or privileges in effect. This property sets the permission level of the public user, and is not applicable to HTTPS.

public_user_level ADMIN

sql_dir

Directory of sql files to be executed upon start (to load streams, windows, and queries):
sql_dir conf/sql/

NOTE, this directory also stores the hidden file .apistmt.sql to persist user-created objects.

If authorization is disabled, all connections issuing sql statements will have this default access level:
public_user_level ADMIN

stmt_timeout

For http/https, sql statements will timeout when RioDB takes too long to respond.
(Again, a query will scan a stream until it receives a match. If the stream is not shipping data, the query could run forever)
stmt_timeout 10

Table of Contents
Scroll to Top