Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Logging To Azure Log Analytics WorkSpace From MS Flow
WhatsApp
Sandeep Kumar
5y
12.9
k
0
5
25
Blog
Introduction
In this blog, we will learn how to log messages to Azure Log Analytics workspace using MS Flow.
Prerequisite
Log Analytics workspace should be created
Workspace ID, primary key should be known beforehand
Steps to be used in flow
Firstly, we will create a simple MS flow log the message in Log Analytics. Please follow below steps.
Create a flow with manual trigger.
Click on ‘New Step’ and search for ‘Send data’ and select ‘Send Data’ action.
Once you select the action, it will be available on the flow and will ask for the following details.
Now in the Connection Name, you can put relevant name, which will be used while querying the logs for Log Analytics. I am putting –
FlowLALogging
In the workspace Id and Workspace key, put respective values from log analytics.
To know the workspace id, open the log analytics and click on overview.
To get the Workspace Key, go to advanced setting and copy primary or secondary key.
After entering the values once you click on Create, the ‘Send Data’ action will be changed as below,
Enter values in all the three fields as follows
JSON Request body - Message to be logged in, should be in JSON format.
Custom LOG Name – Connection name used in step 5. For me it is FlowLALogging
Time-generated-field
–
Represents the date and time of logging.
The JSON request body should be in below format,
[
{
"Action 1"
:
"Testing LA Logging 1"
,
"Action 2"
:
"Testing LA Logging 2"
}
]
In the custom Log Name – FlowLALogging
Now save the workflow and run it manually.
Your flow should run successfully.
Now wait for 5 minutes so that log data should be available for query.
After 5 minutes go to Log Analytics - Log and run below command.
FlowLALogging_CL| limit 50
‘_CL’ is the suffix added for each custom key. It stands for Custom Logging.
Azure Log Analytics
MS Flow
Up Next
Creating An Azure API For Custom Logging In Azure Log Analytics
Ebook Download
View all
The Implementation & Handling of Multiple Microsoft Chatbot Modules
Read by 3.2k people
Download Now!
Learn
View all
Membership not found