Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.8.13
-
Component/s: Data Collection - HTTP
-
Security Level: Default (Default Security Scheme)
-
Labels:
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
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