Can't Access data from Https site....

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can't Access data from Https site....

  
TapanUpadhyay
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 it also 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 it runs 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="user" 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 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>

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 Now i am able to see the form details (Login Page) in collectd.log file which is below but  found below error in in this file

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()'>
<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'>
<table class='ui_table' width=40% class='loginform'>
Login to Webmin
You must enter a username and password to login to the Webmin server on <tt>192.168.1.218</tt>.
Username<input class='ui_textbox' name="user" value="" size=20  >
Password<input class='ui_password' type=password name="pass" value="" size=20  >
 <input class='ui_checkbox' type=checkbox name="save" value="1"  id="save_1" > <label for="save_1">Remember login permanently?</label>

<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)

I am totally new for OpenNMS and did not find any help /document anywhere. It would be great if i could get any help from you guys.
I little help will be appreciated.

Thanks Tapan.
Loading...