This means that the server is using form-based authentication and you
are still not authenticated on the server. I glanced at the code and the
HTTP collection code does not support form-based authentications which
implies multi-request collections.

You can POLL this service by using the PageSequenceMonitor but you
cannot collect metrics from it unless you use BASIC authentication and
return the data on a single request.

Seth Leger
The OpenNMS Group


On 11/08/2012 12:29 AM, Tapan Upadhay wrote:
> Thanks Ron , for your reply.I was not aware about it as i am totally
> new, I will post my request to opennms-discuss list too...thanks again
>
> Yes ,My server need basic form based authentication, first ihave to
> give my UserName/password and if it is authenticated then it will take
> me to Home page from where i need to grab some data.
> Just let you know i tried to find out this issue in OpenNMS
> documentation, but couldn't find any, that would be great if you could
> help me for this.
>
> I made changes, as you suggested, in _*In
> http-datacollection-config.xml*_**as per your suggestion its now looks
> like this.
>
> <http-collection name="webMinSystemUpTime">
>     <rrd step="300">
> <rra>RRA:AVERAGE:0.5:1:2016</rra>
> <rra>RRA:AVERAGE:0.5:12:1488</rra>
> <rra>RRA:AVERAGE:0.5:288:366</rra>
> <rra>RRA:MAX:0.5:288:366</rra>
> <rra>RRA:MIN:0.5:288:366</rra>
> </rrd>
> <uris>
>       <uri name="Webmin" >
> <url *scheme="https"*
> *port="10000"*
> path="/right.cgi?open=system&amp;open=status"
> matches="(?s).*?\sdays,\s+([0-9]+).*"
> response-range="0-24" >
> </url>
> <attributes>
> <attrib alias="wsSystemUpTime" match-group="1" type="gauge32"/>
> </attributes>
> </uri>
> </uris>
> </http-collection>
>
>
> Now i am able to see the form details (Login Page) in collectd.logfile
> which is below :
>
> 2012-11-08 16:21:15,706 WARN [CollectdScheduler-50 Pool-fiber2]
> HttpCollector: doCollection: no attributes defined by the response:
> <!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
> <html>
> <head>
> <link rel='stylesheet' type='text/css'
> href='/unauthenticated/style.css' />
> <script type='text/javascript'
> src='/unauthenticated/toggleview.js'></script>
> <script>
> var rowsel = new Array();
> </script>
> <script type='text/javascript'
> src='/unauthenticated/sorttable.js'></script>
> <meta http-equiv="Content-Type" content="text/html; Charset=iso-8859-1">
> <title></title>
> </head>
> <body bgcolor=#ffffff link=#0000ee vlink=#0000ee text=#000000
> onLoad='document.forms[0].pass.value = "";
> document.forms[0].user.focus()'>
> <table class='header' width=100%><tr>
> <td id='headln2l' width=15% valign=top align=left></td>
> <td id='headln2c' align=center width=70%><font size=+2></font></td>
> <td id='headln2r' width=15% valign=top align=right></td></tr></table>
> <p><center>
>
> <form class='ui_form' action='/session_login.cgi' method=post >
> <input class='ui_hidden' type=hidden name="page" value="/">
> <table class='shrinkwrapper' width=40% class='loginform'>
> <tr><td>
> <table class='ui_table' width=40% class='loginform'>
> <thead><tr class='ui_table_head'><td><b>Login to
> Webmin</b></td></tr></thead>
> <tbody> <tr class='ui_table_body'> <td colspan=1><table width=100%>
> <tr class='ui_table_row'>
> <td valign=top colspan=2 align=center class='ui_value'>You must enter
> a username and password to login to the Webmin server on
> <tt>192.168.1.218</tt>.</td>
> </tr>
> <tr class='ui_table_row'>
> <td valign=top class='ui_label'><b>Username</b></td>
> <td valign=top colspan=1 class='ui_value'><input class='ui_textbox'
> name="user" value="" size=20 ></td>
> </tr>
> <tr class='ui_table_row'>
> <td valign=top class='ui_label'><b>Password</b></td>
> <td valign=top colspan=1 class='ui_value'><input class='ui_password'
> type=password name="pass" value="" size=20 ></td>
> </tr>
> <tr class='ui_table_row'>
> <td valign=top class='ui_label'><b> </b></td>
> <td valign=top colspan=1 class='ui_value'><input class='ui_checkbox'
> type=checkbox name="save" value="1" id="save_1" > <label
> for="save_1">Remember login permanently?</label>
> </td>
> </tr>
> </tbody></table></td></tr></table>
> </td></tr>
> </table>
>
> <input class='ui_submit' type=submit value="Login">
> <input type=reset value="Clear">
> </form>
> </center>
>
> <script>
> if (window != window.top) {
> window.top.location = window.location;
>         }
> </script>
> </div><p>
> <br>
> </body></html>
> 2012-11-08 16:21:15,715 ERROR [CollectdScheduler-50 Pool-fiber2]
> HttpCollector: collect: http collection failed:
> org.opennms.netmgt.collectd.HttpCollector$HttpCollectorException: No
> attributes specified were found: : client URL:
> org.opennms.netmgt.collectd.HttpCollector$HttpCollectorException: No
> attributes specified were found: : client URL:
>         at
> org.opennms.netmgt.collectd.HttpCollector.persistResponse(HttpCollector.java:551)
>
>         at
> org.opennms.netmgt.collectd.HttpCollector.doCollection(HttpCollector.java:318)
>
>         at
> org.opennms.netmgt.collectd.HttpCollector.access$000(HttpCollector.java:116)
>
>         at
> org.opennms.netmgt.collectd.HttpCollector$HttpCollectionSet.collect(HttpCollector.java:196)
>
>         at
> org.opennms.netmgt.collectd.HttpCollector.collect(HttpCollector.java:149)
>         at
> org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:267)
>
>         at
> org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:366)
>
>         at
> org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:300)
>
>         at
> org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:287)
>
>         at
> org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:419)
>
>         at java.lang.Thread.run(Thread.java:662)
>
> But still getting above error.
>
>
> Thanks again for your kind suggestion.
>
>
>
>
> *Tapan Upadhay*
> 1 Barrett St. Kensington VIC 3031
>
> PPlease consider the environment before printing this email
> On 08/11/12 15:46, Roskens, Ronald wrote:
>> Tapan,
>>
>> (The opennms-devel mailing list is for developer discussion, and not
>> general install questions. You will probably get better help on the
>> opennms-discuss  list.)
>>
>> The wiki is probably your best initial source for documentation. The
>> source code would be next after that.
>>
>> Due to the error your getting, "404 page not found", it would appear
>> that OpenNMS isn't able to retrieve that page from the 2nd server.
>> You might need to add a scheme attribute to <url>, as the default is
>> "http://";, instead of "https://"; which you were wanting.
>>
>> Does the 2nd server require basic authentication (popup window) or
>> form based authentication?
>>
>> Ron
>>
>>
>> On 11/7/2012 5:28 PM, Tapan Upadhay wrote:
>>> Hi,
>>>
>>> I am new to openNMS, I've installed OpenNMS and try to connect
>>> couple of servers to collect data, First i connected my system (On
>>> which OpenNMS is installed) to printer at particular IP address,
>>> Printer runs on HTTP server, I got printer status successfully, I
>>> took help from example given at
>>> http://www.opennms.org/wiki/HTTP_Collector#Weather_Station . As
>>> printer status exist in first/home page i got data successfully.
>>>
>>> Now i wanted to grab data from another server whose runs on HTTPS
>>> not HTTP and italso takes userName/password to get into Home page,
>>> for example if i try to get data from inbox of gmail.com , first i
>>> have to enter my userName and password then i can reach my Inbox,
>>> Same i wanted to do with this server i am trying to get details.
>>>
>>> First itruns on HTTPS, second it takes UserName and password and
>>> then i can go into Home page of this server.
>>>
>>> To do so I made followings changes in couple of files.
>>>
>>> _*In capsd-configuration.xml *_*:*_*
>>>
>>> *_<protocol-plugin protocol="Webmin"
>>> class-name="org.opennms.netmgt.capsd.plugins.HttpsPlugin" scan="off"
>>> user-defined="true">
>>>       <property key="port" value="10000" />
>>>       <property key="timeout" value="5000" />
>>>       <property key="retry" value="1" />
>>>       <property key="username" value="test" />
>>>       <property key="password" value="test" />
>>> <protocol-configuration scan="enable" user-defined="true">
>>> <specific>192.168.1.218</specific>
>>> </protocol-configuration>
>>>  </protocol-plugin>
>>>
>>> _*In *__*collectd-configuration.xml*_*:*
>>>
>>> <package name="systemUpTime">
>>> <filter>IPADDR != '0.0.0.0'</filter>
>>> <include-range begin="192.168.1.217" end="192.168.1.219"/>
>>> <service name="Webmin" interval="300000" user-defined="false"
>>> status="on" >
>>> <parameter key="collection" value="webMinSystemUpTime" />
>>> <parameter key="retry" value="1" />
>>> <parameter key="timeout" value="2000" />
>>> </service>
>>> </package>
>>>
>>> <collector service="Webmin"
>>> class-name="org.opennms.netmgt.collectd.HttpCollector"/>
>>>
>>> _*In http-datacollection-config.xml*_*:*
>>>
>>> <http-collection name="webMinSystemUpTime">
>>>     <rrd step="300">
>>> <rra>RRA:AVERAGE:0.5:1:2016</rra>
>>> <rra>RRA:AVERAGE:0.5:12:1488</rra>
>>> <rra>RRA:AVERAGE:0.5:288:366</rra>
>>> <rra>RRA:MAX:0.5:288:366</rra>
>>> <rra>RRA:MIN:0.5:288:366</rra>
>>>     </rrd>
>>>     <uris>
>>>       <uri name="Webmin">
>>>         <url path="/right.cgi?open=system&amp;open=status"
>>> matches="(?s).*?\sdays,\s+([0-9]+).*"
>>> response-range="0-24" >
>>> </url>
>>> <attributes>
>>> <attrib alias="wsSystemUpTime" match-group="1" type="gauge32"/>
>>> </attributes>
>>>       </uri>
>>>     </uris>
>>> </http-collection>
>>>
>>> _*In snmp-graph.properties *_*:*
>>>
>>> reports=webmin.details,\
>>>
>>> # Report for Webmin
>>> report.webmin.details.name=Webmin Server
>>> report.webmin.details.columns=wsSystemUpTime
>>> report.webmin.details.type=nodeSnmp
>>> report.webmin.details.command="Webmin Server UpTime Status" \
>>> --vertical-label "Webmin Server UpTime" \
>>>  --units-exponent 0 \
>>>  DEF:upTime={rrd1}:wsSystemUpTime:AVERAGE \
>>>  LINE2:upTime#000000:"Up Time " \
>>>  GPRINT:upTime:AVERAGE:"Avg \\: %8.2lf %s"
>>>
>>>
>>> After above configuration i restart openNMS and found below error in
>>> collectd.log file
>>>
>>> 2012-11-08 08:00:26,043 WARN  [CollectdScheduler-50 Pool-fiber0]
>>> HttpCollector: doCollection: no attributes defined by the response:
>>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>>> <html><head>
>>> <title>404 Not Found</title>
>>> </head><body>
>>> <h1>Not Found</h1>
>>> <p>The requested URL /right.cgi was not found on this server.</p>
>>> <hr>
>>> <address>Apache/2.2.14 (Ubuntu) Server at 192.168.1.218 Port
>>> 80</address>
>>> </body></html>
>>> 2012-11-08 08:00:26,055 ERROR [CollectdScheduler-50 Pool-fiber0]
>>> HttpCollector: collect: http collection failed:
>>> org.opennms.netmgt.collectd.HttpCollector$HttpCollectorException: No
>>> attributes specified were found: : client URL:
>>> org.opennms.netmgt.collectd.HttpCollector$HttpCollectorException: No
>>> attributes specified were found: : client URL:
>>>         at
>>> org.opennms.netmgt.collectd.HttpCollector.persistResponse(HttpCollector.java:551)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.HttpCollector.doCollection(HttpCollector.java:318)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.HttpCollector.access$000(HttpCollector.java:116)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.HttpCollector$HttpCollectionSet.collect(HttpCollector.java:196)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.HttpCollector.collect(HttpCollector.java:149)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:267)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:366)
>>>
>>>         at
>>> org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:300)
>>>
>>>         at
>>> org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:287)
>>>
>>>         at
>>> org.opennms.core.concurrent.RunnableConsumerThreadPool$FiberThreadImpl.run(RunnableConsumerThreadPool.java:419)
>>>
>>>         at java.lang.Thread.run(Thread.java:662)
>>> 2012-11-08 08:00:30,158 WARN [CollectdScheduler-50 Pool-fiber1]
>>> CollectionResourceWrapper: getAttributeValue: can't find attribute
>>> called ifHighSpeed on node[88].interfaceSnmp[eth0-0021b7e44371]
>>> 2012-11-08 08:00:30,158 WARN [CollectdScheduler-50 Pool-fiber1]
>>> ThresholdingSet: passedThresholdFilters: can't find value of
>>> ifHighSpeed for resource node[88].interfaceSnmp[eth0-0021b7e44371]
>>> 2012-11-08 08:00:30,158 WARN [CollectdScheduler-50 Pool-fiber1]
>>> CollectionResourceWrapper: getAttributeValue: can't find attribute
>>> called ifHighSpeed on node[88].interfaceSnmp[eth0-0021b7e44371]
>>> 2012-11-08 08:00:30,158 WARN [CollectdScheduler-50 Pool-fiber1]
>>> ThresholdingSet: passedThresholdFilters: can't find value of
>>> ifHighSpeed for resource node[88].interfaceSnmp[eth0-0021b7e44371]
>>> 2012-11-08 08:05:26,393 WARN [CollectdScheduler-50 Pool-fiber1]
>>> HttpCollector: doCollection: no attributes defined by the response:
>>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>>>
>>>
>>>
>>>
>>> I am totally new for OpenNMS and didnot find any help
>>> /documentanywhere. It would be great if i could get any help from
>>> you guys.
>>> I little help will be appreciated
>>>
>>>
>>> -- 
>>> *Tapan Upadhay*
>>> *Ph: +61 3 9677 8913*|
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> Everyone hates slow websites. So do we.
>>> Make your web apps faster with AppDynamics
>>> Download AppDynamics Lite for free today:
>>> http://p.sf.net/sfu/appdyn_d2d_nov
>>>
>>>
>>> _______________________________________________
>>> Please read the OpenNMS Mailing List FAQ:
>>> http://www.opennms.org/index.php/Mailing_List_FAQ
>>>
>>> opennms-devel mailing list
>>>
>>> To *unsubscribe* or change your subscription options, see the bottom
>>> of this page:
>>> https://lists.sourceforge.net/lists/listinfo/opennms-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_nov
>>
>>
>> _______________________________________________
>> Please read the OpenNMS Mailing List FAQ:
>> http://www.opennms.org/index.php/Mailing_List_FAQ
>>
>> opennms-devel mailing list
>>
>> To *unsubscribe* or change your subscription options, see the bottom
>> of this page:
>> https://lists.sourceforge.net/lists/listinfo/opennms-devel
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
>
>
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-devel mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this 
> page:
> https://lists.sourceforge.net/lists/listinfo/opennms-devel

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to