Package org.jrobin.core

Examples of org.jrobin.core.RrdDef.addDatasource()


 
  @Before
  public void setUp() throws Exception {
    RrdDef def = new RrdDef("target/test.jrb");
    def.setStep(300);
    def.addDatasource("test", "GAUGE", 300L, Double.NaN, Double.NaN);
    def.addArchive("RRA:AVERAGE:0.5:1:2016");
    m_db = new RrdDb(def);
  }

  @After
View Full Code Here


    // Note we're not testing the graphing itself, just the parsing
    this.jrbFileName = "target/test-graph-cmd.jrb";
    RrdDef def = new RrdDef(this.jrbFileName);
    def.setStartTime(1000);
    def.setStep(1);
    def.addDatasource("testvalue", "GAUGE", 2, Double.NaN, Double.NaN);
    def.addArchive("RRA:AVERAGE:0.5:1:100");
    RrdDb rrd = new RrdDb(def);
    rrd.close();

    this.graphCmd = new RrdGraphCmd();
View Full Code Here

            RrdDb db = null;
            try {
                RrdDef rrdDef = new RrdDef(def[0].getDbPath(), STAT_RESOULUTION);
                for (StatDefinition stat : def) {
                    String dsType = determineDsType(stat.getStatistic().getStatType());
                    rrdDef.addDatasource(stat.getDatasourceName(), dsType, 5 * STAT_RESOULUTION, 0,
                            Double.NaN);
                }

                // Every minute for 1 hour.
                rrdDef.addArchive(((DefaultStatDefinition) def[0]).
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.