Service Management
Use this page to run the collector as a background service on Linux.
Prerequisites
Section titled “Prerequisites”- Linux host with
systemd - Root privileges (
sudo) - Valid collector config file
Recommended License Path
Section titled “Recommended License Path”sudo install -d -m 0750 /etc/ms-teams-observability-agentsudo install -m 0640 -o root -g ms-teams-observability-agent \ ./license.json /etc/ms-teams-observability-agent/license.jsonlicense: filepath: /etc/ms-teams-observability-agent/license.jsonEnable the Service
Section titled “Enable the Service”sudo ms-teams-agent service enable-service --config /absolute/path/config.yamlsudo ms-teams-agent service statusEnable a Named Service (Optional)
Section titled “Enable a Named Service (Optional)”sudo ms-teams-agent service enable-service \ --config /etc/ms-teams-observability-agent/prod.yaml \ --instance prod
sudo ms-teams-agent service status --instance prodCommon Operations
Section titled “Common Operations”sudo ms-teams-agent service status --instance defaultsudo ms-teams-agent service restart --instance defaultsudo systemctl status ms-teams-observability-agent@default.servicesudo journalctl -u ms-teams-observability-agent@default.service -fUpdate Configuration Safely
Section titled “Update Configuration Safely”-
Back up your config file.
-
Install updated config:
Terminal window sudo ms-teams-agent service install-config \--config /etc/ms-teams-observability-agent/prod.yaml \--instance prod \--service-restart-if-active -
Verify status and logs.
Disable the Service
Section titled “Disable the Service”sudo ms-teams-agent service disable-service --instance default