We are planning to have Azure watch dog which can identify unused/orphaned resources in Azure and have few below queries regarding the same. We are proposing solution to keep the PowerShell script in automation runbooks and run through schedulers
1.what can be the output view for the script?
2.Can the automation runbook for watchdog can be deployed on 1 subscription and pull data from all subscriptions or it should be subscription dedicated?
3.If the log analytics agent is present in 1 subscription, will it be able to get data from all subscriptions?
Ill asnwer the questions one by one.
You can log results to Azure Monitor Logs, send alerts, generate email reports, or write to storage.
Deploy the runbook in one subscription and configure it to access data from multiple subscriptions using appropriate permissions.
The agent collects data from resources in the same subscription and sends it to a workspace. Set up separate workspaces for each subscription to centralize monitoring.