vCenter

 View Only
  • 1.  enable collection of metric data

    Posted Nov 19, 2008 01:47 AM
    I just downloaded and tried Hyperic for the first time, and had a lot of difficulty figuring out how to enable collection of metric data (e.g., JVM Total Memory utilization in the bundled Tomcat 5.5). I found its JVM Active Thread Count, Show All Metrics, and the Disable Collection button, but it took me a long time from there to realize that the right-triangle was a button that would do what I was looking for.

    So, I suggest renaming that right-triangle button to Enable Collection.

    Also, even after enabling them all, it only added data for the JVM Free and Total Memory. All the Process metrics below that are 0. Do I need to configure something else? (Win XP)


  • 2.  RE: enable collection of metric data

    Posted Nov 19, 2008 05:38 PM
    Hi David,

    Thanks you for trying HQ. Sorry to hear that it was slow going getting started. (FYI, we're mid-way through a documentation rewrite, so hopefully we're on the road to improved experience for the new user.

    It occurs to me that one deficit in the getting started documentation is to make clear that for some resource type, there's a bit of configuration to be done to enable full metric collection. I'll take a look at that.

    Tomcat is a case in point - if you look at this page: http://support.hyperic.com/display/hypcomm/Tomcat+5.5+server, you'll see some instructions. I'm assuming that you didn't find this info on your own.

    Also, I'm attaching a new document, intended to help the new user explore HQ functionality. Would love it you'd look it over and let me know if you find it useful.

    m

    FYI,


  • 3.  RE: enable collection of metric data

    Posted Nov 19, 2008 09:40 PM
    Hi Marie,

    Thanks for responding! The product tour PDF looks good; I'll check it out. I didn't find the Tomcat 5.5 server page. But, it looks similar to HQ Tomcat 5.5 resource -> Tools Menu -> Configure Server, which says:

    NOTE: If you are monitoring HQ's internal Tomcat, these steps are not necessary.

    So I didn't try any of that, trusting that HQ had properly configured its own Tomcat. That page doesn't mention mx4j-jmx.jar, though. Is that jar necessary for JDK 1.5 and 1.6? I'll try some more.


  • 4.  RE: enable collection of metric data

    Posted Nov 25, 2008 03:49 PM
    Hi David. I'm concerned that you couldn't find that page. Can you please try that link again, and let me know what message you get?

    I'm pasting in the instructions from http://support.hyperic.com/display/hypcomm/Tomcat+5.5+server. You do need to perform this config to other Tomcat instances other than the HQ-internal one. I see that there is a difference in instructions that I pointed you to and the ones embedded in the configuration page. The prior do indeed refer to mx4j-jmx.jar. FYI, I'll investigate discrepancy and ensure that one or the other set if instructions gets fixed.

    ----

    Configuration help:

    Configure Tomcat 5.5 for Monitoring

    To enable monitoring of Tomcat servers and services the Tomcat server must be instrumented using a filter to collect metrics and a webapp to deliver the metric data into HQ. The web application, filter and any additional jars are packaged in the HQ agent directory under product_connectors/servlet. All commands below should be issued from this directory.

    If you are using Apache/JK to front your Tomcat installation you will need to setup a mount point. This can be done by adding the following to your Apache configuration file.

    JkMount /hyperic-hq/* ajp13


    The first step to making Tomcat monitorable is to install the filter, JMX jars and webapp. These are used to collect internal Tomcat metrics.

    cp libs/hq-filter.jar ${installpath}/common/lib
    cp libs/mx4j-jmx.jar ${installpath}/common/lib
    cp -R hyperic-hq ${installpath}/webapps


    Finally, the filter must be enabled. The following must be added to ${installpath}/conf/web.xml. Keep in mind that each tag type must be grouped together.

    <filter>
    <filter-name>JMXFilter</filter-name>
    <filter-class>org.hyperic.hq.product.servlet.filter.JMXFilter</filter-class>

    <!-- Uncomment the following line to enable response time logging.
    The directory you specify as the param can include properties
    referenced from the System.properties of the vm.

    The ResponseTime log file will by default store the last 1 hour's
    worth of response time data. This file gets truncated as soon as
    data is succesfully sent into the server. The file is named uniquely
    for each webapp in the form: yourContextName_HQResponseTime.log

    If this fragment is included in the global web.xml for the container,
    all webapps in it will generate response time data, and have logs
    following the format described above. You can enable it individually
    on each webapp as well if you dont want every webapp to generate
    response time data

    -->
    <!--
    <init-param>
    <param-name>responseTimeLogDir</param-name>
    <param-value>/home/johnmark/software/hyperic-hq-agent-3.1.0/logs</param-value>
    </init-param>
    -->

    <!-- these are optional parameters which you can override to optimize logging -->
    <!--
    <init-param>
    <param-name>bufferSize</param-name>
    <param-value>8k</param-value>
    </init-param>

    <init-param>
    <param-name>bufferTime</param-name>
    <param-value>1h</param-value>
    </init-param>
    -->
    </filter>

    <filter-mapping>
    <filter-name>JMXFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
    <listener-class>org.hyperic.hq.product.servlet.filter.JMXSessionListener</listener-class>
    </listener>

    <servlet>
    <servlet-name>JMXWebappMetricServlet</servlet-name>
    <servlet-class>org.hyperic.hq.product.servlet.filter.JMXFilterInitServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>


    This can be tested by verifying your webapps show up correctly in the JMX Servlet. You may need to modify the hostname in the URL if your jmxUrl is configured relative to the agent host.

    Configure Tomcat 5.5 for Log Tracking

    To enable Log Tracking in HQ, Tomcat must be configured with log4j. These steps are based on the standard Tomcat documentation.

    If the file ${installpath}/common/classes/log4j.properties does not exist, create one with the following example contents:

    #These properties can be modified. The only requirement is that the
    #ConversionPattern includes the priority (%p)
    log4j.rootLogger=INFO, R
    log4j.appender.R.File=${catalina.home}/logs/tomcat.log
    log4j.appender.R.MaxBackupIndex=1
    log4j.appender.R.MaxFileSize=5000KB
    log4j.appender.R.layout.ConversionPattern=%d %-5p [%c{1}] %m%n
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R=org.apache.log4j.RollingFileAppender


    Next, copy the following jars unless they have already been installed:

    cp pdk/lib/log4j.jar ${installpath}/common/lib
    cp pdk/lib/commons-logging.jar ${installpath}/common/lib


    Restart Tomcat for the changes to take effect.

    General Log and Config Track Properties

    * Enable Config Tracking - Check to enable config tracking.
    * Configuration Files - Comma delimited list of configuration files to track. Relative files are resolved to ${installpath}.
    * Enable Log Tracking - Check to enable log tracking.
    * Track event log level - Only track events of level greater than or equal to this level. Order is: [Error, Warn, Info, Debug]
    Mapping:
    o FATAL,ERROR -> Error
    o WARN -> Warn
    o INFO -> Info
    o DEBUG -> Debug
    * Log Pattern Match - Include messages that match the given regular expression. The given pattern can be a substring to look for in log messages or a regular expression. See: java.util.regex.Pattern.
    * Log Pattern Exclude - Exclude messages that match the given regular expression.
    * Log Files - Comma delimited list of log files to track. Relative files are resolved to ${installpath}.


  • 5.  RE: enable collection of metric data

    Posted Nov 27, 2008 03:44 AM
    Hi Marie,

    That link worked fine for me. I was just confirming that, as you assumed, I hadn't found that page on my own before I started this thread.

    Also, I think I've found what I was looking for. I still don't get the HQ Tomcat 5.5 process metrics, but I don't really care about the processes on Windows anyway. The "Sun JVM 1.5" (actually 1.6) server has the metrics I want from JMX. The "Apache Tomcat 6.0" server also seems to be able to use just JMX without needing a special filter or servlet. I guess I need to configure a separate JMX port for each JVM, and add them to Hyperic manually, but that's OK.

    Cheers,
    11011011