Hello @Mayank Jain ,
I understand that you are not getting previous month's logs in application gateway and would like to know how to get them.
Could you please validate if diagnostic settings are enabled on your application gateway?
If yes, then check where these logs are being sent? Log analytics/Storage/Event Hub?
Then check the retention period of that destination resource.
Diagnostic Settings Retention feature for storage accounts have been deprecated and should be migrated to Azure Storage lifecycle management as mentioned in the below doc:
But you'll still be able to see the configured retention settings.
If the logs are being sent to log analytics, then the retention period is set/changed at the workspace/table level:
So, check the retention period configured for your log destination.
If the retention period is more than 30 days, then you should be able to see the previous month's logs.
Kindly let us know if you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.