From: Tapan u. <tup...@iw...> - 2012-11-20 00:42:47
|
Hi, I am using rrd4j tool to read .jrb file in java, If my file exists in same server i am able to read it but if my OpenNMS is installed at other server then how can i pass the .jrb file path in rrd. Currently i am reading from local system like : ReadJRBFile file = new ReadJRBFile(); RrdDbPool pool = RrdDbPool.getInstance(); rrdb = pool.requestRrdDb("/home/developer/wsBlackToner.jrb"); //create fetch request using the database reference FetchRequest request = rrdb.createFetchRequest(ConsolFun.MIN, startTime, endTime); // execute the request FetchData fetchData = request.fetchData(); System.out.println("getDsNames "+fetchData.getDsNames()[0]); double[] values = fetchData.getValues(fetchData.getDsNames()[0]); System.out.println("values*** ::: "+values[0]); Above code works fine if my .jrb file is in local system, but how can i read the same if my file exists at remote location, I tried through : rrdb = new RrdDb("//192.168.1.223/usr/share/opennms/share /rrd/snmp/88/wsBlackToner.jrb", true); but it didn't work cause this server need authentication to get into it. Thanks. Tapan |