bcm_hyperic
Contributor
Contributor

autodiscovered tomcat webapp config problem

Jump to solution
i'm running an instance of tomcat 5.5. i copied all the required files into tomcat's common/lib and webapps dirs and enabled the filter in my webapp's web.xml. then i edited the server's config properties in hq, specifying the correct jmx url and turning on autodiscovery.

the services that were discovered were a connector and a webapp. neither of them seem to be correctly configured, tho. the connector has two identical config properties entries (the data is correct in both). the webapp also has two identical config props, but the context path is wrong - it was discovered as /webapp, but it should be /cosmo. i tried changing it to that, but that failed with "nstance not found hyperic-hq:type=Context,name=/cosmo". did i misconfigure something in my webapp?

for reference, the jmx dump (http://localhost:8080/hyperic-hq/jmx-attributes?dmp=hyperic-hq:*) looks like this:

Time: 1149644215276
Remote: 127.0.0.1
User: null
Server: Apache Tomcat/5.5.9

Name: hyperic-hq:type=RuntimeInfo
TotalMemory: 33357824
FreeMemory: 14727408
ActiveThreadCount: 23
ActiveThreadGroupCount: 3

Name: hyperic-hq:type=ProcessInfo
MemSize: 890380288
MemVsize: 890380288
MemResident: 78622720
MemShare: -1
MemPageFaults: 31345
TimeUser: 17
TimeSys: 3

Name: hyperic-hq:type=ServerMeasurement
Uptime: 678983
Available: 1
ServerInfo: Apache Tomcat/5.5.9

Name: hyperic-hq:type=Context,name=/webapp
Available: 1
DocBase: /Users/bcm/work/osaf/cosmo/src/webapp/
MaxTime: 0
RequestCount: 0
ErrorCount: 0
BytesReceived: 0
BytesSent: 0
ContextName: /webapp
MinTime: 0
TotalTime: 0
ResponseTimeLogDir: /usr/local/hyperic/logs
AvgTime: 0
SessionsCreated: 0
SessionsDestroyed: 0

Name: hyperic-hq:type=AllContextInfo
RequestCount: 0
TotalTime: 0

Message was edited by: bcm
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
The only configuration item you should need to modify is the jmxUrl configuration parameter for the Tomcat 5.5 server resource. The configuration for all the auto-discovered services should be detected automatically.

Try to delete your Tomcat server and re-import. Then configure the jmxUrl for the Tomcat 5.5 server resource. Perhaps the attempts to change the configuration for the services threw off the scheduling of metrics.

You may also want to restart your agent, the log file should never be 0 bytes unless you have never started it 🙂

View solution in original post

0 Kudos
5 Replies
DreadPirateFlin
Contributor
Contributor
What's running on the root (/) of your application server? I have a webapp that's configured to live at "/", and it shows up in hyperic as '/webapp'.

/DPF
admin
Immortal
Immortal
The webapp name is derived using ServletContext.getRealPath(java.lang.String path). It's detecting the name as /webapp since that is the directory your webapp is deployed into. Even though the name is not what you expect, the service is collecting metrics, right?

If so, I'll look into what we can do to better detect the context name.

What errors are you getting with monitoring the connectors? You are correct in that the configuration is showing up multiple times, but that should only be a cosmetic issue. I have logged this as http://jira.hyperic.com/browse/HHQ-66

Is there anything relevant in your agent.log?
bcm_hyperic
Contributor
Contributor
yep, the filesystem path for the webapp is /Users/bcm/work/osaf/cosmo/src/webapp, so that makes sense. i was expecting the service's name to be derived from its context path, but your explanation makes sense.

i don't actually have access to the hq server at the moment, so i can't verify metrics are being collected for the service, but yesterday for the hour or so after the webapp was being discovered, only availability was being collected despite all my attempts to tell hq to collect and/or chart more 🙂

i'm not sure that i am getting any errors with the connector. the config looks correct, but again i'm only getting availability, no other metrics.

agent.log is empty (0 bytes).
0 Kudos
bcm_hyperic
Contributor
Contributor
> i don't actually have access to the hq server at the
> moment, so i can't verify metrics are being collected
> for the service

let me qualify that - once i made some requests to my webapp, the jmx dump from the url in my original post reflected the number of requests i'd made, sessions started and stopped, etc. i just wasn't able to see any of this data in the ui.
0 Kudos
admin
Immortal
Immortal
The only configuration item you should need to modify is the jmxUrl configuration parameter for the Tomcat 5.5 server resource. The configuration for all the auto-discovered services should be detected automatically.

Try to delete your Tomcat server and re-import. Then configure the jmxUrl for the Tomcat 5.5 server resource. Perhaps the attempts to change the configuration for the services threw off the scheduling of metrics.

You may also want to restart your agent, the log file should never be 0 bytes unless you have never started it 🙂

View solution in original post

0 Kudos