@Riyas Please refer to this similar thread- https://learn.microsoft.com/en-us/answers/questions/595846/index.html
For your requirement , you need to create a custom PowerShell script such that you can check below logs to know if the resource hasn't been in past 30 days.
Activity logs : It gives you insights into subscription-level events including such information as when a resource is modified (created or update or delete.) or when a virtual machine is started. -- We can set up alert on that. However even if you don't see any activity logs within 30 days it doesn't mean that the service itself is not running.
To know in detail you might check on certain metrics/logs . For example , Azure Storage has metrics like Transactions, Ingress, Egress, Requests, etc. You could use that to determine if there is activity in your storage account.
So , You can either (1) check metrics in certain resource, or simply set up metric alert on single resource or (2) Use diagnostic settings to send metrics to log analytics workspace, and do queries manually to check on the usage or (3) Also for some resources we have centralized monitor insights , for example in you search for "Monitor" in portal, on the left blade, which gives you some "insights" feature for specific resources, you can check the usage more conveniently.
Reference :
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/resource-logs
https://learn.microsoft.com/en-us/azure/storage/files/storage-files-monitoring?tabs=azure-portal#analyzing-metrics
Please let us know if you have any more questions and we will be glad to assist you further. Thank you!
Remember:
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
Want a reminder to come back and check responses? Here is how to subscribe to a notification.