$timestamp = new DateTimeImmutable('2016-01-01 13:37:42');
$creator = new RRDCreator();
$creator->setFileName($rrd->getFileName());
$creator->setStart($timestamp);
$creator->setStep(60);
$dataSource = new RrdDataSource();
$dataSource->setName('downstream');
$dataSource->setType(RrdDataSource::TYPE_COUNTER);
$creator->addDataSource($dataSource);
$dataSource = new RrdDataSource();
$dataSource->setName('upstream');
$dataSource->setType(RrdDataSource::TYPE_COUNTER);
$creator->addDataSource($dataSource);
$archive = new RrdArchive();
$archive->setConsolidation(RrdArchive::CONSOLIDATION_AVERAGE);
$archive->setSteps(60);
$archive->setRows(60 * 24);
$creator->addArchive($archive);
$creator->save();
$rrd->update([
'downstream' => 1024,
'upstream' => 768
]);
$rrd->getLastUpdate();