Bug 815889

Summary: [as7] implement support for HTTP response time (call time) metrics
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: PluginsAssignee: Charles Crouch <ccrouch>
Status: CLOSED UPSTREAM QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.3CC: ccrouch, clin, hbrock, hrupp, vnguyen
Target Milestone: ---   
Target Release: JON 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-05 12:29:38 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 864619    
Bug Blocks: 707223    
Attachments:
Description Flags
screen shot none

Description Ian Springer 2012-04-24 14:14:29 EDT

    
Comment 1 Ian Springer 2012-04-24 14:43:50 EDT
This consists of two parts:

1) Figure out how to globally configure the RT servlet filter for an AS7 instance, and document the required steps.

2) Add support for a HTTP Response Time call-time metric to the "Web Runtime" type in the as7 plugin.
Comment 2 Ian Springer 2012-04-25 14:58:01 EDT
There was another work item:

3) add support to RtFilter for figuring out the server log dir when deployed to AS7

---

2) and 3) are done in master:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=9e97250

---

1) is in progress. The following info from Jean-Frederic on the AS team describes how to globally configure a servlet filter on AS7:

you need a subsystem to add your filter take any subsytem in AS7 for example and see https://docs.jboss.org/author/display/AS71/Example+subsystem for more.

In your subsystemAdd you need to to add your deployement procesor. The example PersistenceUnitDeploymentProcessor probably contains more than what you need (you just need to process wars).
Comment 3 Ian Springer 2012-04-27 11:59:29 EDT
1) is done in master:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=1726107
Comment 4 Ian Springer 2012-04-27 12:53:54 EDT
Docs for deploying the RT filter to AS7 are here:

http://rhq-project.org/display/JOPR2/JBoss+AS+7.x+Product+Configuration
Comment 5 Ian Springer 2012-04-27 13:23:47 EDT
[master http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=b118bbb] fixes a bug in the AS7 subsystem impl.
Comment 6 Viet Nguyen 2012-06-04 16:06:45 EDT
Deployed RT filter and system per http://rhq-project.org/display/JOPR2/JBoss+AS+7.x+Product+Configuration 

Please add more details on how to set up HTTP response time measurement. I was able to set response time log file location from JON but log file / Monitor|calltime is empty
Comment 7 Viet Nguyen 2012-06-04 16:11:49 EDT
Created attachment 589270 [details]
screen shot
Comment 8 Ian Springer 2012-06-04 17:34:11 EDT
Did you also enable the HTTP Response Time call-time metric under the Monitor > Schedules tab of the AS7 "Web Runtime" Resource(s)? To make testing easier, I'd also suggest setting the collection interval for that metric fairly low (e.g. 1 minute).
Comment 9 Viet Nguyen 2012-06-04 17:54:33 EDT
JON 3.1.CR1
EAP 6.0 CR1

Response time enabled, collection interval=1 minute

1.  I can set/comment out RT log location in web.xml (see agent log below) but setting it in JON GUI does not seem to have any effect (after restarting the war app)

2.  When explicitly specifying logDirectory in web.xml a new log file is created there *in addition* to the one at default location "$AS/standalone/log/rt/"  Does that work as designed?


---
17:22:00,748 INFO  [org.rhq.helpers.rtfilter.filter.RtFilter] (MSC service thread 1-5) Initialized response-time filter for webapp with context root 'GuessANumber'.
17:22:00,749 INFO  [org.rhq.helpers.rtfilter.filter.RtFilter] (MSC service thread 1-5) Initialized response-time filter for webapp with context root 'GuessANumber'.
17:22:00,750 INFO  [org.jboss.web] (MSC service thread 1-5) JBAS018210: Registering web context: /GuessANumber
17:22:00,827 INFO  [org.jboss.as.server] (HttpManagementService-threads - 23) JBAS018559: Deployed "GuessANumber.war"

17:22:12,347 INFO  [stdout] (http-/127.0.0.1:8080-1) Starting a new GuessANumber game
17:22:12,348 INFO  [org.rhq.helpers.rtfilter.filter.RtFilter] (http-/127.0.0.1:8080-1) -- Filter openFile: Writing response-time log for webapp with context root 'GuessANumber' to '/tmp/localhost_7080_GuessANumber_rt.log' (hashCode=2086393606)...
17:22:12,349 INFO  [org.rhq.helpers.rtfilter.filter.RtFilter] (http-/127.0.0.1:8080-1) -- Filter openFile: Writing response-time log for webapp with context root 'GuessANumber' to '/NotBackedUp/sandbox/jboss-eap-6.0/standalone/log/rt/GuessANumber_rt.log' (hashCode=696487908)...