From 618b2d7d6a36c337db6fdcd21c847b8a641a9e5d Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov Date: Mon, 19 Oct 2015 11:44:02 +0300 Subject: [PATCH] Graphite - systemd units --- .../systemd/system/carbon-aggregator@.service | 20 +++++++++++++++++++ .../etc/systemd/system/carbon-cache@.service | 20 +++++++++++++++++++ .../etc/systemd/system/carbon-relay@.service | 19 ++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 monitoring/graphite/systemd-units/etc/systemd/system/carbon-aggregator@.service create mode 100644 monitoring/graphite/systemd-units/etc/systemd/system/carbon-cache@.service create mode 100644 monitoring/graphite/systemd-units/etc/systemd/system/carbon-relay@.service diff --git a/monitoring/graphite/systemd-units/etc/systemd/system/carbon-aggregator@.service b/monitoring/graphite/systemd-units/etc/systemd/system/carbon-aggregator@.service new file mode 100644 index 0000000..9d383d3 --- /dev/null +++ b/monitoring/graphite/systemd-units/etc/systemd/system/carbon-aggregator@.service @@ -0,0 +1,20 @@ +[Unit] +Description=carbon-aggregator instance %i (graphite) +After=network.target + +[Service] +User=graphite +Group=graphite +PrivateTmp=yes +# Run ExecStartPre with root-permissions +PermissionsStartOnly=true +ExecStartPre=-/bin/mkdir -p /run/graphite +ExecStartPre=/bin/chown -R graphite:graphite /run/graphite +ExecStartPre=/bin/rm -f /run/graphite/carbon-aggregator-%i.pid +ExecStart=/opt/graphite/bin/carbon-aggregator.py --instance=%i start +Type=forking +PIDFile=/run/graphite/carbon-aggregator-%i.pid +LimitNOFILE=128000 + +[Install] +WantedBy=multi-user.target diff --git a/monitoring/graphite/systemd-units/etc/systemd/system/carbon-cache@.service b/monitoring/graphite/systemd-units/etc/systemd/system/carbon-cache@.service new file mode 100644 index 0000000..8d320b0 --- /dev/null +++ b/monitoring/graphite/systemd-units/etc/systemd/system/carbon-cache@.service @@ -0,0 +1,20 @@ +[Unit] +Description=carbon-cache instance %i (graphite) +After=network.target + +[Service] +User=graphite +Group=graphite +PrivateTmp=yes +# Run ExecStartPre with root-permissions +PermissionsStartOnly=true +ExecStartPre=-/bin/mkdir -p /run/graphite +ExecStartPre=/bin/chown -R graphite:graphite /run/graphite +ExecStartPre=/bin/rm -f /run/graphite/carbon-cache-%i.pid +ExecStart=/opt/graphite/bin/carbon-cache.py --instance=%i start +Type=forking +PIDFile=/run/graphite/carbon-cache-%i.pid +LimitNOFILE=128000 + +[Install] +WantedBy=multi-user.target diff --git a/monitoring/graphite/systemd-units/etc/systemd/system/carbon-relay@.service b/monitoring/graphite/systemd-units/etc/systemd/system/carbon-relay@.service new file mode 100644 index 0000000..a8c1e82 --- /dev/null +++ b/monitoring/graphite/systemd-units/etc/systemd/system/carbon-relay@.service @@ -0,0 +1,19 @@ +[Unit] +Description=carbon-relay instance %i (graphite) +After=network.target + +[Service] +User=graphite +Group=graphite +PrivateTmp=yes +# Run ExecStartPre with root-permissions +PermissionsStartOnly=true +ExecStartPre=-/bin/mkdir -p /run/graphite +ExecStartPre=/bin/chown -R graphite:graphite /run/graphite +ExecStartPre=/bin/rm -f /run/graphite/carbon-relay-%i.pid +ExecStart=/opt/graphite/bin/carbon-relay.py --instance=%i start +Type=forking +PIDFile=/run/graphite/carbon-relay-%i.pid + +[Install] +WantedBy=multi-user.target