Attaching to a Windows Service
The following installation guide is using Tomcat as an example. When installing Plumbr Agent to a different application server or a standalone program, make the necessary adjustments.
Different flavors of Tomcat
Tomcat can be used in two different flavors – either as a standalone or as an embedded solution (such as running the Atlassian Confluence for example). The installation guides for these flavors differ slightly
Standalone Tomcat
Service configuration for stand-alone tomcat can be accessed via shortcut in Programs as seen below:
In the configuration window, select JVM tab and append -javaagent:path\to\plumbr.jar to the list of Java Options as seen below:
Embedded Tomcat
If the Tomcat is embedded into some third-party product, is launched as a service, but does not have a corresponding shortcut to the configuration window anywhere under Programs, then the service configuration can be accessed as follows (see this document for more details:https://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html).
In the home folder of the 3rd party software, which includes Tomcat, find a file called tomcat6w.exe and double click it to launch. This will open the Configuration window shown before.
It can happen, that the tomcat is installed as service with the custom service name (Tomcat6 by default). In this case you will see a message like this:
Then the service name must be explicitly passed to the tomcat6w.exe via command line. To find out the service name, open Windows’ Services configuration and find the windows service belonging to the 3rd party application (the one you usually restart). On the following image, the service name is Tomcat’s default, it will be something else in this case:
Copy the service name, open command prompt, navigate to the folder containing tomcat6w.exe and run following command:
> .\tomcat6w.exe //ES//<ServiceName you have copied>
This will open the required configuration window.