Merge pull request #1 from dump-dvb/influxdb-dump

modules/file_sharing: add hourly influxdb dump
This commit is contained in:
Tassilo - 2022-05-23 13:10:15 +02:00 committed by GitHub
commit 7851680e57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,4 +22,19 @@
};
};
systemd.services.dump-csv = {
path = [ pkgs.influxdb ];
script = ''
TMPFILE=(mktemp)
influx -precision rfc3339 -database \"dvbdump\" -execute \"SELECT * FROM telegram_r_09\" -format csv > $TMPFILE
mv $TMPFILE /var/lib/data-accumulator/data/telegrams.csv
'';
};
systemd.timers.dump-csv = {
partOf = [ "dump-csv.service" ];
wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = "hourly";
};
}