The config file
The next step after installation is to create a configuration file. Such a file has the main purpose of telling obsmon where to find your experiments, but it can also be used to control how the code works. It is written in TOML, which is similar to the widespread ini
format.
Obsmon looks for a configuration file named config.toml
under the following directories (listed in order of priority):
$HOME/.obsmon
/etc/obsmon/$USER
The obsmon installation directory
Alternatively, you can instead provide the full path to a valid configuration file using the OBSMON_CONFIG_FILE
environment variable, in which case you are free to choose the file name. This takes higher priority over the other options.
A TOML config file is made up of sections (called \"tables\" in TOML parlance). A valid config file for obsmon:
May contain one
[general]
sectionMust contain at least one
[[experiments]]
tableMay contain multiple
[[multiPlots]]
sectionsMay contain one
[domain]
section
The next sections describe the config file options for the [general]
and [[experiments]]
tables. The configuration of [[multiPlots]]
and [domain]
will be discussed in multiplots, domains , respectively. An example of a simple config file is presented in 4.3. For a more complex config file example, see the config file template docs/config.toml.example
. Options that have default values are optional.
Options for the [general]
section
As the name suggests, the [general]
section controls how the code works in general. The currently available options are:
appTimeout
: Time interval, in seconds, after which obsmon will stop and exit after all browser sessions have been closed.
Default:"Inf"
Acceptable values: Any number greater than or equal to zero. Passing invalid values will cause it to fall back to the default.
This option is similar but not equal to the optionsessionTimeout
described further below.cacheDir
: User-configurable part of the path to where obsmon will store its cache.
Default:$HOME/.obsmon/experiments_cache
The path initially passed to this parameter will be further appended by a directory named asobsmon_vMAJOR.MINOR
. This is to avoid conflict when updating obsmon. Furthermore, cache files for each experiment will be stored separately inside directories named according to the experiments' names. For more information on cache, please read 5.7.configName
: Name of your config file.
Default:""
Acceptable values: Any string.
The text assigned toconfigName
(if any) will be printed out to the logs asINFO
(see optionlogLevel
below), and will also be displayed in the GUI (on the right-hand side of the place where the code version info is displayed).logLevel
: Amount of detail that is logged.
Default:WARN
Valid values (in decreasing order of detail):TRACE
,DEBUG
,INFO
,WARN
,ERROR
andFATAL
In standalone mode, everything is logged to
stderr
If running on a shiny server, then the log ends up in the respective shiny server log. For more details about logging while running on a shiny server, please take a look at the shiny documentation for logging and analytics
maxAvgQueriesPerProc
: Maximum number of database queries (in average) that a single process (computer thread) is allowed to perform when preparing plots.
Default:"Inf"
Acceptable values: Any integer number greater than or equal to one, or \"Inf\". Passing invalid values will cause it to fall back to the default.
Data for obsmon plots is stored in separate files for eachDTG
. Therefore, if your plot requiresnDTGs
, thennDTGs
independent database files will be queried. With themaxAvgQueriesPerProc
option, these queries will be divided intomax{1, ceiling(nDTGs/maxAvgQueriesPerProc)}
groups that will then be processed in parallel.
The optimal value for this parameter is, of course system-dependent, and the default"Inf"
leads to no query parallelisation.maxExtraParallelProcs
: Maximum number of extra tasks that obsmon is allowed to execute, at any given time, in parallel to the main process.
Default: 4 $\times$#availableCores
Acceptable values: Any integer number greater than or equal to zero. Passing invalid values will cause it to fall back to the default.
Asynchronous/parallel tasks are used, e.g., to be able to load and cache experiments without blocking the GUI, as well as to allow having a \"cancel plot\" functionality. It is worth mentioning that:These extra tasks are short-lived and are not usually computationally intensive (not all at the same time, at least), so we advise you not to set this parameter to a smaller value unless you have good reasons to do so.
The
OBSMON_MAX_N_EXTRA_PROCESSES
environment variable can also be used in order to control this setting, but the value set via the config file takes precedence.
multiPlotsEnableInteractivity
: Whether or not to allowmultiPlots
(see 5.4 to be interactive.
Default:false
Accepted values:true
orfalse
We have chosen to make this optionfalse
by default to avoid memory issues, as large numbers of individual plots may in principle be generated within a singlemultiPlot
. This is especially important when deploying obsmon in a Shiny Server.[6]plotsEnableInteractivity
: Whether or not to allow regular plots to be interactive.
Default:true
Accepted values:true
orfalse
sessionTimeout
: Time interval, in seconds, after which any idle obsmon web session should be terminated.
Default:"Inf"
Acceptable values: Any number greater than or equal to zero. Passing invalid values will cause it to fall back to the default.
Users will receive at least 60s warning that their sessions will be terminated if they remain idle.showCacheOptions
: Whether or not to show advanced cache options (see 5.7.1).
Default:false
Accepted values:true
orfalse
Options for the [[experiments]]
section
This the section where you tell obsmon how to locate your experiment files and how you want your experiments to be named. You should include one [[experiments]]
section for each experiment, each section defining the following two keys:
displayName
: Used to identify the experiment in the web interface.
Accepted values: Any (you are free to choose the name of your experiment)path
: Path to the directory containing the experiment data.
Allowed values: Any valid experiment path. More details below.
Obsmon expects to find directories named ccma
, ecma
, ecma_sfc
under the directory specified in path
(or at least one of them). These directories are assumed to contain the databases corresponding to minimisation, screening and CANARI data, respectively. Each of these directories is expected to contain sub-directories named according to the standard dtg format YYYYmmddHH
(one such directory for each available DTG in the experiment), which, in turn, should contain the actual database files, named, again respectively, ccma.db
, ecma.db
and ecma.db
(sic).
Obsmon finds the data by combining into a single path (i) the value passed in path
, (ii) the appropriate directory for minimisation, screening, or CANARI data, (iii) the date(s) and cycle(s) selected in the GUI, and finally (iv) the appropriate .db
file.
Config file example
A simple config file may look like the following:
[general]
logLevel = "INFO"
cacheDir = ".Rcache"
[[experiments]]
displayName = "First Experiment"
path = "/full/path/to/experiment1"
[[experiments]]
displayName = "Second Experiment"
path = "/full/path/to/experiment2"
For a more complete example, please take a look at the template config file docs/example/config.toml
. A few notes:
Comments can be added using a
#
character and are optionalIndentation is also optional, but highly encouraged
- 6Problems are known to occasionally occur in this case. We have indeed experienced a few.