[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