VMware Cloud Community
DreadPirateFlin
Contributor
Contributor

Apache 1.3 vhosts work....KINDA

Hi gang,

Major props to the developers of hyperic, they've taken a very complex and difficult problem and have built a simple, yet powerful tool to make the problem much more managable. Thanks, gang.

I'm having a problem with the Apache 1.3 Vhost set up. I have one webserver serving up 10 or so different websites. One is Very Busy, the others are Not So Busy. The vhosts that are not so busy show up fine in hyperic, but the one that is Very Busy, shows up as all zeros for its metrics. It sees it, but it doesn't seem to be getting the proper values. Any ideas? It seems that it could be an apache config problem, but I'm not sure. The Very Busy vhost is set up identically (far as I can tell) to the ones that gathering is working properly for.

Thanks!

Kurt
Reply
0 Kudos
5 Replies
DreadPirateFlin
Contributor
Contributor

I'm posting an addendum to this message in hopes of getting a response. Simple question- does HQ get ALL its information about an apache (1.3) server from the SNMP plugin? The situation is basically this- I have 3 vhosts configured on an apache 1.3 server. They are all set up to use mod_jk to send requests to tomcat backends. 2 of the 3 vhosts come through with data, but the 3rd one doesn't. This 3rd one gets the most requests by far (10-20x?). But I just realized that its access_log file is named something differently than the vhost name. The other two access.log files (for the hosts that work) are named for the vhost. Anyone know if this matters? Is the name of the vhost log file somehow related to being able to capture stats on the vhost? I would normally just rename the file to be the vhost and see what happens, but this is a very busy production site, and have wired in the name of the log file in quite a few other places (awstats, etc). Thoughts? Thanks for any help or insight you could provide!
Reply
0 Kudos
john_hyperic
Hot Shot
Hot Shot

The metrics for Apache are from SNMP, so the name of the access log would have no bearing on that. The configuration settings that are important are:
- SNMP connection settings on the Apache server resource (sounds like its ok)
- server.name, hostname and port settings on the Apache Vhost service (auto-discovered)

The auto-discovered values are taken from SNMP which in turn, gets its info from the Apache configuration. The things to look for in the Apache configuration for the vhost is ServerName and Port. Is there a ServerName specified for this vhost? If it's on a separate port from any other vhosts, you need to be sure there is a Port directive specified for that port (pretty sure this is the case for Apache 1.3).

If all those things look good, we'll have to dig further.
Reply
0 Kudos
DreadPirateFlin
Contributor
Contributor

Problem solved! Thanks for the reply! On a WAG (wild-a**-guess) I went and renamed the log file anyway to be <name of ServerName in vhost apache declaration>.access_log, similarly to the other vhosts that were working. And guess what? Data started coming through. I guess the snmp module needs the filename of the access log to be the same name as the vhost servername. But wow- that's pretty lame. I think that HQ was accurately reporting what the SNMP module was sending it (0), but its kinda lame that the SNMP module doesn't look at the name of the CustomLog apache attribute (of mod_log) to figure out which log files it needs to look at to do its statistical gathering. So- for anyone else who names their apache vhosts logs strangely- the name of the access log needs to match the servername of the vhost.

Thanks!
Reply
0 Kudos
john_hyperic
Hot Shot
Hot Shot

That is lame. You should log a bug for that in JIRA (http://jira.hyperic.com/) so we can address this. A log filename should not break the SNMP output like that.
Reply
0 Kudos
DreadPirateFlin
Contributor
Contributor

Okay, I submitted a JIRA bug, but for some reason, it put it under alerts?? Thanks again, John

/kurt
Reply
0 Kudos