summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD44
-rw-r--r--systemd-cloud-watch.service12
3 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e8fd296c024c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = systemd-cloud-watch
+ pkgdesc = This utility reads from the systemd journal, and sends the data in batches to CloudWatch.
+ pkgver = 0.2.1
+ pkgrel = 1
+ url = https://advantageous.github.io/systemd-cloud-watch/
+ arch = i686
+ arch = x86_64
+ license = APACHE
+ makedepends = go
+ makedepends = git
+ depends = libsystemd
+ source = https://github.com/advantageous/systemd-cloud-watch/archive/v0.2.1.tar.gz
+ source = systemd-cloud-watch.service
+ md5sums = 53c7929af569434caada158896515baf
+ md5sums = 2c610fe0e0677624ab3cd06ef14de22f
+
+pkgname = systemd-cloud-watch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c8049d4e12db
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: JUXT <info@juxt.pro>
+# Contributor: James Conroy-Finn <james@invetica.co.uk>
+pkgname=systemd-cloud-watch
+pkgver=0.2.1
+pkgrel=1
+epoch=
+pkgdesc="This utility reads from the systemd journal, and sends the data in batches to CloudWatch. "
+arch=('i686' 'x86_64')
+url="https://advantageous.github.io/systemd-cloud-watch/"
+license=('APACHE')
+groups=()
+depends=('libsystemd')
+makedepends=('go' 'git')
+_gourl=github.com/advantageous
+source=("https://github.com/advantageous/systemd-cloud-watch/archive/v${pkgver}.tar.gz"
+ "systemd-cloud-watch.service")
+md5sums=('53c7929af569434caada158896515baf'
+ '2c610fe0e0677624ab3cd06ef14de22f')
+
+prepare() {
+ mkdir -p "${srcdir}/src/${_gourl}"
+ rm -rf "${srcdir}/src/${_gourl}/${pkgname}"
+ mv -f "${pkgname}-${pkgver}" "${srcdir}/src/${_gourl}/${pkgname}"
+
+ cd "${srcdir}/src/${_gourl}/${pkgname}"
+ GOPATH="${srcdir}" go get
+}
+
+build() {
+ cd "${srcdir}/src/${_gourl}/${pkgname}"
+ GOPATH="${srcdir}" PATH="${srcdir}/bin:${PATH}" go build
+}
+
+package() {
+ install -Dm755 \
+ "${srcdir}"/bin/systemd-cloud-watch \
+ "${pkgdir}"/usr/bin/systemd-cloud-watch
+
+ install -Dm744 \
+ "${srcdir}"/systemd-cloud-watch.service \
+ "${pkgdir}"/usr/lib/systemd/system/systemd-cloud-watch.service
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/systemd-cloud-watch.service b/systemd-cloud-watch.service
new file mode 100644
index 000000000000..4ba91f273e51
--- /dev/null
+++ b/systemd-cloud-watch.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Forward journald logs to CloudWatch
+Wants=basic.target
+After=basic.target network.target
+
+[Service]
+User=nobody
+Group=nobody
+ExecStart=/usr/bin/systemd-cloud-watch /etc/systemd-cloud-watch.conf
+KillMode=process
+Restart=on-failure
+RestartSec=42s