Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-4886

HttpCollector ignores "port" parameter from Collectd config

    XMLWordPrintable

    Details

      Description

      Steps to reproduce:

      1. Configure a package in collectd-configuration.xml that covers a service with HTTP as its underlying transport and that is reachable on port 2102: Include a "port" parameter on the service and configure the HttpCollector to be used for the service:

      ...
      <service name="HttpDocCount" interval="300000" user-defined="false" status="on" >
      <parameter key="http-collection" value="doc-count" />
      <parameter key="port" value="2102" />
      <parameter key="retry" value="1" />
      <parameter key="timeout" value="2000" />
      </service>
      ...
      <collector service="HttpDocCount" class-name="org.opennms.netmgt.collectd.HttpCollector" />

      2. Configure a corresponding http-collection in http-datacollection-config.xml with no "port" attribute on the <url> element(s):

      <http-collection name="doc-count">
      <rrd step="300">
      <rra>RRA:AVERAGE:0.5:1:2016</rra>
      </rrd>
      <uris>
      <uri name="document-counts">
      <url path="/test/resources/httpcolltest.html"
      user-agent="Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412 (KHTML, like Gecko) Safari/412"
      matches=".([0-9]+)." response-range="100-399" >
      </url>
      <attributes>
      <attrib alias="documentCount" match-group="1" type="counter32"/>
      </attributes>
      </uri>
      </uris>
      </http-collection>

      3. Restart OpenNMS and put the "HttpDocCount" service onto an interface where it's reachable via tcp/2102

      Expected result:

      Data collected and persieted via HTTP on port 2102

      Actual result:

      No data collected because the HttpCollector attempts to use the default port, 80.

      This issue corresponds to http://mynms.opennms.com/Ticket/Display.html?id=591

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              jeffg Jeff Gehlbach
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: