Examples of addDataSource()


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

   */
  public RoundRobin(long heartbeat, File path) throws IOException {
    if (path == null ) path = MFile.createTempFile(MSystem.getPid(), "rrd");
    RrdDef rrdDef = new RrdDef(path.getAbsolutePath());
    rrdDef.setStartTime(System.currentTimeMillis());
    rrdDef.addDatasource("speed", DsType.COUNTER, heartbeat, Double.NaN, Double.NaN);
    rrdDef.addArchive(ConsolFun.AVERAGE, 0.5, 1, 24);
    rrdDef.addArchive(ConsolFun.AVERAGE, 0.5, 6, 10);
    // RrdBackendFactory factory = RrdBackendFactory.getFactory("MEMORY");
    rrdDb = new RrdDb(rrdDef);
    sample = rrdDb.createSample();
View Full Code Here

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

    }
    else
    {
      RrdDef rrdDef = new RrdDef(fileName, startTimestamp - 1, AkteraJvmMemoryManager.DATA_CAPTURE_INTERVAL);

      rrdDef.addDatasource("Init", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Used", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Committed", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Max", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addArchive(AVERAGE, 0.5, 1, 1440);
      rrdDef.addArchive(AVERAGE, 0.5, 30, 336);
View Full Code Here

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

    else
    {
      RrdDef rrdDef = new RrdDef(fileName, startTimestamp - 1, AkteraJvmMemoryManager.DATA_CAPTURE_INTERVAL);

      rrdDef.addDatasource("Init", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Used", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Committed", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Max", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addArchive(AVERAGE, 0.5, 1, 1440);
      rrdDef.addArchive(AVERAGE, 0.5, 30, 336);
      rrdDef.addArchive(AVERAGE, 0.5, 60, 744);
View Full Code Here

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

    {
      RrdDef rrdDef = new RrdDef(fileName, startTimestamp - 1, AkteraJvmMemoryManager.DATA_CAPTURE_INTERVAL);

      rrdDef.addDatasource("Init", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Used", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Committed", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Max", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addArchive(AVERAGE, 0.5, 1, 1440);
      rrdDef.addArchive(AVERAGE, 0.5, 30, 336);
      rrdDef.addArchive(AVERAGE, 0.5, 60, 744);
      rrdDef.addArchive(AVERAGE, 0.5, 1440, 336);
View Full Code Here

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

      RrdDef rrdDef = new RrdDef(fileName, startTimestamp - 1, AkteraJvmMemoryManager.DATA_CAPTURE_INTERVAL);

      rrdDef.addDatasource("Init", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Used", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Committed", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addDatasource("Max", DsType.GAUGE, max, 0, Double.NaN);
      rrdDef.addArchive(AVERAGE, 0.5, 1, 1440);
      rrdDef.addArchive(AVERAGE, 0.5, 30, 336);
      rrdDef.addArchive(AVERAGE, 0.5, 60, 744);
      rrdDef.addArchive(AVERAGE, 0.5, 1440, 336);
      rrdDef.addArchive(MIN, 0.5, 1, 1440);
View Full Code Here

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

      RrdDef rrdDef = new RrdDef(file.getAbsolutePath());
      if(function==ConsolFun.AVERAGE) {
        // for measurement values, we define archives that are suitable for charts
        rrdDef.setStep(60);
          rrdDef.setStartTime(System.currentTimeMillis()/1000-1);
          rrdDef.addDatasource(DATASOURCE_STATE, DsType.GAUGE, 60, Double.NaN, Double.NaN);
          rrdDef.addArchive(function, 0.5, 1, 480); // 8 hours (granularity 1 min)
          rrdDef.addArchive(function, 0.5, 4, 360); // one day (granularity 4 min)
          rrdDef.addArchive(function, 0.5, 15, 644); // one week (granularity 15 min)
          rrdDef.addArchive(function, 0.5, 60, 720); // one month (granularity 1 hour)
          rrdDef.addArchive(function, 0.5, 720, 730); // one year (granularity 12 hours)
View Full Code Here

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

          rrdDef.addArchive(function, 0.5, 10080, 520); // ten years (granularity 7 days)
      } else {
        // for other things, we mainly provide a high level of detail for the last hour
        rrdDef.setStep(1);
          rrdDef.setStartTime(System.currentTimeMillis()/1000-1);
          rrdDef.addDatasource(DATASOURCE_STATE, DsType.GAUGE, 3600, Double.NaN, Double.NaN);
          rrdDef.addArchive(function, .999, 1, 3600); // 1 hour (granularity 1 sec)
          rrdDef.addArchive(function, .999, 10, 1440); // 4 hours (granularity 10 sec)
          rrdDef.addArchive(function, .999, 60, 1440); // one day (granularity 1 min)
          rrdDef.addArchive(function, .999, 900, 2880); // one month (granularity 15 min)
          rrdDef.addArchive(function, .999, 21600, 1460); // one year (granularity 6 hours)
View Full Code Here

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

                    rrdDef.setVersion( 2 );

                    // DEFINE DATA SOURCES

                    rrdDef.addDatasource( NODE_CACHE_SIZE, DsType.GAUGE,
                            STEP_SIZE, 0, Long.MAX_VALUE );

                    rrdDef.addDatasource( NODE_COUNT, DsType.GAUGE, STEP_SIZE,
                            0, Long.MAX_VALUE );
View Full Code Here

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

                    // DEFINE DATA SOURCES

                    rrdDef.addDatasource( NODE_CACHE_SIZE, DsType.GAUGE,
                            STEP_SIZE, 0, Long.MAX_VALUE );

                    rrdDef.addDatasource( NODE_COUNT, DsType.GAUGE, STEP_SIZE,
                            0, Long.MAX_VALUE );

                    rrdDef.addDatasource( RELATIONSHIP_COUNT, DsType.GAUGE,
                            STEP_SIZE, 0, Long.MAX_VALUE );
View Full Code Here

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

                            STEP_SIZE, 0, Long.MAX_VALUE );

                    rrdDef.addDatasource( NODE_COUNT, DsType.GAUGE, STEP_SIZE,
                            0, Long.MAX_VALUE );

                    rrdDef.addDatasource( RELATIONSHIP_COUNT, DsType.GAUGE,
                            STEP_SIZE, 0, Long.MAX_VALUE );

                    rrdDef.addDatasource( PROPERTY_COUNT, DsType.GAUGE,
                            STEP_SIZE, 0, Long.MAX_VALUE );
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.