Is there a management API for Standard Logic Apps? - azure

There is a Logic Apps management API (https://learn.microsoft.com/en-us/rest/api/logic/workflows)
As far as I understood you cannot use the service to access Standard Logic Apps. Is there a work around? Basically I need to retrieve a few days of action outputs of my running workflow. TIA

Basically I need to retrieve a few days of action outputs of my running workflow.
Like mentioned by #Thomas, One of the workarounds is to enable application insights from your logic apps and then retrieve the action outputs of your workflow in log analytics using KQL.
In Application Insights, I'm using the below query to get the information about each and every action where its state is in Running.
traces
| where cloud_RoleName == "<Your_LogicApp_Name>"
| where message contains "Running"
| where operation_Name != ""

Related

azure logic app for failed connections and slow running queries to send the mail automatically

can anyone suggest how to create the logic app for failed connections in azure to send mail automatically, diagnostics setting in logs log analytics enabled, for failed connection need how many failed connections with username and ip address.
AzureDiagnostics
| where event_class_s == "connection_log"
and event_subclass_s == "DISCONNECT"
also need to automate through logic app for slow running queries any suggestions.
need to run from Azure log analytics and send mail through logic app.
Yes , You can enable Log Analytics when you create your logic app or install the Logic Apps Management solution in your Log Analytics workspace for existing logic apps to enable logging for your logic app. This solution gathers data for your logic app runs and offers particular details like status, execution time, resubmission status, and correlation IDs. Then, to enable logging and query creation for this data.
for complete setup please refer this Microsoft Documentation|Set up Azure Monitor logs and collect diagnostics data for Azure Logic Apps
To get the all failure status of logic app you can use the below query as well
AzureMetrics | where Resource contains "MY RESOURCE GROUPNAME" and MetricName contains "RunsFailed" and Total >= 1 and ResourceProvider contains "MICROSOFT.LOGIC"
Source|SO THREAD

Query logs through multiple Azure Application Insights

I'm working on a Azure project which has several Azure functions app. One function app is linked to one Application Insights. So we have as much as functions app as Applications Insights.
These functions app will talk between them, and some processes can pass by multiple functions app. On the Azure function, I add logs with a custom EntityID and this EntityID is the same between all function apps.
Now my question is : How I can retrieve all the logs with the same EntityID on all the Applications Insights ?
Like :
traces
| where operation_Name == "TestLogManagement"
| where customDimensions.EventId == 888
but on several Applications Insights.
I know that we can regroup multiple Applications Insights by a Tag but no way to retrieve my logs after I created it.
app('app1').traces
| union app('app2').traces
| where * contains "42"
| summarize count() by appId
Please have a look here:
Unify multiple Azure Monitor Application Insights resources
You can also do this in workbooks in azure monitor, so you don't need to encode app names in the query, you can just write the query you want and pick multiple instances of either AI resources or LA workspaces

Azure Logic Apps - is it possible to have a metric that shows, per resource, the SUM of all Trigger Fired?

I have a very simple use case: I have an Azure Subscription used internally for testing and demo purposes. A lot of members of the team are regularly creating Logic Apps for tests and demo.
I want to be sure that we don't have a lot of Triggers Fired (i.e. each second...) in order to avoid too much consumption.
When I go to Metrics in order to display the sum of "Trigger Fired", I need to first select a Logic App and I can't select multiple Logic Apps at a time. How can I proceed if I want to see all Trigger Fired metrics for all Logic Apps?
Thanks.
If you just want it show multiple logic app fired values in one metric, you could set a metric show one logic app trigger fired value then click Add metric, it will prompt it to configure the details. After these, you will see the value in one metric.
Update: hope this is what you want. You need go to Logs, query the logs you want. And how to set the monitor to get the logs, you could refer to this doc:logic apps monitor your logic apps. Then query in the Logs.
The below is my test.
AzureDiagnostics
| where Category == "WorkflowRuntime"
| where OperationName == "Microsoft.Logic/workflows/workflowTriggerStarted"
| summarize ccc=count(Category) by bin_at(TimeGenerated, 1h, now()), ResourceGroup ,ResourceProvider
The select the CHART.
And from the doc you could find Logic Apps Management to view logs, it also provide a way to view runs like the below picture.
Note: with this way it only show you the logs after you set the Log Analytics, the before logs it won't be stored.

How do I change the Azure Logic App Frequency and Request type

How do I change the Azure Logic App Frequency and Request type (Not programmatic ally)
Frequncy and Request type
Thank you for providing a screenshot! So the REQUEST and FREQUENCY info that you're seeing on the Overview section relate to the specific Trigger that you're using in your Logic App. Different triggers will show different info here depending on how they're designed to operate & work.
In your case, it looks like you're using one of Logic Apps' built-in connector called Request which will trigger workflow in your Logic Apps whenever a request is received to its endpoint hence manual and on-demand.
To change this trigger, navigate to Logic Apps Designer view under DEVELOPMENT TOOLS in the Azure Portal as shown below:
Moreover, I recommend reading Logic Apps' documentation here and finding more about triggers and actions; overall concepts behand Logic Apps. Hope this helps and goodluck with your journey on Logic Apps!

Using Azure Application Insights REST API (https://dev.applicationinsights.io) to read custom events/metrics

Our service writes a lot of custom events and metrics to App Insights.
Using the AI portal we can make complex queries and see nice charts, but I would like to access the data from outside the portal.
The Azure Application Insights REST API page (https://dev.applicationinsights.io) claims that those API can be used to perform such task, but I am unable to make them work - again I want to query custom events and metrics, not the standard ones.
Does anyone have any examples?
Here is for example one our queries:
customEvents
| where name startswith "Monitor.Xxxxxxx"
| summarize count() by bin(timestamp, 1min)
| order by timestamp desc
It turned out I was using the wrong AppId/Key; once I plugged the correct ones I am able to use the API Explorer.

Resources