summarylogtreecommitdiffstats
path: root/metricbeat.service
diff options
context:
space:
mode:
Diffstat (limited to 'metricbeat.service')
-rw-r--r--metricbeat.service16
1 files changed, 16 insertions, 0 deletions
diff --git a/metricbeat.service b/metricbeat.service
new file mode 100644
index 000000000000..4d766b9e32e6
--- /dev/null
+++ b/metricbeat.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Metricbeat is a lightweight shipper for metrics.
+Documentation=https://www.elastic.co/products/beats/metricbeat
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+
+Environment="BEAT_LOG_OPTS=-e"
+Environment="BEAT_CONFIG_OPTS=-c /etc/metricbeat/metricbeat.yml"
+Environment="BEAT_PATH_OPTS=-path.home /usr/share/metricbeat -path.config /etc/metricbeat -path.data /var/lib/metricbeat -path.logs /var/log/metricbeat"
+ExecStart=/usr/bin/metricbeat $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target