英文:
monitor azure functions from rest api
问题
我需要监视和控制 Azure Functions 应用程序中的函数,从 Azure 门户之外。
我正在寻找一种方法来提取函数列表、它们的执行历史、计划和状态。
是否有一个 REST API 可以提供这些信息?或者我可以在 Azure 函数内部获取它们吗?
在 Google 上搜索这个问题,我只能找到如何构建函数的指南。
顺祝商祺,
Kresten
英文:
I need to monitor and control the functions in an azure functions app, from outside of azure portal.
I'm looking for a way to extract a list of functions, their execution history, their schedule and status.
Is there a rest API that can give me that information? or can I get it inside an azure function?
Searching for this on google gives me nothing but instruction on how to build a function.
BR Kresten
答案1
得分: 1
我有一个Azure函数应用中的5个函数,在这里我可以使用这个REST API获取函数列表:
我找到了用于在函数应用中获取最后一次Http调用的函数的REST API(如Get、Post等),并提供了给定输入和其他信息,如MS Doc中所示,但没有提供当前状态,如运行历史、状态等。
据我所知,没有REST API可用于Function App日志,以显示当前执行历史和执行状态的实时历史。
您可以在Live Metrics窗口中获取任何Azure函数应用中函数的当前和以前的执行日志/历史,还可以使用Log Analytics Workspace查询,如requests
:
您无法通过API获取当前的实时执行状态和历史,有关详细信息,请参考此SO中的说明1和2,由用户@cijothomas和@MikhailShilkov提供。
英文:
I have 5 Functions in an Azure Function App where I can get the list of functions using this REST API:
I have found the REST API for a function in the Function App that gives the last Http Call (like Get, Post, etc, made) with the given input and other information like Function Envelope given in this MS Doc but not the current Status like Run History, Status, etc.
AFAIK, REST APIs are not available for Function App Logs to show the live history of the current execution history and execution status.
You can get the current and previous execution logs/history of the functions in any Azure Function App in Live Metrics Portal Window and also using Log Analytics Workspace queries such as requests
:
You can't get the current live execution status, history through API as complete details given in this SO 1 and 2 by the users @cijothomas and @MikhailShilkov.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论