使用 azure cli 创建应用程序见解
Creating application insights with azure cli
我想使用 AZURE CLI 创建应用程序见解。我找不到关于此主题的任何文档。可能吗?
Application Insights 是一种可扩展的应用程序性能管理 (APM) 服务,适用于多个平台上的 Web 开发人员。您可以使用它来监控实时 Web 应用程序。您可以获取有关 Application Insights.
的更多详细信息
它属于 Azure Monitor。您可以从 az monitor
中找到合适的 CLI 命令。希望这会有所帮助。
Rohit提供的link作品
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
如果您需要将生成的检测密钥与另一个资源相关联,例如函数应用程序,您可以使用grep
和xargs
,如下所示:
# Creates insights component for monitoring. Note generated instrumentation key
# is set in function app.
az resource create \
--resource-group ${RESOURCE_GROUP_NAME} \
--resource-type "Microsoft.Insights/components" \
--name ${FUNCTION_APP_NAME} \
--location ${LOCATION} \
--properties '{"Application_Type":"web"}' \
| grep -Po "\"InstrumentationKey\": \K\".*\"" \
| xargs -I % az functionapp config appsettings set \
--name ${FUNCTION_APP_NAME} \
--resource-group ${RESOURCE_GROUP_NAME} \
--settings "APPINSIGHTS_INSTRUMENTATIONKEY = %"
az monitor app-insights 组件提供用于从命令行创建、检查、修改和删除 Application Insights 组件的命令。
使用: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]
我想使用 AZURE CLI 创建应用程序见解。我找不到关于此主题的任何文档。可能吗?
Application Insights 是一种可扩展的应用程序性能管理 (APM) 服务,适用于多个平台上的 Web 开发人员。您可以使用它来监控实时 Web 应用程序。您可以获取有关 Application Insights.
的更多详细信息它属于 Azure Monitor。您可以从 az monitor
中找到合适的 CLI 命令。希望这会有所帮助。
Rohit提供的link作品
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
如果您需要将生成的检测密钥与另一个资源相关联,例如函数应用程序,您可以使用grep
和xargs
,如下所示:
# Creates insights component for monitoring. Note generated instrumentation key
# is set in function app.
az resource create \
--resource-group ${RESOURCE_GROUP_NAME} \
--resource-type "Microsoft.Insights/components" \
--name ${FUNCTION_APP_NAME} \
--location ${LOCATION} \
--properties '{"Application_Type":"web"}' \
| grep -Po "\"InstrumentationKey\": \K\".*\"" \
| xargs -I % az functionapp config appsettings set \
--name ${FUNCTION_APP_NAME} \
--resource-group ${RESOURCE_GROUP_NAME} \
--settings "APPINSIGHTS_INSTRUMENTATIONKEY = %"
az monitor app-insights 组件提供用于从命令行创建、检查、修改和删除 Application Insights 组件的命令。
使用: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]