0

I have an azure function that runs the first day of every month.

This is my CRON: 0 0 0 1 * *

It works fine in the last 6/7 months, but today the trigger doesn't fire.

I checked azure portal and invocations in last 30 days is 0.

Now has one because I run FA manually

Is there a place where I can see information on why the function-app didn't run?

MMachado
  • 88
  • 10
  • Have you tried restarting the function app? – thanzeel Feb 01 '23 at 13:39
  • @thanzeel No, this is a prod environment and the function app has another functions that I can't stop. – MMachado Feb 01 '23 at 15:10
  • Its seems that azure function app log will have only 30 days log, since your function runs only once a month the logs are removed. Have you checked the application insght if u have enabled it? – thanzeel Feb 01 '23 at 15:16
  • Where? In the application insight? – thanzeel Feb 01 '23 at 15:18
  • Does this solve your issue https://stackoverflow.com/questions/63510502/unable-to-see-invocation-logs-for-app-service-functions – thanzeel Feb 01 '23 at 15:21
  • Have you checked the Activity Logs in your Function App and logs retain for 90 days in the Storage account - did you check? How you configured the log levels in `host.json` code? –  Feb 03 '23 at 07:27
  • Can you check the logs under the Storage account associated with your function app >> SO [71566402](https://stackoverflow.com/a/71566402) –  Feb 03 '23 at 07:30
  • Check this [MS Doc](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log?tabs=powershell#send-to-azure-storage) for the logs retaining in storage account –  Feb 03 '23 at 07:39

1 Answers1

0

Is there a place where I can see information on why the function-app didn't run?

In the Storage Account, you can see the logs of the Functions in your Function App. As you are saying that one of the Function Triggers is not working/triggered, check the log files located in the File Shares of the storage account associated with your Function App.

Check the below file path for the Function Invocations (Ids and Results):

  1. Go to the Storage Account (linked with your Function App)
  2. File Share named with your Function App > Click on "Browse" option > Log Files > Application > Functions > Your Function Name > Download the Log File and Open it >

enter image description here

You can check the above path for the past and present logs stored for diagnosis if you didn't specify any retention period for the Azure File Shares.

For details about Retention Period, Soft Delete on Azure File shares, visit this MS Doc1 & Doc2.