def update_ds_with_timestamp(self, rrdfile, ds_name, timestamp, value): args = ["update", rrdfile, "--template", ds_name, "{!s}:{}".format(utils.to_timestamp(timestamp), value), ] self.send_command(" ".join(args).encode("ascii"))
def update_ds_with_timestamp(self, rrdfile, ds_name, timestamp, value): args = [ "update", rrdfile, "--template", ds_name, "{!s}:{}".format(utils.to_timestamp(timestamp), value), ] self.send_command(" ".join(args).encode("ascii"))
def update_with_timestamps(self, rrdfile, data): args = ["update", rrdfile, "--template"] args.append(":".join(ds_name for ds_name, _, _ in data)) args.append("--") for _, timestamp, value in data: this_arg = "N" if timestamp is None else \ str(utils.to_timestamp(timestamp)) this_arg += ":{}".format(value) args.append(this_arg) self.send_command(" ".join(args).encode("ascii"))