Denodo Monitor as a Windows service

You can translate the document:

Goal

This document describes how to register the Denodo Monitor as a Windows Service.

NOTE: This document only applies to Denodo 8.0 and newer versions.

Content

To register the Denodo Monitor as a service you will need a configuration file containing the information about the environment variables, configuration parameters, etc.

To make the installation of the service easier, a small script can be created to run the commands that are necessary to register the service. Create this script file under <DENODO_MONITOR_HOME>/bin and the configuration file under <DENODO_MONITOR_HOME>/conf. The script makes the assumption that the configuration file is located under this folder and is called “service.conf”. We are going to name the script “denodomonitor_service.bat”.

Use the following template as a starting point for the script file (denodomonitor_service.bat). Modify the value of DENODO_HOME variable with the installation folder of the Denodo Platform using backward slashes (\) and make sure to check the MONITOR_HOME variable is set correctly:

echo off

REM -----------------------------------------------------------------

REM  Installation Script for running the Denodo Monitor as a Service

REM  in Windows

REM -----------------------------------------------------------------

REM # DENODO_HOME must be set.

SET DENODO_HOME=<DENODO_HOME>

SET TEMP=%DENODO_HOME%\temp\monitor-service

SET TMP=%DENODO_HOME%\temp\monitor-service

SET MONITOR_HOME=%DENODO_HOME%\tools\monitor\denodo-monitor

SET DENODO_JRE11_OPTIONS=--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED

if "%DENODO_HOME%"=="" goto exit

SET DENODO_JRE_HOME=%DENODO_HOME%/jre

SET JAVA_BIN=%DENODO_JAVA_HOME%\jre\bin\java.exe

if exist "%JAVA_BIN%" goto configuredjavabin

SET JAVA_BIN=%DENODO_JAVA_HOME%\bin\java.exe

if exist "%JAVA_BIN%" goto configuredjavabin

SET JAVA_BIN=%DENODO_JRE_HOME%\bin\java.exe

if exist "%JAVA_BIN%" goto configuredjavabin

SET JAVA_BIN=%JAVA_HOME%\jre\bin\java.exe

if exist "%JAVA_BIN%" goto configuredjavabin

SET JAVA_BIN=%JAVA_HOME%\bin\java.exe

:configuredjavabin

if exist "%JAVA_BIN%" (

   if "%1"=="start" goto :doStart

   if "%1"=="stop" goto :doStop

   if "%1"=="install" goto :doInstall

   if "%1"=="remove" goto :doRemove

   if "%1"=="state" goto :doInfo

 

goto :usage

)

echo "Unable to execute %0: Environment variable JAVA_HOME must be set"

goto :end

:doStart

"%JAVA_BIN%" -DDENODO_APP="Denodo Monitor" %DENODO_JRE11_OPTIONS% -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -t "%MONITOR_HOME%/conf/service.conf"

goto :end

:doStop

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -p "%MONITOR_HOME%/conf/service.conf"

goto :end

:doInstall

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -i "%MONITOR_HOME%/conf/service.conf"

goto :end

:doRemove

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -r "%MONITOR_HOME%/conf/service.conf"

goto :end

:doInfo

"%JAVA_BIN%" %DENODO_JRE11_OPTIONS% -jar "%DENODO_HOME%/lib/service-wrapper/wrapper.jar" -q "%MONITOR_HOME%/conf/service.conf"

goto :end

:exit

 echo "Unable to execute %0: Environment variables JAVA_HOME and DENODO_HOME must be set (absolute path)"

 goto :end

:usage

 echo "Usage: %0 [start|stop|install|remove|state]"

:end

Use the following template for the configuration file (service.conf) replacing <DENODO_HOME> with the appropriate value.

wrapper.java.command=<DENODO_HOME>/jre/bin/java.exe

wrapper.working.dir=<DENODO_HOME>/tools/monitor/denodo-monitor

wrapper.java.app.mainclass=com.denodo.util.launcher.Launcher

wrapper.java.classpath.1=<DENODO_HOME>/lib/denodo-commons-launcher-util.jar

wrapper.java.additional.1=-DconfFile=ConfigurationParameters.properties

wrapper.java.additional.2=-DverboseMode=false

wrapper.java.additional.3=-DWINDOWS_SERVICE=true

wrapper.java.additional.4=-Djava.system.class.loader=com.denodo.util.launcher.DenodoClassLoader

wrapper.java.additional.5=-Djava.locale.providers=COMPAT\,SPI

wrapper.java.initmemory=3

wrapper.app.parameter.1=com.denodo.monitor.cli.DiagnosticTool

wrapper.app.parameter.2=--lib

wrapper.app.parameter.3=<DENODO_HOME>\\tools\\monitor\\denodo-monitor\\lib

wrapper.app.parameter.4=--conf

wrapper.app.parameter.5=<DENODO_HOME>\\tools\\monitor\\denodo-monitor\\conf

wrapper.app.parameter.6=--arg

wrapper.app.parameter.7=-d

wrapper.app.parameter.8=--arg

wrapper.app.parameter.9=<DENODO_HOME>\\tools\\monitor\\denodo-monitor\\logs

wrapper.app.parameter.10=--arg

wrapper.app.parameter.11=%1

wrapper.app.parameter.12=--arg

wrapper.app.parameter.13=%2

wrapper.app.parameter.14=--arg

wrapper.app.parameter.15=%3

wrapper.logfile=<DENODO_HOME>\\tools\\monitor\\denodo-monitor\\logs

wrapper.logfile.loglevel=ERROR

wrapper.logfile.format=LPTM

wrapper.logfile.maxsize=10m

wrapper.logfile.maxfiles=10

wrapper.syslog.loglevel=ERROR

wrapper.ntservice.name=Denodo Monitor

wrapper.ntservice.displayname=Denodo Monitor 8.0

wrapper.ntservice.description=Denodo Monitor - Denodo Platform 8.0

wrapper.ntservice.dependency.1=

wrapper.ntservice.starttype=DEMAND_START

wrapper.ntservice.interactive=false

#wrapper.affinity=

wrapper.java.maxmemory=1024

wrapper.tmp.path=<DENODO_HOME>\\work\\monitor\\service

Any other configuration parameters different from the default configuration must also be modified in this file.

After preparing you can execute the script to register the Denodo Monitor as a Windows service (note: execute this command with Administrator privileges):

denodomonitor_service.bat install

If the service is correctly deployed the following message is shown: “Service Denodo Monitor installed”.

To delete the Windows service the “remove” option can be used. To start and stop the service from the command line you can use the “start” and “stop” and the “state” option to check the status of the service.

References

Configuring and starting the Denodo Monitor

Launching the Denodo Monitor with Solution Manager

Disclaimer

The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.

For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.
Recommendation

Recommended resources Recommendations generated by AI

Denodo Monitor as a Linux Service

How to enable logging in the Denodo Monitor

invalid credentials error starting Denodo Monitor

How to start the Denodo Windows Services without Administrator privileges

How to configure the Denodo Monitor to delete old log files

Questions

Ask a question

You must sign in to ask a question. If you do not have an account, you can register here