Icon

Comments have been closed on this page. Please use AppMon & UEM Open Q & A forum for questions about this plugin.

Overview

 

This plugin allows you to dynamically gather JMX metrics from MBeans.

Collector Configuration:

You need to ensure the collector host is not marked as unknown. If it is, when running the plugin, you will get a local host related error. To resolve the issue for Linux:

  1. Type hostname (on the collector box in order to get the host name)
  2. In /ect/hosts define the hostname from above command)

On Windows, the host file is located: c:\windows\system32\drivers\etc\hosts

Installation

  1. Import the Plugin into the dynaTrace Server via the dynaTrace Server Settings menu -> Plugins -> Install Plugin. For details how to do this please refer to the dynaTrace documentation: Plugin Management - Dynatrace Community
  2. Navigate to the appropriate System Profile Preferences and create a new JVM Monitor.
  3. i. Enter the name for the monitor (eg. instance name).
    ii. Fill out the Settings

    1. Environment - Name of the Environment
    2. Instance Name - Name of the Instance
    3. JMX Server : Port - The JMX Server and Port <server>:<port>
    4. Password - Leave this field blank if there is no password
    5. System Profile - System Profile where JMX metrics will be used (Optional – Not used internally)
    6. Metrics - List of semicolon separated metrics (possible feature in the future, please input a wildcard "*")
    7. Agent Groups - List of semicolon separated Agent Groups (possible feature in the future, please input a wildcard "*")
    8. MBeans - List MBeans to monitor, one MBean per line (eg. java.lang:type=Memory)
    9. Attributes - List attributes to monitor, one attribute per line (eg. CollectionCount)
  4. Add the host for the monitor (Instance DNS or IP)
  5. Under the Schedule tab, configure the monitoring interval and dynaTrace Collector
  6. Under the Measures tab, configure the Thresholds. NOTE: For Dynamic Thresholds (different thresholds per server), refer to the Extended EMail Action Plugin.
  7. Confirm data collection by right clicking the server name under Monitors, then navigating to details.

Updating the Plugin

NOTE: The following steps should be taken to ensure that the Collector is running the correct plugin revision. A restart of the Collector is highly recommended.

  1. Open the System Profile Preferences
    1. Navigate to the Monitors tab in the left pane. 
    2. Select the plugin Monitor and click on the Suspend button. 
    3. Click OK to confirm the changes.
  2. Open the dynatrace Server Settings
    1. Navigate to the Plugins tab in the left pane. 
    2. Select the old version of the plugin under Installed Plugins and click on the Delete button.
    3. Click on the Install Plugin... button and upload the new revision of the plugin. Click Open, then Apply.
    4. Navigate to the Collectors tab in the left pane.
    5. Select the Collector executing the plugin and click on the Restart button.
    6. Click OK to confirm the changes.
  3. Open the System Profile Preferences
    1. Navigate to the Monitors tab in the left pane. 
    2. Select the plugin Monitor and click on the Resume button. 
    3. Click OK to confirm the changes.

Find MBean and Attributes

NOTE: Attributes need to be numeric.

  1. Start Jconsole and connect to the running JVM
  2. Click on the MBeans tab (this will show you all the exposed MBeans)
  3. From here you can expand the MBean you are interested in and also find all the associated Attributes

Open JMX port

Place the below on the argument startup for the selected JVM.

-Dcom.sun.management.jmxremote

-Dcom.sun.management.jmxremote.port=<PORT>

-Dcom.sun.management.jmxremote.authenticate=false

-Dcom.sun.management.jmxremote.ssl=false

Screenshots

Sample Dashboard

NOTE: Percentage of time in GC is based off the monitoring interval.

