Ejemplo n.º 1
0
      //DEF:<vname>=<rrdfile>:<ds-name>:<CF>[:step=<step>][:start=<time>][:end=<time>][:reduce=<CF>] 
      private void parseDef(String word)
      {
         String[] tokens1 = CommandSplitter.split(word);
         if (tokens1.Length < 4) throw new ArgumentException("Invalid DEF specification: " + word);
         int parameterIndex = 1;
         string[] pair = tokens1[parameterIndex].Split('=');
         Def def = new Def(pair[0], pair[1]);

         parameterIndex++;
         def.dsName = tokens1[parameterIndex];
         parameterIndex++;
         def.SetConsulFunType(tokens1[parameterIndex]);
         parameterIndex++;
         while (parameterIndex < tokens1.Length)
         {
            pair = tokens1[parameterIndex].Split('=');
            switch (pair[0])
            {
               case "step":
                  def.Step = long.Parse(pair[1]);
                  break;
               case "start":
                  def.StartTime = Util.ParseDateTime(pair[1]);
                  break;
               case "end":
                  def.EndTime = Util.ParseDateTime(pair[1]);
                  break;
               case "reduce":
                  def.ReduceName = pair[1];
                  break;
            }
            parameterIndex++;
         }
         gdef.AddDatasource(def);
      }
Ejemplo n.º 2
0
 // RRDTool Version 1.2
 public void AddDatasource(Def def)
 {
     sources.Add(def);
 }
Ejemplo n.º 3
0
 // RRDTool Version 1.2
 public void AddDatasource(Def def)
 {
    sources.Add(def);
 }