Bug 869843 - ResponseTime metrics are not collected for Apache when SNMP is not being used
Summary: ResponseTime metrics are not collected for Apache when SNMP is not being used
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.4
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
: RHQ 4.9
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 869834
TreeView+ depends on / blocked
 
Reported: 2012-10-24 23:32 UTC by Larry O'Leary
Modified: 2014-03-26 08:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 869834
Environment:
Last Closed: 2014-03-26 08:31:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Larry O'Leary 2012-10-24 23:32:29 UTC
+++ This bug was initially created as a clone of JBoss ON Bug #869834 +++

Description of problem:
After enabling Apache ResponseTime metrics by installing the Apache response time module (mod_rt.so) call time data is not collected and therefore, not displayed in the ON UI.

Version-Release number of selected component (if applicable):
4.4.0.JON310GA

How reproducible:
Always

Steps to Reproduce:
1. Install ON system
2. Install Apache ResponeTime module into Apache httpd[1]
3. Start Apache httpd server
4. Start ON system
5. Import httpd server into inventory
6. Enabled calltime metrics on the virtual host's monitoring > schedules page
7. Set the response time log file path and name under the virtual host's inventory > connection page
8. Generate some activity to the httpd server (http://localhost/)
9. Wait for the metric collection schedule interval to pass

[1]: https://access.redhat.com/knowledge/docs/en-US/JBoss_Operations_Network/3.1/html/Admin_Setting_up_Monitoring_Alerts_and_Operations/rt-configuration.html#Apache_Configuration

Actual results:
No calltime data is displayed on the Calltime page and the agent logs the following message when DEBUG is enabled:
    DEBUG [ResourceContainer.invoker.daemon-11] (org.rhq.plugins.apache.ApacheVirtualHostServiceComponent)- Failed to connect to SNMP agent at 127.0.0.1/1610/public - aborting metric collection...

Expected results:
Calltime data should be collected.
SNMP is not needed.

Additional info:
This is occurring because ApacheVirtualHostServiceComponent.getValues(MeasurementReport report, Set<MeasurementScheduleRequest> schedules) assumes that it is only collecting metrics from SNMP. The following lines of code break calltime metrics for Apache:

        //bail out quickly if there's no SNMP support
        if (primaryIndex < 0)
            return;
...
        if (!snmpSession.ping()) {
            log.debug("Failed to connect to SNMP agent at " + snmpSession + " - aborting metric collection...");
            return;
        }

Comment 1 Thomas Segismont 2013-06-25 14:01:52 UTC
Fixed in master.

See comment https://bugzilla.redhat.com/show_bug.cgi?id=869834#c2

Comment 2 Heiko W. Rupp 2014-03-26 08:31:29 UTC
Bulk closing now that 4.10 is out.

If you think an issue is not resolved, please open a new BZ and link to the existing one.


Note You need to log in before you can comment on or make changes to this bug.