Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating application insights with azure cli

I would like to create application insights using AZURE CLI. I can't find any documentation on this topic. Is it possible?

like image 645
Dzior Avatar asked Nov 15 '18 11:11

Dzior


People also ask

How do I give access to application Insights in Azure?

You can control who has read and update access to your data in Azure Application Insights, by using Azure role-based access control (Azure RBAC). Assign access to users in the resource group or subscription to which your application resource belongs - not in the resource itself.


2 Answers

Use: az monitor app-insights component create

az monitor app-insights component create --app
                                         --location
                                         --resource-group
                                         [--application-type]
                                         [--ingestion-access {Disabled, Enabled}]
                                         [--kind]
                                         [--query-access {Disabled, Enabled}]
                                         [--retention-time]
                                         [--tags]
                                         [--workspace]
like image 153
genegc Avatar answered Sep 22 '22 15:09

genegc


The link provided by Rohit works

az resource create \
    --resource-group $RESOURCE_GROUP \
    --resource-type "Microsoft.Insights/components" \
    --name $NAMESPACE_PREFIX-appinsights \
    --location $PRIMARY_LOCATION \
    --properties '{"Application_Type":"web"}'

https://github.com/Azure/azure-cli/issues/5543#issuecomment-365001620

like image 33
Dzior Avatar answered Sep 20 '22 15:09

Dzior