简体   繁体   English

如何监控 azure 中的容器应用指标

[英]How to monitor container app metrics in azure

I'm new to the azure environment and wondering how it's possible to monitor an azure container app?我是 azure 环境的新手,想知道如何监控 azure 容器应用程序? Currently I've deployed a nodejs application by running a container app and I know how to query some logs by using the protocols section.目前我已经通过运行容器应用程序部署了一个 nodejs 应用程序,并且我知道如何使用协议部分来查询一些日志。

What I'm really looking into is how to get metrics like incoming requests or vcpu usage but I don't know how to get those metrics using azure monitoring.我真正在研究的是如何获取传入请求或 vcpu 使用情况等指标,但我不知道如何使用 azure 监控来获取这些指标。

How can I access those values?如何访问这些值?

It is possible to add Azure application insights SDK to your nodejs project.可以将 Azure 应用程序洞察 SDK 添加到您的 nodejs 项目中。 It will monitor your app activity like incoming/outcoming requests, database operations and etc. Also there is an option to add automatic metrics gathering:它将监视您的应用程序活动,例如传入/传出请求、数据库操作等。还有一个添加自动指标收集的选项:

See thisdocumentation link for details.有关详细信息,请参阅此文档链接

let appInsights = require("applicationinsights");
appInsights.setup("<instrumentation_key>")
    .setAutoDependencyCorrelation(true)
    .setAutoCollectRequests(true)
    .setAutoCollectPerformance(true, true)
    .setAutoCollectExceptions(true)
    .setAutoCollectDependencies(true)
    .setAutoCollectConsole(true)
    .setUseDiskRetryCaching(true)
    .setSendLiveMetrics(true)
    .start();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获取App Service环境的度量标准(通过Azure Monitor)? - How to get the Metrics for App Service Environment (by Azure Monitor)? 如何收集Azure Eventhub metrics无法导出到Azure Monitor - How to collect Azure Eventhub metrics that can't be exported to Azure Monitor 警报与 Azure 监控代理指标 - Alerts with Azure Monitor Agent Metrics 如何在Azure监视器中为VM洞察指标添加警报? - How to add alert in Azure monitor for VM insight metrics? 如何上传可在 Azure 管理门户上的诊断监视器中看到的 azure 上的自定义指标和指标数据 - How to upload custom metrics and metrics data on azure that can be seen on Azure Management Portal in Diagnostics Monitor 如何监视 Azure 存储容器/子文件夹中 Blob 的创建并触发逻辑应用程序以发送电子邮件 - How to monitor the creation of Blob in Azure Storage container/subfolders and Trigger a logic app to send email Azure CLI 监控所有虚拟机的指标 - Azure CLI monitor metrics of all virtual machines Azure 用于监控 VPN 隧道状态的监控指标 - Azure Monitor metrics for monitoring VPN Tunnel Status 容器级别的 azure 存储指标 - azure storage metrics at container level 如何继续和监视Azure应用服务 - How to proceed and monitor Azure app service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM