In order to run more than one dbWatch Monitor on a machine you have to tell them to use seperate paths for their files.
Before making any changes to the files, make sure the the dbWatch Monitor is stopped.
The dbWatch Monitor reads a file called monitor.conf on startup. This file defines (among other things) where the Monitor keeps its configuration files, log files and data files. You will find this file in the root catalog of the dbWatch Monitor installation.
If you open it in a text editor it will look like this:
loglevel 1
loadproperties version.properties
export dbwatch.workdir ${user.home}/.dbwatch/monitor
export dbwatch.logdir ${dbwatch.workdir}/log
// If on windows
if(${win_app_data}) export dbwatch.datadir ${win_app_data}/dbWatch/$version/monitor
// Linux and mac
else export dbwatch.datadir ${user.home}/.dbwatch/monitor;
include custom_monitor.conf
include ${user.home}/.dbwatch/custom_monitor.conf
redirect stdOut ${dbwatch.logdir}/output.log
redirect stdErr ${dbwatch.logdir}/error.log
dependency org.scala-lang:scala-parser-combinators org.scala-lang:scala-library
dependency com.typesafe.akka:akka-actor_2.11 org.scala-lang:scala-library
localstore repository dbwatch no.dbwatch
localstore ${dbwatch.datadir}/bundle_repository bundles
localstore repository_monitor_bundles bundles no.dbwatch.bundles
localstore repository_external external
unify org.scala-lang:scala 2.11.8
unify org.reactfx:reactfx 2.0-M5
run no.dbwatch:monitor:jar:$version/no.onedge.dbwatch.monitor.Monitor.main
The relevant statements are the ones starting with the keyword export
export dbwatch.workdir ${user.home}/.dbwatch/monitor
export dbwatch.logdir ${dbwatch.workdir}/log
// If on windows
if(${win_app_data}) export dbwatch.datadir ${win_app_data}/dbWatch/$version/monitor
// Linux and mac
else export dbwatch.datadir ${user.home}/.dbwatch/monitor;
There are 3 paths defined
- dbwatch.workdir The main working directory for dbWatch (This is where server connection info is stored)
- dbwatch.logdir Where logfiles will be placed
- dbwatch.datadir Where dbWatch will place the data files it creates.
The win_app_data is only relevant on windows and will be found dynamically. It will usually resolve to “C:/ProgramData”.
user.home will be found dynamically from the OS. On windows it will usually resolve to “C:/Users/[Username]”.
So on windows the default setup will be:
dbwatch.datadir | C:/ProgramData/dbWatch/12.2/monitor |
dbwatch.workdir | C:/Users/[Username]/.dbwatch/monitor |
dbwatch.logdir | C:/Users/[Username]/.dbwatch/monitor/log |
To run several monitors you have to change this, so each monitor has its own catalogs.
Post your comment on this topic.