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?
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.
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:
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.
Thanks a lot Ian and really appreciate your help.
I will do the changes as you have suggested.
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.