Connecting storage account datalake 2 to log analytics workspace - azure

I have a storage account datalake Gen2.
I need to connect my storage account logs to a Log analytics workspace.
But there is no Diagnostic Settings menu, so I don't know how to do.
I think this was supported by datalake Gen1, but is there a workaround for datalake gen 2?
thank you

There is a Diagnostic settings option at the end of the left sidebar, but you have to scroll quite a bit to find it.
Sadly, i believe currently there is no such option to automatically send diagnostic logs to a log analytics workspace. The active logs will be generated inside a folder named "$logs" located on the root path of your storage account, its only visible through Azure storage explorer.
Microsoft provides a Powershell script located at Azure GitHub which aims to upload the log files generated to a log analytics workspace of your choice.
You can refer to this official guide from Microsoft to build this workflow to send your logs to log analytics: Querying Azure Storage logs in Azure Monitor Log Analytics

Related

Azure SQL storing database logs

For storing Azure SQL database logs, is it necessary to explicitly create blob for logs storage or it is implicitly created. I read this and this post but still not sure about it?
Also, for Java/Spring application deployed in App Services, when using App Insights, Log Analytics and Azure Monitor for Application logs, HTTP and Access logs and DB logs, do I need to explicitly setup blob for storing logs?
No, you do not need to create a blob storage for Azure SQL database logs as they are stored in Azure SQL database transaction logs and can be viewed using Azure Monitor or audited using Azure SQL Auditing.
Steps to check the Logs in SQL DB under Monitor section.
After creating azure SQL database and server.
Go to monitoring tab as mentioned in below screenshot and the logs can be viewed.
Approach 2
Using Log Analytics
Create a Log analytics workspace in Azure.
And go to the SQL Database and choose the Diagnostics from left pane in monitoring tab.
Add a diagnostic setting and choose the created log analytics and choose the log option as mentioned in below screenshot.
You can find the logs as shown below.
To store the Azure SQL Logs explicitly
You need to create 'Storage Account' for storing logs.
And have to enable Azure Monitor Logs from your SQL server and select 'Diagnostic logs' from the Azure Monitor menu and then, turn on the logs and select the storage account you created.
And configure log retention by selecting the Logs tab in the Azure Monitor menu, and then choose 'Retention policy' to configure how long logs will be retained.
To verify logs in the storage account, go to the storage account and select 'Containers.' You should see a container named 'insights-logs-sqlserverauditlog.' You can then browse the logs stored in this container.

Can Synapse Spark connect to a "Log Analytics workspace"?

I need to export from "Log Analytics workspace" to storage account in parquet / delta format. How can I achieve this?
Using the ADX Spark connector in a Notebook, it says that the URL is invalid. I’m using the URL of LAW instead of a cluster of AdX.
With a diffrent appraoch apart from ADX/Notebook, we can run the logic application afterwards and look for logs in the storage.
To learn more about Using a Logic App to archive data from the Log Analytics workspace to Azure storage, consult the Microsoft Documentation..
To do this, we only need access to the Log Analytics Workspace and Storage accounts.
Additionally, we can construct a trigger in the logic app that will run once daily or as frequently as needed to upload all the new data..
After the device has been activated, click Add New step to add an action that runs after the recurring action. Click "Azure Monitor Logs" after typing "azure monitor" into the "Choose an action" box. After setting up the full workflow, make a blob and attach it to the workflow as shown below:
Later, we can execute the logic application and search the log store.
Reference link: Microsoft Documentation
Export data from a Log Analytics workspace to a storage account by using Logic Apps

How to monitor read write activities on Azure Blob Storage

Need to figure out how to log/retrieve information about who (which Azure AD user) has read/write on blobs in our azure blob storage.
I know you can turn on logging on the storage account level using this:
I can see in the logs the different api calls that have been performed on the blob but If I myself went via the azure portal to open some of the blobs, I could not see this activity recorded in the logs. Any ideas how to monitor this? I need it for auditing purposes.
When you enable Storage Analytics on Portal, you will have $logs folder on your Blob with storage logs.
When you are using Azure AD authentication you need to configure 2.0 logs and use UserPrincipalName column to identify the user and parse the column with JSON AuthorizationDetail.action to identify the action of the user on storage, i.e. Microsoft.Storage/storageAccounts/blobServices/containers/read for list the blobs in a container.
You will not capture OAuth/Azure AD authenticated requests with log format 1.0.
On Azure Storage Uservoice there is also the request for integration with LogAnalytics to simplify logs monitoring, the private preview should start this month.

Can we fetch custom logs in Azure OMS

Our Project is a Java Spring boot application, We have a logging system using log4j, Which we are pushing into the Azure Storage accounts.
Question:
I want to query these custom logs in OMS. (Is it possible)
If Yes how.
Till now what i have tried is.
1. Pushed the logs in Blob storage using Logback and container looks like
Pushed logs in table storage
And configured Storage accounts in log analytics in Azure workspace
But i am unable to see any Analytic data to query in OMS .
Please help.
If you can't use Application Insights, you can read logs files from Storage and use HTTP Data Collector API to push logs into Log Analytics workspace. Samples and reference: https://learn.microsoft.com/en-us/azure/log-analytics/log-analytics-data-collector-api

How to store Azure app services diagnostic logs to Azure Table Storage?

I want to store my api's (hosted on app services) logs to Azure Table storage using Azure Diagnostics. Currently I can store the logs on blob container I am unable to find a option to store on the Table storage.
After some google searching I found that classic azure portal supported to store logs on table storage. When I try to log-in into classic portal it automatically redirects me to the current portal.
Basically I want to view the logs using Azure Log Analytics where I'm unable to view the logs from a blob container.
Please show me some light on this issue. Either enlighten me by showing a way to bind logs in Azure Log Analytics from a blob container or showing me a way to store app services diagnostic logs to table storage.

Resources