mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
CORDA-3244, CORDA-3245 - Jolokia docs update (#5486)
* Fixed wrong command line. Added security policy how to. * Elaborated on security policy to mention when it applies and when not. * Changes according to PR review. * Magic to get jolokia version from a single place and forwarded to the docs.
This commit is contained in:
parent
8a5b6ed52b
commit
6de6702cb4
@ -32,3 +32,5 @@ metricsVersion=4.1.0
|
||||
metricsNewRelicVersion=1.1.1
|
||||
openSourceBranch=https://github.com/corda/corda/blob/master
|
||||
openSourceSamplesBranch=https://github.com/corda/samples/blob/master
|
||||
jolokiaAgentVersion=1.6.1
|
||||
|
||||
|
@ -25,7 +25,8 @@ corda_substitutions = {
|
||||
"|quasar_version|" : constants_properties_dict["quasarVersion"],
|
||||
"|platform_version|" : constants_properties_dict["platformVersion"],
|
||||
"|os_branch|" : constants_properties_dict["openSourceBranch"],
|
||||
"|os_samples_branch|" : constants_properties_dict["openSourceSamplesBranch"]
|
||||
"|os_samples_branch|" : constants_properties_dict["openSourceSamplesBranch"],
|
||||
"|jolokia_version|" : constants_properties_dict["jolokiaAgentVersion"]
|
||||
}
|
||||
|
||||
def setup(app):
|
||||
|
@ -81,6 +81,12 @@ Note that in production, exposing the database via the node is not recommended.
|
||||
Monitoring your node
|
||||
--------------------
|
||||
|
||||
This section covers monitoring performance and health of a node in Corda Enterprise with Jolokia and Graphite. General best practices for monitoring (e.g. setting up TCP checks for the ports the node communicates on, database health checks etc.) are not covered here but should be followed.
|
||||
|
||||
|
||||
Monitoring via Jolokia
|
||||
++++++++++++++++++++++
|
||||
|
||||
Like most Java servers, the node can be configured to export various useful metrics and management operations via the industry-standard
|
||||
`JMX infrastructure <https://en.wikipedia.org/wiki/Java_Management_Extensions>`_. JMX is a standard API
|
||||
for registering so-called *MBeans* ... objects whose properties and methods are intended for server management. As Java
|
||||
@ -106,8 +112,12 @@ Here are a few ways to build dashboards and extract monitoring data for a node:
|
||||
It can bridge any data input to any output using their plugin system, for example, Telegraf can
|
||||
be configured to collect data from Jolokia and write to DataDog web api.
|
||||
|
||||
The Node configuration parameter `jmxMonitoringHttpPort` has to be present in order to ensure a Jolokia agent is instrumented with
|
||||
the JVM run-time.
|
||||
In order to ensure that a Jolokia agent is instrumented with the JVM run-time, you can choose one of these options:
|
||||
|
||||
* Specify the Node configuration parameter ``jmxMonitoringHttpPort`` which will attempt to load the jolokia driver from the ``drivers`` folder.
|
||||
The format of the driver name needs to be ``jolokia-jvm-{VERSION}-agent.jar`` where VERSION is the version required by Corda, currently |jolokia_version|.
|
||||
* Start the node with ``java -Dcapsule.jvm.args="-javaagent:drivers/jolokia-jvm-1.6.0-agent.jar=port=7777,host=localhost" -jar corda.jar``.
|
||||
|
||||
|
||||
The following JMX statistics are exported:
|
||||
|
||||
@ -126,6 +136,8 @@ via a file called ``jolokia-access.xml``.
|
||||
Several Jolokia policy based security configuration files (``jolokia-access.xml``) are available for dev, test, and prod
|
||||
environments under ``/config/<env>``.
|
||||
|
||||
To pass a security policy use ``java -Dcapsule.jvm.args=-javaagent:./drivers/jolokia-jvm-1.6.0-agent.jar,policyLocation=file:./config-path/jolokia-access.xml -jar corda.jar``
|
||||
|
||||
Notes for development use
|
||||
+++++++++++++++++++++++++
|
||||
|
||||
|
@ -3,7 +3,12 @@ buildscript {
|
||||
def properties = new Properties()
|
||||
file("$projectDir/src/main/resources/build.properties").withInputStream { properties.load(it) }
|
||||
|
||||
ext.jolokia_version = properties.getProperty('jolokiaAgentVersion')
|
||||
|
||||
Properties constants = new Properties()
|
||||
file("$rootDir/constants.properties").withInputStream { constants.load(it) }
|
||||
|
||||
|
||||
ext.jolokia_version = constants.getProperty('jolokiaAgentVersion')
|
||||
|
||||
dependencies {
|
||||
classpath group: 'com.github.docker-java', name: 'docker-java', version: '3.1.5'
|
||||
|
@ -1,4 +1,6 @@
|
||||
# Build constants exported as resource file to make them visible in Node program
|
||||
# Note: sadly, due to present limitation of IntelliJ-IDEA in processing resource files, these constants cannot be
|
||||
# imported from top-level 'constants.properties' file
|
||||
jolokiaAgentVersion=1.6.1
|
||||
#jolokiaAgentVersion=1.6.1
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user