VMware Cloud Community
ninjasenses
Contributor
Contributor

Apache 2.2 and httpd monitoring

I am new to hyperic and a little confused on how to setup apache 2.2 and httpd montoring.  It lookes like they each require a plugin.

I looked at the apache 2.2 plugin installation instrutions(https://support.hyperic.com/display/hyperforge/Apache+2.2+server)  but the directions are not
clear on what the variable ${installpath} is supposed to be.
I also looked at the plugin page for httpd https://support.hyperic.com/display/hyperforge/Apache+httpd+server and edited my apache configuration file.  However I am getting no data coming through.  Any help is greatly appreaciated, Thanks.
0 Kudos
16 Replies
matdrewin
Contributor
Contributor

Hello,

From what I can understand from the documentation, there seems to be 2 ways to monitor Apache via Hyperic.

1. mod_status - The Hyperic agent monitors the Apache server-status page - https://support.hyperic.com/display/hyperforge/Apache+httpd+server

2. SNMP  - The Hyperic agent relays Apache info back to the HQ Server - https://support.hyperic.com/display/hyperforge/Apache+2.2+server

For #2 - $installpath refers to your Apache installation.

In my case on RHEL6, apxs was in a different location than the conf and modules directory so this is what I used:

% tar -zxf snmp-x.x.x.tar.gz
% cd snmp-x.x.x
% ./build_apache_snmp.sh 2.0 /usr/sbin/apxs
% cp snmp_module_2.0/module/*.so /etc/httpd/modules
% cp snmp_module_2.0/conf/snmpd.conf /etc/httpd/conf
% mkdir /etc/httpd/var

There are a few dependencies (gcc, httpd-devel, automake, libtool) as well to make this work.

I'm also having issues with the Apache 2.2 monitoring. I built the SNMP modules and started Apache with no issues. The snmpwalk test at the end also works fine for me. However it doesn't seem like the HQ agent is relaying any of the SNMP information to my HQ server and I can't figure out why.

What am I missing?

0 Kudos
ninjasenses
Contributor
Contributor

matdrewin wrote:

Hello,

From what I can understand from the documentation, there seems to be 2 ways to monitor Apache via Hyperic.

1. mod_status - The Hyperic agent monitors the Apache server-status page - https://support.hyperic.com/display/hyperforge/Apache+httpd+server

2. SNMP  - The Hyperic agent relays Apache info back to the HQ Server - https://support.hyperic.com/display/hyperforge/Apache+2.2+server

For #2 - $installpath refers to your Apache installation.

In my case on RHEL6, apxs was in a different location than the conf and modules directory so this is what I used:

% tar -zxf snmp-x.x.x.tar.gz
% cd snmp-x.x.x
% ./build_apache_snmp.sh 2.0 /usr/sbin/apxs
% cp snmp_module_2.0/module/*.so /etc/httpd/modules
% cp snmp_module_2.0/conf/snmpd.conf /etc/httpd/conf
% mkdir /etc/httpd/var

There are a few dependencies (gcc, httpd-devel, automake, libtool) as well to make this work.

I'm also having issues with the Apache 2.2 monitoring. I built the SNMP modules and started Apache with no issues. The snmpwalk test at the end also works fine for me. However it doesn't seem like the HQ agent is relaying any of the SNMP information to my HQ server and I can't figure out why.

What am I missing?

When running ./build_apache_snmp.sh 2.0 /usr/sbin/apxs I get in the error logs:

cd . && aclocal-1.6
/bin/sh: aclocal-1.6: command not found
make: *** [aclocal.m4] Error 127
0 Kudos
matdrewin
Contributor
Contributor

automake needs to be installed (see my list of dependencies in my previous post).

If it is installed, you need to make symblic links to aclocal-x.x and automake-x.x called aclocal-1.6 and automake-1.6.

Here's an example: http://codeblow.com/questions/apache-response-time-monitoring-in-hyperic/

0 Kudos
ninjasenses
Contributor
Contributor

Getting this now:

make  all-recursive
make[1]: Entering directory `/home/ben_admin/hyperic-hq/hq_bin/snmp-1.0.2/srclib/libsmi'
Making all in lib
make[2]: Entering directory `/home/ben_admin/hyperic-hq/hq_bin/snmp-1.0.2/srclib/libsmi/lib'
cat error.c | grep ERR_ | \
        sed -e 's/^.*\(ERR_[a-zA-Z0-9_]*\).*$/\1/' | \
        awk '{printf "#define %-40s %d\n", $1, NR-1}' > errormacros.h
/bin/sh: LIBTOOL@: command not found
make[2]: *** [data.lo] Error 127
make[2]: Leaving directory `/home/ben_admin/hyperic-hq/hq_bin/snmp-1.0.2/srclib/libsmi/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ben_admin/hyperic-hq/hq_bin/snmp-1.0.2/srclib/libsmi'
make: *** [all] Error 2
0 Kudos
matdrewin
Contributor
Contributor

As I mentionned in my previous post:

There are a few dependencies (gcc, httpd-devel, automake, libtool) as well to make this work.
0 Kudos
admin
Immortal
Immortal

Sorry I missed that, it appears I have all the depndencies(I had to install libtool).  And I am still having issues, at first it was complaining about no such file or directory for usr/bin/apsx2...so i made the dir and tried again.  This is what I ended up with:

configure: error: no - Unable to locate apxs.

./build_apache_snmp.sh: line 234: /usr/bin/apxs2: is a directory

usage: remake_http_protocol <apache-src-dir> at src/www-mib/remake_http_protocol line 3.

Build failed. Please email /home/benjerry_admin/hyperic-hq/hq_bin/snmp-1.0.2/2.0_log to support

Then in the 2.0_log file I saw this as the last line.

checking for evaluation build... checking for how to build against Apache... make: *** No targets specified and no makefile found. Stop.

0 Kudos
ninjasenses
Contributor
Contributor

I was having issues installing to the /bin/apxs dir so I ended up installing to sbin/apxs.  I was wondering what the variables for the test should be

% snmp_module_2.2/tools/snmpwalk -p ${snmpPort} -M snmp_module_2.2/mibs ${snmpIp} ${snmpCommunity}


${snmpPort} - 161?

${snmpIp}  - Internal.Ip.To.Website?

${snmpCommunity} - public?

0 Kudos
matdrewin
Contributor
Contributor

apxs is an executable part of httpd-devel package, it`s not a directory that gets written to.

To answer your question, I ended up using this because I couldn`t see a mibs directory so I just used this:

snmp_module_2.0/tools/snmpwalk -p 1610 localhost public
0 Kudos
ninjasenses
Contributor
Contributor

I was unable to get the test to work, but apache(I'm running 2.2.3) did appear in hyperic today.  However the only metrics I am getting through are Number of concurrent connections.

0 Kudos
matdrewin
Contributor
Contributor

What version of Hyperic are you using?

0 Kudos
ninjasenses
Contributor
Contributor

4.6

0 Kudos
matdrewin
Contributor
Contributor

OK. I'm on 5.0 and Apache does not even show up in the auto-discovery.

I'm going to revert to 4.6 and see what happens.

0 Kudos
ninjasenses
Contributor
Contributor

make sure you restart snmp after making all the changes

0 Kudos
matdrewin
Contributor
Contributor

I don't have snmpd installed on my box. I thought the hyperic snmpd install was self-contained. I just restart Apache but it never shows up in Hyperic HQ.

0 Kudos
matdrewin
Contributor
Contributor

No dice, I'm experiencing the same behaviour in Hyperic 4.6.6, the host is autodiscovered with the usual (NetworkServer, Postfix, ProcessServer, NTP, FileServer, HQ Agent, Net Services) but no trace of Apache.

I'm using Apache 2.2.15 on RHEL6.

0 Kudos
ninjasenses
Contributor
Contributor

Did you ever get any farther than this?

0 Kudos