Monitoring Dashboard

 

  1. Anonymous (login to see details)

    Does this plugin collect PMI metrics too?

    1. Anonymous (login to see details)

      Yes, the plugin will collect PMI metrics as long as the MBeans are exposed. You can validate what MBeans you want to monitor, also the attributes, using Jconsole. This data will be stored under JVM DATA (when you want to create a Dashboard to view or alert on the data). JVM DATA is a catch all for all measures I did not configure the plugin for. All you need to do is add the MBeans and Attributes to the monitoring.

  2. Anonymous (login to see details)

    Hi Todd,

     

    Thanks for this plug-in.

     

    Assume the target JVM is Websphere 8.5. What pre-requisites have to be done in WAS before running this Plug-In. What is the default port to use for connecting using a) RMI and b) SOAP?


    In case you have connected this plug-in to a Websphere already, would you mind providing a few screenshots from both Websphere and the config screen of this utility.

     

  3. Anonymous (login to see details)

    Hi,

    Currently, I do not have a WebSphere server to develop on. So I am not exactly sure what WebSphere will expose through the JVM. This plugin was designed to connect to the JVM only.

    In the next month or so, we will be installing a WebSphere application server and I will be writing a new WebSphere plugin (like the Weblogic Plugin) that will gather all PMI data. If this is something you would be interested in, let me know and I will update this post when the plugin is completed.

    To open JMX ports on the WebSphere instance (side note: you can put a username and password on the JVM itself) you will need to add a couple arguments to the startup options (I believe it is located under WebSphere/AppServer/java/jre/lib/management/management.properties): -Dcom.sun.management.jmxremote -com.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=<port number here> -Dcom.sun.management.jmxremote.ssl=false

    The above settings will allow you to view all exposed MBean data through the JVM. You can also use JConsole to validate the values you are looking for are exposed.

    Thanks,
    Todd

  4. Anonymous (login to see details)

    Hi Todd,

    As I understand it, this plugin connects using RMI. I would like to use it on JBoss 7, but I understand that uses a different remoting protocol for JMX. Do you think it would be feasible for me to try and adapt this plugin to the new connection protocol?

    Thanks,

    Derick

    1. Anonymous (login to see details)

      Hi Derick,

      The JMX Enhanced Monitor plugin allows to monitor JBoss 7.  Please let me know if you have any further questions.

      Eugene.

  5. Anonymous (login to see details)

    Hi,

    The plugin was designed to monitor JVMs not to connect to specific Middleware instances. The plugin will collect all the metrics, mentioned above, with no modification. You just need to setup the jmxremote flags on the JVM.

    Thanks,
    Todd

  6. Anonymous (login to see details)

    Why do we use JMX Server and Port in the configuration?  Isn't the server grabbed from the host list?

  7. Anonymous (login to see details)

    Hi,

    This plugin requires you to open a JMX port on the JVM you want to monitor. It is not configured to read from the host list.

    Thanks,

    Todd

  8. Anonymous (login to see details)

    Hi,

    I am in the process of releasing a single server WebSphere plugin. Keep an eye out for when it is officially released. The WebSphere plugin uses SOAP to collect PMI data. The JVM plugin can also be used to collect the specific JVM related data.

    Thanks,
    Todd

  9. Anonymous (login to see details)

    Hi,

    The WebSphere plugin is ready for download: WebSphere Single Server Plugin

    Thanks,
    Todd

  10. Anonymous (login to see details)

    I've set up this plugin to poll a JVM on a Linux system. I only get some data when I enter "java.lang:type=Memory" in the MBeans section. But I only get a few of the memory measurements. I've tried adding others, like "java.lang:type=Threading" and "java.lang:type=Runtime", and "java.lang:type=Compilation". But when I do I get all "null" values, and a small subset of measures. 

    Could someone let me know what I'm doing wrong? What other MBeans, or attributes do I need to enter to get the full set of measures?

    Thanks
    George 

    1. Anonymous (login to see details)

      Hi,

      What JVM version are you running? Also, did you login using Jconsole to validate the MBeans and verify the data you are looking for exists? Once I know the JVM versions (and vender) I can validate on my end.

      Thanks,
      Todd

      1. Anonymous (login to see details)

        Hi,

        Try the below.

        MBeans:

        java.lang:type=Memory

        GarbageCollector

        java.lang:type=OperatingSystem

        java.lang:type=Runtime

        java.lang:type=Threading

         

        Attributes:

        CollectionCount

        HeapMemoryUsage

        CollectionTime

        MaxHeapSizeLimit

        DaemonThreadCount

        ThreadCount

        TotalSwapSpaceSize

        FreeSwapSpaceSize

        AvailableProcessors

        TotalCompacts

        ProcessingCapacity

        SystemLoadAverage

        ProcessCpuTime

        ProcessCpuTimeByNS

        Uptime

         

        Thanks,

        Todd

         

        1. Anonymous (login to see details)

          Thanks! I tried these and I'm getting data now! Not all fields are getting data, but the important ones are! This also worked mostly for the JVM hosted on a websphere system. 

          1. Anonymous (login to see details)

            Hi,

            Good to hear. Depending on the JVM and OS, the MBeans/Attributes will be a little different. Using Jconsle will help isolate the correct MBean/Attributes to use. When you run the plugin, it is common to see null, if you view the "details" of the run. But you should see all the attributes you selected having data. If they don't, most likely it is because the MBean or Attribute name is not correct for your environment.

            If there is anything else I can help with, feel free to reach out.

            Thanks,
            Todd

          2. Anonymous (login to see details)

            Hi George,

            I want to make sure that you saw this post. Enjoy! (smile)

            Eugene.

  11. Anonymous (login to see details)

    Hi,

     

    We have built custom Mbeans and we would like to monitor them although when I implement the plugin for the MBeans as well as the attributes it is not returning anything. We are running it on version 6.2.5.

     

    WHen I try it with the built-in MBeans and Attributes then it is pulling values. is there anything that I should try or will the plugin require to be modified for it to capture the custom one. 

    Please do let me know as soon as possible so that I can test.

     

    regards

    Katlego

    1. Anonymous (login to see details)

      Hi,

      With the custom metrics, look under JVMData when charting the measures. This is a catch all (everything the plugin was not designed to capture).

      Thanks,
      Todd

  12. Anonymous (login to see details)

    Thanks Todd,

    Let me test and I will confirm soon enough.

    I see that it only captures numeric values, would the JVM DATA when being charted also yield the same results?

    regards

    Katlego

    1. Anonymous (login to see details)

      Hi,

      Correct, we can only capture numeric values.

      Thanks,
      Todd

  13. Anonymous (login to see details)

    Hi Todd - so I have tested and i noticed that with the Mbean java.lang:type=Memory | NonHeapMemoryUsage we are seeing these values although when I look at the data type that is being used i notice that it is "javax.management.openmbean.CompositeData", i see that I am using java.lang.Interger. would there be a difference in this when it is being referenced to numeric values.

     

    I have also tested this with other Mbeans and this works with them.

    Can you confirm this for me?

    Kind regards

    Katlego

    1. Anonymous (login to see details)

      Hi,

      The plugin is designed to figure out what type of data you are trying to extract (Composite Data, Tabular Data, and String etc.).

      Are you not able to get the Integer value? If not, I will review my code base and validate.

      Thanks,
      Todd

  14. Anonymous (login to see details)

    Looks like the sampling rate is every 10 seconds, How can I change the sample rate?

    1. Anonymous (login to see details)

      10s is the smallest granularity that dynatrace provides. You do however have other scheduling options available. you can select them in the Scheduling Tab when you edit your monitor settings