5 Replies Latest reply on Jul 6, 2009 9:55 AM by Heiko Rupp

    Apache2 metrics not collected

    Thorbjørn Blixen-Finecke Newbie

      Hi

      I have configured and apache 2.2 server including mod-apache-snmp according to the guide here:

      http://mod-apache-snmp.sourceforge.net/english/docs.htm

      after having started the snmp agent (net-snmp) and restarting apache the apache server now reports some metrics to the snmp agent:

      bin/snmpget -v1 -c public udp:localhost:1610 APACHE2-MIB::totalTraffic.0
      APACHE2-MIB::totalTraffic.0 = INTEGER: 2

      Jopr also seems to be able to make contact with the snmp agent. The agent is started using udp:localhost:1610 (when using tcp:localhost:1610 Jopr throws an exception).

      In the agent log ERRORs such as this are reported:

      2009-06-29 10:56:48,799 ERROR [ResourceContainer.invoker.daemon-782] (org.rhq.plugins.apache.ApacheServerComponent)- No values found for MIB name [wwwServiceStartTime].
      2009-06-29 10:56:48,800 ERROR [ResourceContainer.invoker.daemon-782] (org.rhq.plugins.apache.ApacheServerComponent)- No values found for MIB name [applInboundAssociations]

      Could it be that i am using the wrong apache snmp plugin (mod-apache-snmp ver 1.04)? If so which would be the correct to use?

      The mod-apache-snmp plugin seems to consist mainly of one c file (mod_ap2_snmp.c). This file only reports the following:

      snmp_set("APACHE2-MIB::serverStatus.0",'i',"4");
      snmp_set("APACHE2-MIB::serverTmpDir.0",'s',tmp_dir);
      snmp_set("APACHE2-MIB::agentHttpAddress.0",'s',agentHttpAddress);
      snmp_set("APACHE2-MIB::serverStatus.0",'i',"3");
      snmp_set("APACHE2-MIB::serverVersion.0",'s',ap_get_server_version());
      snmp_set("APACHE2-MIB::serverBuilt.0",'s',ap_get_server_built());
      snmp_set("APACHE2-MIB::serverRoot.0",'s',ap_server_root);
      snmp_set("APACHE2-MIB::serverPidfile.0",'s',pidfile_name); snmp_set("APACHE2-MIB::serverRestart.0",'s',ap_ht_time(p,ap_scoreboard_image->global->restart_time,DEFAULT_TIME_FORMAT, 0));
      snmp_set("APACHE2-MIB::totalServerPorts.0",'i',tmp_buffer);
      snmp_set("APACHE2-MIB::serverName.0",'s',s->server_hostname);
      snmp_set("APACHE2-MIB::httpError400.0",'=',"1");
      snmp_set("APACHE2-MIB::httpError403.0",'=',"1");
      snmp_set("APACHE2-MIB::httpError404.0",'=',"1");
      snmp_set("APACHE2-MIB::httpError405.0",'=',"1");
      snmp_set("APACHE2-MIB::httpError500.0",'=',"1");
      snmp_set("APACHE2-MIB::httpError501.0",'=',"1");
      snmp_set("APACHE2-MIB::httpError505.0",'=',"1");