azure-log-analytics

Connecting Azure Activity Log to Log Analytics instance using PowerShell

不想你离开。 提交于 2019-12-19 11:29:56
问题 Is there a way to configure Azure Activity logs to be forwarded to a Log Analytics instance using PowerShell? Essentially the same that can be performed using the Portal as outlined on this page: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/collect-activity-logs#configuration 回答1: You may use the PowerShell cmdlet New-AzureRmOperationalInsightsAzureActivityLogDataSource . Illustration: New-AzureRmOperationalInsightsAzureActivityLogDataSource -ResourceGroupName

RoleManager.WriteToLog in Azure Development Fabric

不想你离开。 提交于 2019-12-11 17:04:23
问题 I'm just taking my first steps with Azure and the first thing I see in the development fabric is a bunch of console style logging windows. So I figure that's going to be handy and decide to figure out how to write stuff there and stumble upon this: Microsoft.ServiceHosting.ServiceRuntime.RoleManager.WriteToLog("Information", "Message); Cool, except I don't see anything in the log. Saw a post somewhere that after first install you need to reboot before this will work, so I tried that but still

Can we view a log analytics alert in azure using azure cli or powershell?

喜你入骨 提交于 2019-12-11 10:58:07
问题 We can create/update/view Classic log analytics alerts in azure through azure powershell or cli. Can we create/update/view a normal alert in log analytics using azure cli or powershell? 回答1: Nope, the CLI functions to do that aren't released yet. The functionality should be released soon. They're moving log analytics alerts into the new Azure Security Insights. There's a rest API that is able to edit alerts, but it can't edit saved searches, so it's useless for updating the queries. 来源: https

Cross-workspace queries in azure log analytics .NET SDK

情到浓时终转凉″ 提交于 2019-12-11 07:32:13
问题 I'm using azure log analytics .NET SDK to execute some log analytics queries. The nugget package I'm using for this SDK is Microsoft.Azure.OperationalInsights. This allows me to issue some simple queries like in the following code sample : Authentication & Simple query : partial class QueryProvider { private OperationalInsightsDataClient _operationalInsightsDataClient; private async void Authenticate() { // Retrieving the credentials and settings data from the app settings . var domain =

To create the Log Analytics alerts using Azure Power Shell or Azure CLI

走远了吗. 提交于 2019-12-11 06:07:55
问题 I'm trying to create alerts in LogAnlytics in azure portal, need to create 6 alerts for 5 db's, so have to create 30 alerts manually and is time consuming. Hence would require an automated approach. Tried to create via Creating Alerts Using Azure PowerShell, but this creates the alerts in the Alerts Classic under Monitor but this is not what is required, require it to be created in Log Analytics. Next approach was via Create a metric alert with a Resource Manager template but this was metric

How to retain data in Azure Log Analytics beyond the 31 days?

丶灬走出姿态 提交于 2019-12-08 12:30:37
问题 I am looking into options for retaining data beyond the 31 days that Azure Log Analytics supports. I tried reading the documentation, but I haven’t been able to figure it out yet. How should this be architected? Is the expectation that the logs should be archived to a cold Azure Storage account outside of this using some other method from the data source, or is there a way to route the parsed log data from Azure Analytics Logs to an Azure Storage account? 回答1: If you are not using a free tier

Azure application insights or log analytics

≯℡__Kan透↙ 提交于 2019-12-04 11:35:11
What is the use case for Azure application insights or log analytics? I am using APIM and Azure Functions and want to perform logging for requests. Which one is the best fit, application insights or log analytics? https://docs.microsoft.com/en-gb/azure/azure-monitor/overview Update In particular, any info on Azure application insights vs log analytics used for APIM? What used to be known as Application Insights and Log Analytics independent offerings - are now a part of Azure Monitor. We're actively merging both platforms. For instance, Analytics exploration part is exactly the same (same

Error setting up Azure Function within Azure Resource under Log Analytics Workspace

亡梦爱人 提交于 2019-12-02 18:15:40
问题 I have error setting up Azure Function within Azure Resource under Log Analytics Workspace. When only AllMetrics is checked, it works. But whenever FunctionExecutionLogs is checked, error occurs like below: 1.Nav to your log analytics workspace in azure portal. 2.in the left blade, select Workspace Data Sources -> Azure Resources, then click your azure function there. Check FunctionExecutionLogs and error occurs. Any idea? Setup data used by Azure Log Analytics with Azure Fucntions Update We

PatchResourceNotFound error while calling azure rest API

夙愿已清 提交于 2019-12-02 17:11:02
问题 when i am calling below log alerts azure rest api able to enable/disable only application insights) same api when calling alerts created on log analytics its throwing error "PatchResourceNotFound" https://management.azure.com/subscriptions/subid/resourcegroups/RGname/providers/microsoft.insights/scheduledQueryRules/alertname?api-version=2018-04-16 got below error { "error": { "code": "PatchResourceNotFound", "message": "The resource 'https://management.azure.com/subscriptions/4776c051-f4ef

PatchResourceNotFound error while calling azure rest API

你。 提交于 2019-12-02 11:44:44
when i am calling below log alerts azure rest api able to enable/disable only application insights) same api when calling alerts created on log analytics its throwing error "PatchResourceNotFound" https://management.azure.com/subscriptions/subid/resourcegroups/RGname/providers/microsoft.insights/scheduledQueryRules/alertname?api-version=2018-04-16 got below error { "error": { "code": "PatchResourceNotFound", "message": "The resource 'https://management.azure.com/subscriptions/4776c051-f4ef-4a30-8ce7-c9fb99ff0fc5/resourcegroups/DevOpsTestRG-A/providers/microsoft.insights/scheduledQueryRules