diff --git a/configs/telegraf/APKBUILD b/configs/telegraf/APKBUILD index d372611..e0d657f 100644 --- a/configs/telegraf/APKBUILD +++ b/configs/telegraf/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Alex Denes # Maintainer: Alex Denes pkgname=redxen-config-telegraf -pkgver=2020.12.7 +pkgver=2020.12.23 pkgrel=0 pkgdesc="Telegraf monitoring configuration" url="https://git.redxen.eu/RedXen" @@ -21,4 +21,4 @@ check() { telegraf --config main.conf --test >/dev/null } -sha512sums="9a50d6b90693fe991be5a99dc3d31f34137894620cf1023a00ee8d8ad3bd1e8c71c4b136d40d42dc663c8719f4f8ee8bd44b51ba3a5fc5d781d6b956ddb03d0c main.conf" +sha512sums="80cb3839e08522ebe390919f7537f739e447adacd552684f329b63fc53d2f1ace654f5cd81b4b599641ddef31e2c7c2adf48946d87dc921a8083a8563f2ecbc6 main.conf" diff --git a/configs/telegraf/main.conf b/configs/telegraf/main.conf index 85a2f34..2d823ee 100644 --- a/configs/telegraf/main.conf +++ b/configs/telegraf/main.conf @@ -3,8 +3,8 @@ round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 - flush_interval = "30s" - precision = "" + flush_interval = "10s" + precision = "10s" debug = false quiet = false logfile = "" diff --git a/cron/influxdb/APKBUILD b/cron/influxdb/APKBUILD new file mode 100644 index 0000000..df1fa98 --- /dev/null +++ b/cron/influxdb/APKBUILD @@ -0,0 +1,22 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes +pkgname=redxen-cron-influxdb +pkgver=2020.12.23 +pkgrel=0 +pkgdesc="InfluxDB backup maintenance scripts" +url="https://git.redxen.eu/RedXen" +arch="noarch" +license="none" +install_if="redxen-config-influxdb" +depends="dcron" +source=" + cron-daily +" +options="!check" + +package() { + install -dm700 "$pkgdir"/databases/snapshots/influxdb + install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-influxdb +} + +sha512sums="3fae364738498920e945ee735fdca0f2c3a9acead7a3e73382013e74e79d3bd335830485f50378a05ac1d8db77370297a10d844d750d4ebc681dd4f435e3b1b2 cron-daily" diff --git a/cron/influxdb/cron-daily b/cron/influxdb/cron-daily new file mode 100644 index 0000000..bcd44c0 --- /dev/null +++ b/cron/influxdb/cron-daily @@ -0,0 +1,2 @@ +/sbin/btrfs subvolume delete /databases/snapshots/influxdb/`date +"%u"` +/sbin/btrfs subvolume snapshot -r /databases/influxdb /databases/snapshots/influxdb/`date +"%u"` diff --git a/cron/postgresql/APKBUILD b/cron/postgresql/APKBUILD new file mode 100644 index 0000000..598db5d --- /dev/null +++ b/cron/postgresql/APKBUILD @@ -0,0 +1,22 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes +pkgname=redxen-cron-postgresql +pkgver=2020.12.23 +pkgrel=0 +pkgdesc="Postgresql backup maintenance scripts" +url="https://git.redxen.eu/RedXen" +arch="noarch" +license="none" +install_if="redxen-config-postgresql" +depends="dcron" +source=" + cron-daily +" +options="!check" + +package() { + install -dm700 "$pkgdir"/databases/snapshots/postgresql + install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-postgresql +} + +sha512sums="08d72ce9693771bbb73b5af98f4b09f8c3b9bd766065b7f8541b4348401c5ec378119deff29eb8a799bbcd0cea23afc54d34bf3f299d961a68569a621bd73754 cron-daily" diff --git a/cron/postgresql/cron-daily b/cron/postgresql/cron-daily new file mode 100644 index 0000000..7ae57f8 --- /dev/null +++ b/cron/postgresql/cron-daily @@ -0,0 +1,2 @@ +/sbin/btrfs subvolume delete /databases/snapshots/postgresql/`date +"%u"` +/sbin/btrfs subvolume snapshot -r /databases/postgresql /databases/snapshots/postgresql/`date +"%u"` diff --git a/cron/redis/APKBUILD b/cron/redis/APKBUILD new file mode 100644 index 0000000..7ec59ff --- /dev/null +++ b/cron/redis/APKBUILD @@ -0,0 +1,22 @@ +# Contributor: Alex Denes +# Maintainer: Alex Denes +pkgname=redxen-cron-redis +pkgver=2020.12.23 +pkgrel=0 +pkgdesc="Redis backup maintenance scripts" +url="https://git.redxen.eu/RedXen" +arch="noarch" +license="none" +install_if="redxen-config-redis" +depends="dcron" +source=" + cron-daily +" +options="!check" + +package() { + install -dm700 "$pkgdir"/databases/snapshots/redis + install -Dm544 cron-daily "$pkgdir"/etc/periodic/daily/snapshot-redis +} + +sha512sums="2dfe51d31e92d2a8c9390b8b0924c28f43d3afdbe3bceba4a7b8f57bdd8ce8551acd237aff61d2b81a4e6a11107a863ee4bb6136e9463268fcfad346aaadace1 cron-daily" diff --git a/cron/redis/cron-daily b/cron/redis/cron-daily new file mode 100644 index 0000000..9afa4a9 --- /dev/null +++ b/cron/redis/cron-daily @@ -0,0 +1,2 @@ +/sbin/btrfs subvolume delete /databases/snapshots/redis/`date +"%u"` +/sbin/btrfs subvolume snapshot -r /databases/redis /databases/snapshots/redis/`date +"%u"`