Configuration

Java Agent configuration is stored in the file plumbr.properties located next to the Plumbr Java Agent .jar file. This configuration is used to monitor a single JVM in one machine. When monitoring multiple JVMs in the same machine make sure that every JVM uses a different Plumbr installation to avoid clashing in the configuration.

Basic configuration

Configuration parameters in this section are required for the Plumbr Agent to connect to the Plumbr Server, link the JVM to your account, and identify the JVM so that you could distinguish between the different JVMs monitored by Plumbr.

  • accountId – your account identifier, which binds this Agent to your account in the Plumbr Server. This identity is generated and embedded into the downloaded Agent configuration for you. During normal use, you should not change the value of the parameter.
  • jvmId – (optional if clusterId is set) JVM identifier, binding data from this particular JVM to a correct JVM in the Plumbr Server. When this identity is not provided, the connected JVM gets assigned a temporary identifier, which will not survive over JVM restarts. In order to have the data connected to the same JVM, provide the identifier either as a value of this property or via the server-side UI.
  • clusterId –  (optional if jvmId is set) identifier of the JVM cluster. ClusterId is the preferred way of grouping jvm transactions under predetermined application (application discovery logic more precisely described). JVMs with same clusterId are also grouped together on the Plumbr server side views, where appropriate (like Architecture views).  Setting clusterId is useful, when individual JVMs run the same code and/or run in dynamically provisioned environments. If the value of clusterId is unspecified, no cluster grouping is applied to this JVM.
  • serverUrl – the server to which the Agent connects. If you are using On Demand Plumbr, make sure the value refers to https://app.plumbr.io If the Agent is connecting to a Plumbr Server installed in your premises, make sure you have specified the correct server URL.
  • appVersion – the version of the application being monitored. It is advised to use environment variable flavour (PLUMBR_APP_VERSION) of this option.

Proxy configuration

When your network configuration requires outgoing communication to pass a proxy server you can set up the communication between the Plumbr Agent and the Server via a proxy. Specifying the values for these parameters redirects the traffic from the Agent to the Server via the proxy server specified in proxyUrl.

  • proxyUrl – the proxy URL that you can use to connect to the Plumbr Server if a direct connection from Agent is not possible. If proxy is used, this setting is mandatory; other proxy settings are optional. An example of the parameter: proxyUrl=http://squid.mycompany.com:3128.
  • proxyAuthUser – the username for proxy authentication. Note that the Plumbr Agent only supports Basic authentication.
  • proxyAuthPassword – the password for proxy authentication. Note that the Plumbr Agent only supports Basic authentication.

Logging configuration

Parameters in logging configuration are used to tune the logging of the Plumbr Agent.

  • logConf – the location of the Logback configuration file Plumbr Agent uses for logging purposes. Detailed logging configuration is embedded in the referred XML file which you can tune to suit your needs.
  • tmpDir – the location of the temporary files generated by Plumbr during runtime. Such temporary data includes the buffered data Agent has not yet sent to the Server and temporary data structures used during Agent-side analysis. The location is relative to the location of the Plumbr Agent in the file system.
  • doCleanup – whether or not Plumbr deletes the temporary files after they are no longer needed. Switch this to false only when told so by Plumbr support.

Configuration via environment

If you cannot use the configuration via a property file, an alternative is to configure the Agent by specifying parameters in the JVM startup script using environment variables, prefixing each parameter with the “PLUMBR_” prefix and converting camel-case property names to the standard upper case snake case. So, for example, you could specify the accountId, jvmId, clusterId and serverUrl parameters for your JVM like this:

set PLUMBR_ACCOUNT_ID=a8nd2bar 
set PLUMBR_JVM_ID=node1 
set PLUMBR_CLUSTER_ID=Payment 
set PLUMBR_SERVER_URL=https://app.plumbr.io 
set PLUMBR_APP_VERSION=1.0.352.RELEASE
java com.acme.MainClass

Please note that if you do not use a property file at all, you will need to pass the following properties via parameters: PLUMBR_ACCOUNT_ID, PLUMBR_SERVER_URL, PLUMBR_LOG_CONF (just copy their values from the property file that you have downloaded with the Plumbr Java Agent installation package) and either PLUMBR_JVM_ID or PLUMBR_CLUSTER_ID. One of them is optional only if the other is present.