JON not able to get metrics for Apache server when SNMP module is configured to listen on public IP but to only allow connections from localhost

Solution Verified - Updated -

Issue

  • We don't have any metrics being collected for our apache instance. SNMP was installed on the server in question, but I still see the below errors in the logs as if it wasn't:

    DEBUG [main] (rhq.core.pc.plugin.PluginComponentFactory)- Created discovery component [org.rhq.plugins.apache.ApacheServerDiscoveryComponent] for resource type [Apache HTTP Server]
    INFO  [ResourceContainer.invoker.daemon-1] (org.rhq.plugins.apache.ApacheServerComponent)- Initializing server component for server [/opt/jboss/jboss-ews-2.0/httpd||/opt/jboss/jboss-ews-2.0/httpd/conf/httpd.conf]...
    INFO  [ResourceContainer.invoker.daemon-1] (rhq.plugins.www.snmp.SNMPClient)- Initialized SNMP session for agent at /192.168.1.1:1610
    DEBUG [ResourceContainer.invoker.daemon-1] (rhq.plugins.www.snmp.SNMPSession_v2c)- Error while pinging SNMP 1 agent at 192.168.1.1/1610/public. SNMP GETNEXT request for iso(1) failed - org.rhq.plugins.www.snmp.SNMPException: Request for [iso] timed out.
    WARN  [ResourceContainer.invoker.daemon-1] (org.rhq.plugins.apache.ApacheServerComponent)- Failed to connect to SNMP agent at 192.168.1.1/1610/public. Make sure  
    1) the managed Apache server has been instrumented with the JON SNMP module,  
    2) the Apache server is running, and  
    3) the SNMP agent host, port, and community are set correctly in this resource's connection properties.  
    The agent will not be able to record metrics from apache httpd without SNMP
    

Environment

  • JBoss Operations Network (JON) 3.0
  • JBoss Enterprise Web Server (EWS) Apache HTTPD management plug-in for JBoss ON
  • Apache SNMP module installed and running in httpd server resource with the following configuration modifications in snmpd.conf
    • The property agentaddress is set to a host name or IP address other then localhost or 127.0.0.1
    • The property com2sec is set to localhost or 127.0.0.1 or an address that is different then the value for agentaddress

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content