An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hello Jason Desjardins,
Thank you for reaching out to the Microsoft Q&A forum.
When investigated it looks like what you’re seeing is the agent re-syncing your Data Collection Rule (DCR) every ~10 minutes and fully rebuilding the /etc/rsyslog.d folder to match exactly what’s in that rule. If your DCR doesn’t actually include a Linux Syslog data source (or if a second, empty DCR is overriding it), the agent will happily remove the 10-azuremonitoragent.conf file on each sync—and your logs stop flowing.
Here’s how to fix it:
Verify the DCR locally
• On the Arc-enabled Linux VM, run:
ls /etc/opt/microsoft/azuremonitoragent/config-cache/configchunks/
grep -Ri ""syslog"" /etc/opt/microsoft/azuremonitoragent/config-cache/configchunks/*.json
Make sure you see a "dataSources": { "syslog": … } block defining the facilities and severities you need.
Check your DCR associations
• In the Azure portal, go to your Data Collection Rule → Resources → confirm your HybridCompute/machines VM is listed.
• Ensure no other DCR is targeting the same VM without a Syslog data source.
Update or recreate the DCR to include Linux Syslog
• In the DCR’s Data sources tab, add “Linux Syslog” and configure the correct facilities (e.g. auth, authpriv, local0–local7) and severities.
• Save and let the agent pull the updated rule (or reboot the agent manually:
sudo systemctl restart azuremonitoragent.
Confirm the config file sticks
• After the next agent sync you should see /etc/rsyslog.d/10-azuremonitoragent.conf get recreated—and remain there rather than being deleted.
- Check connectivity (in case the rule isn’t downloading) • From your VM run:
-
curl -vhttps://global.handler.control.monitor.azure.com
• If that fails, the agent can’t pull the DCR and might default to an empty config.
(Optional) Turn on debug logs
• Create or edit an override for the service to add --debug to the agent’s startup, then systemctl daemon-reload && systemctl restart azuremonitoragent.
• Inspect /var/opt/microsoft/azuremonitoragent/log/mdsd.err for DCR-apply errors.
Once your DCR properly includes Syslog and the agent can download it, the rsyslog drop-in will stay in place and your logs will flow continuously.
Let me know if any further queries - feel free to reach out!
Reference list:
- Troubleshooting missing Syslog events on AMA for Linux https://supportability.visualstudio.com/AzureMonitor/_wiki/wikis/AzureMonitor.wiki/941209/Agents/Azure Monitor Agent (AMA) for Linux/Troubleshooting Guides/Troubleshooting missing Syslog events on AMA for Linux
- Collect Syslog events from a Linux VM (rsyslog) https://learn.microsoft.com/azure/azure-monitor/vm/data-collection-syslog?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#configure-syslog-on-the-linux-agent
- Troubleshooting guidance for AMA on Linux VMs & scale sets https://learn.microsoft.com/azure/azure-monitor/agents/azure-monitor-agent-troubleshoot-linux-vm?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#basic-troubleshooting-steps
- Troubleshoot syslog issues with AMA on Linux (rsyslog) https://learn.microsoft.com/azure/azure-monitor/agents/azure-monitor-agent-troubleshoot-linux-vm-rsyslog?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#rsyslog-data-isn't-uploaded-due-to-full-disk-space