-
1. Re: 50x metrics collection using JOPR
ips Jul 16, 2010 10:46 AM (in response to ssroy73)Which type of Resource are you referring to - JBossAS Server, Tomcat Server, or Apache Server? Also, what are the names of the metric(s) you are referring to?
-
2. Re: 50x metrics collection using JOPR
ssroy73 Jul 16, 2010 11:06 AM (in response to ips)Thanks Ian for prompt reply.
I am referring to Apache server. We are using Apache as web server and Jboss as application server in our application. We are using mod_proxy_ajp to connect apache with JBoss 4.2.3 server.
From Administration --> System Configuration --> Templates screen, while editing template for 'Apache Virtual Host', I found there is no option for 501/502/503 etc metrics. There is only one option for 'Number of 500 response'/'Number of 500 responses per minute'. But in our application we need to capture metrics for 501/502/503 etc.
Also from default configuration screen (Administration --> System Configuration --> Templates) under 'Apache Http Server', I can see option for MOD_JK only. Does this mean that in our application we need to use mod_jk connector and not mod_proxy_ajp.
Thanks for your help.
Best Regards,
Roy
-
3. Re: 50x metrics collection using JOPR
ips Jul 16, 2010 5:39 PM (in response to ssroy73)I just peeked at the Apache plugin's descriptor (META-INF/rhq-plugin.xml inside the apache plugin jar) and as you said it defines a metric for 500 responses, but not for other 50x responses. The 500 responses metric is defined as follows:
<metric displayName="Number of 500 Responses" property="wwwResponseOutResponses.500" description="The number of 500 responses generated by this service" defaultOn="true" defaultInterval="300000" units="none" measurementType="trendsup"/>
I believe the SNMP Apache module that exposes the various metrics does support all of the other response codes, so you should be able to add additional metrics for 501 etc. by just adding some new metrics to the plugin descriptor, e.g.:
<metric displayName="Number of 501 Responses" property="wwwResponseOutResponses.501" description="The number of 501 responses generated by this service" defaultOn="true" defaultInterval="300000" units="none" measurementType="trendsup"/>
Note, I had to change "500" to "501" in three places.
After adding the new metrics, you'll need to deploy the updated apache plugin to the RHQ Server and then to each of your Agents. To do so, follow the instructions here:
http://www.rhq-project.org/display/JOPR2/Adding+and+Updating+Agent+Plugins
If you'd like to see the new 50x metrics added to RHQ, create an enhancement request in RHQ Bugzilla and optionally submit a patch.
-
4. Re: 50x metrics collection using JOPR
ssroy73 Jul 19, 2010 3:25 AM (in response to ips)Thanks a lot Ian and really appreciate your help.
I will do the changes as you have suggested.
Best Regards,
Roy
-
5. Re: 50x metrics collection using JOPR
ssroy73 Jul 20, 2010 3:32 AM (in response to ssroy73)Thanks a lot Ian.
I could implement the changes as you have suggested.
One more query:
In the template screen, under 'Appache Http Server' there are 2 options (a) Apache Virtual Host (b) Mod JK. Can you please tell me the significance of this MOD JK. Does this mean that if I use mod_proxy_ajp, I will not be able to collect connector metrics (i.e., if I want to collect connector metrics, I have to use MOD JK). Request you to please confirm
Thanks a lot and really appreciate your help.
Best Regards,
Roy