install gnt-monitor using systemd
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 8 Dec 2016 08:35:06 +0000 (09:35 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 8 Dec 2016 08:35:06 +0000 (09:35 +0100)
bin/install-gnt-monitor.sh [new file with mode: 0755]
systemd/gnt-monitor.service [new file with mode: 0644]

diff --git a/bin/install-gnt-monitor.sh b/bin/install-gnt-monitor.sh
new file mode 100755 (executable)
index 0000000..8bd8fc6
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh -xe
+sudo cp gnt-monitor /etc/ganeti/
+sudo gnt-cluster copyfile /etc/ganeti/gnt-monitor
+sudo cp systemd/gnt-monitor.service /etc/systemd/system/
+sudo gnt-cluster copyfile /etc/systemd/system/gnt-monitor.service
+sudo gnt-cluster command systemctl enable gnt-monitor
+sudo gnt-cluster command systemctl start gnt-monitor
+sudo gnt-cluster command systemctl status gnt-monitor
diff --git a/systemd/gnt-monitor.service b/systemd/gnt-monitor.service
new file mode 100644 (file)
index 0000000..385a27b
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Ganeti monitor to InfluxDB
+
+[Service]
+#Type=simple
+ExecStart=/etc/ganeti/gnt-monitor
+
+[Install]
+WantedBy=multi-user.target