Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For this purpose the CMR with Agent run configuration will be available and should be used when self-monitoring is needed.

The only prerequisite for self-monitoring is to start another CMR instance that will collect data from the monitoring one. This instance should redefine ports, so that RMI ports are 9080 and 9081. The HTTP port must also be redefined, for example to 8183. Note that the user interface can then connect to both CMRs, but the one having the monitoring data will be the one bounded to the 8183 portgeneral idea is that CMR that is being monitored sends data to it self. Basically only one CMR needs to be started with the Agent and that's it. Although the Agent will fail to connect initially to the CMR, after the CMR has been started the Agent will be able to connect. 

Process

You can Simply start both CMR from Eclipse. 

  1. Change the ports in src/config/cmr.properties: registryPort -> 9080 servicePort -> 9081
  2. Change the http port in src/config/jetty.properties: jetty.port -> 8183
  3. Start the CMR using the default startup Script "Start CMR" (or just executing the CMR.java class). Wait for the CMR to be started
  4. Reset the changes in the configuration files
  5. Start the instrumented CMR using the run configuration "CMR with Agent"
  6. now you can run your normal application against the instrumented CMR.

the CMR with Agent run configuration. Make sure that the agent is built and available.

Info
titleExpect exceptions

It might be possible that the Agent reports some kind of exceptions while running on the CMR, but these do not influence the monitoring. 

 

Configuration

Currently this configuration is defined:

Code Block
## repository <IP> <port> <Agent Name>
#############################################
repository localhost 90809070 Development/CMR
## method-sensor-type <name> <fully-qualified-name> <priority> [<additional options>]
#####################################################################################
# method-sensor-type average-timer info.novatec.inspectit.agent.sensor.method.averagetimer.AverageTimerSensor HIGH stringLength=100
method-sensor-type timer info.novatec.inspectit.agent.sensor.method.timer.TimerSensor MAX stringLength=100
method-sensor-type isequence info.novatec.inspectit.agent.sensor.method.invocationsequence.InvocationSequenceSensor INVOC stringLength=100
method-sensor-type jdbc-connection info.novatec.inspectit.agent.sensor.method.jdbc.ConnectionSensor MIN
method-sensor-type jdbc-prepared-statement info.novatec.inspectit.agent.sensor.method.jdbc.PreparedStatementSensor MIN
method-sensor-type jdbc-prepared-statement-parameter info.novatec.inspectit.agent.sensor.method.jdbc.PreparedStatementParameterSensor MIN
method-sensor-type jdbc-statement info.novatec.inspectit.agent.sensor.method.jdbc.StatementSensor MIN 
## exception-sensor-type <fully-qualified-name> [<additional options>]
######################################################################
exception-sensor-type info.novatec.inspectit.agent.sensor.exception.ExceptionSensor mode=simple
## platform-sensor-type <fully-qualified-name> [<additional options>]
#####################################################################
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.ClassLoadingInformation
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.CompilationInformation
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.MemoryInformation
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.CpuInformation
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.RuntimeInformation
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.SystemInformation
platform-sensor-type info.novatec.inspectit.agent.sensor.platform.ThreadInformation
## send-strategy <fully-qualified-name>
#######################################
send-strategy info.novatec.inspectit.agent.sending.impl.TimeStrategy time=5000
# send-strategy info.novatec.inspectit.agent.sending.impl.ListSizeStrategy size=10
## buffer-strategy <fully-qualified-name>
#########################################
buffer-strategy info.novatec.inspectit.agent.buffer.impl.SimpleBufferStrategy
#buffer-strategy info.novatec.inspectit.agent.buffer.impl.SizeBufferStrategy size=12
## Ignore classes settings
#########################################
$include common/exclude-classes.cfg
## SQL tracing
##############
$include common/sql.cfg
## Uncomment configuration file under to enable parameter binding for SQL queries. This feature allows to have
## prepared Statements filled with the concrete parameter value that it was executed with, instead of just "?" values.
## Bear in mind that activating this feature will affect performance in a negative way as more methods need to be instrumented.
$include common/sql-parameters.cfg
# All services are proxies
sensor isequence info.novatec.inspectit.cmr.service* * modifiers=pub interface=true
sensor timer info.novatec.inspectit.cmr.service* * modifiers=pub interface=true
# All DAOs
sensor timer info.novatec.inspectit.cmr.dao.* * modifiers=pub,prot @org.springframework.stereotype.Service interface=true
# Buffer
sensor timer info.novatec.inspectit.cmr.cache.IBuffer put interface=true
sensor timer info.novatec.inspectit.cmr.cache.IBuffer evict interface=true
sensor timer info.novatec.inspectit.cmr.cache.IBuffer analyzeNext interface=true
sensor timer info.novatec.inspectit.cmr.cache.IBuffer indexNext interface=true
# Storage
sensor timer info.novatec.inspectit.storage.StorageManager * modifiers=pub superclass=true
sensor timer info.novatec.inspectit.storage.StorageWriter * modifiers=pub,prot @org.springframework.stereotype.Component superclass=true
sensor timer info.novatec.inspectit.cmr.storage.CmrStorageRecorder stop*
sensor timer info.novatec.inspectit.cmr.storage.CmrStorageRecorder start*
sensor timer info.novatec.inspectit.cmr.storage.CmrStorageRecorder record
# Indexing
sensor timer info.novatec.inspectit.cmr.indexing.impl.RootBranchFactory$RootBranch * modifiers=pub
# Aggregation
sensor timer info.novatec.inspectit.indexing.aggregation.impl.AggregationPerformer * modifiers=pub,prot @org.springframework.stereotype.Repository
# NIO
sensor timer info.novatec.inspectit.storage.nio.write.WritingChannelManager write*
sensor timer info.novatec.inspectit.storage.nio.read.ReadingChannelManager read*
# File upload servlet
sensor timer  info.novatec.inspectit.cmr.jetty.FileUploadServlet doGet
# All our exceptions
exception-sensor info.novatec.inspectit*