private void parseRra(String word) { // RRA:cfun:xff:steps:rows String[] tokens = new ColonSplitter(word).split(); if (tokens.length < 5) { throw new IllegalArgumentException("Invalid RRA definition: " + word); } ConsolFun cf = ConsolFun.valueOf(tokens[1]); double xff = parseDouble(tokens[2]); int steps = parseInt(tokens[3]); int rows = parseInt(tokens[4]); rrdDef.addArchive(cf, xff, steps, rows); }
private void parseDef(String word) { // DEF:name:type:heratbeat:min:max String[] tokens = new ColonSplitter(word).split(); if (tokens.length < 6) { throw new IllegalArgumentException("Invalid DS definition: " + word); } String dsName = tokens[1]; DsType dsType = DsType.valueOf(tokens[2]); long heartbeat = parseLong(tokens[3]); double min = parseDouble(tokens[4]); double max = parseDouble(tokens[5]); rrdDef.addDatasource(dsName, dsType, heartbeat, min, max); }
private String createRrdDb() throws IOException { RrdDb rrdDb = getRrdDbReference(rrdDef); releaseRrdDbReference(rrdDb); return rrdDef.getPath(); }