Azure Insights API支持哪些资源类型?

时间:2016-07-04 12:29:01

标签: api rest azure

我正在使用Azure Insights Rest API导出Azure帐户中多个不同资源的监控数据。

我正在使用此端点的调用来获取数据:

https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}/metrics

我通过致电:

获取订阅中所有资源的列表
https://management.azure.com/{subscription-id}/resources

此调用返回带有大量条目的json。每个条目都有一个属性“type”,它描述了资源的类型。例如:

"type": "Microsoft.Compute/virtualMachines"

我的问题是这些类型中只有少数支持通过我使用的API读取监控数据。任何人都可以告诉我,从哪里获取信息,API支持哪些资源类型?

2 个答案:

答案 0 :(得分:2)

这是指向所有可用指标的支持资源类型列表的链接:

https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-supported-metrics

花了一段时间追踪 - 它没有出现在搜索中,我也从未在监视/见解页面中看到过它。不知道为什么它如此埋葬,这是一个巨大的帮助和节省时间。

注意 - 不确定为什么之前提供的提供商列表作为答案,但应该删除它 - 它与被询问的问题无关。

答案 1 :(得分:1)

您可以使用PowerShell和Azure-cli轻松获取资源类型列表。

  • 的PowerShell
    运行以下命令:
    Login-AzureRmAccount
    Get-AzureRmResourceProvider -ListAvailable
  • 天青-CLI 将Azure cli模式更改为arm,然后运行azure provider list

以下是资源类型的完整列表:

ProviderNamespace                      RegistrationState ResourceTypes                                                 
-----------------                      ----------------- -------------                                                 
Microsoft.ApiManagement                Registered        {service, validateServiceName, checkServiceNameAvailability...
Microsoft.AppService                   Registered        {apiapps, appIdentities, gateways, deploymenttemplates...}    
Microsoft.Automation                   Registered        {automationAccounts, automationAccounts/runbooks, automatio...
Microsoft.Batch                        Registered        {batchAccounts, operations, locations, locations/quotas}      
Microsoft.Cache                        Registered        {Redis, locations, locations/operationResults, checkNameAva...
Microsoft.Cdn                          Registered        {profiles, profiles/endpoints, profiles/endpoints/origins, ...
Microsoft.ClassicCompute               Registered        {domainNames, checkDomainNameAvailability, domainNames/slot...
Microsoft.ClassicNetwork               Registered        {virtualNetworks, reservedIps, quotas, gatewaySupportedDevi...
Microsoft.ClassicStorage               Registered        {storageAccounts, quotas, checkStorageAccountAvailability, ...
Microsoft.CognitiveServices            Registered        {accounts}                                                    
Microsoft.Compute                      Registered        {availabilitySets, virtualMachines, virtualMachines/extensi...
Microsoft.DataFactory                  Registered        {dataFactories, dataFactories/diagnosticSettings, dataFacto...
Microsoft.Devices                      Registered        {checkNameAvailability, operations, IotHubs}                  
Microsoft.DocumentDB                   Registered        {databaseAccounts, databaseAccountNames, operations}          
Microsoft.EventHub                     Registered        {namespaces, checkNamespaceAvailability, operations}          
Microsoft.HDInsight                    Registered        {clusters, clusters/operationresults, locations}              
microsoft.insights                     Registered        {components, webtests, queries, logprofiles...}               
Microsoft.KeyVault                     Registered        {vaults, vaults/secrets, operations}                          
Microsoft.MachineLearning              Registered        {Workspaces, locations, locations/operations, locations/ope...
Microsoft.Media                        Registered        {mediaservices, operations, checknameavailability}            
Microsoft.MobileEngagement             Registered        {appcollections, appcollections/apps, checkappcollectionnam...
Microsoft.Network                      Registered        {virtualNetworks, publicIPAddresses, networkInterfaces, loa...
Microsoft.NotificationHubs             Registered        {namespaces, namespaces/notificationHubs, checkNamespaceAva...
Microsoft.OperationalInsights          Registered        {workspaces, storageInsightConfigs, linkTargets, operations}  
Microsoft.PowerBI                      Registered        {workspaceCollections, locations, locations/checkNameAvaila...
Microsoft.ResourceHealth               Registered        {availabilityStatuses}                                        
Microsoft.Scheduler                    Registered        {jobcollections, operations, operationResults, flows}         
Microsoft.Search                       Registered        {searchServices, checkServiceNameAvailability, checkNameAva...
Microsoft.ServiceBus                   Registered        {namespaces, checkNamespaceAvailability, premiumMessagingRe...
Microsoft.SiteRecovery                 Registered        {SiteRecoveryVault}                                           
Microsoft.Sql                          Registered        {operations, locations, locations/capabilities, checkNameAv...
Microsoft.Storage                      Registered        {storageAccounts, operations, usages, checkNameAvailability...
Microsoft.StreamAnalytics              Registered        {streamingjobs, locations, locations/quotas, streamingjobs/...
microsoft.visualstudio                 Registered        {account, account/project}                                    
Microsoft.Web                          Registered        {sites/extensions, sites/slots/extensions, sites/instances,...
Sendgrid.Email                         Registered        {accounts}                                                    
SuccessBricks.ClearDB                  Registered        {databases, clusters}                                         
Aspera.Transfers                       NotRegistered     {services, operations, listCommunicationPreference, updateC...
Citrix.Cloud                           NotRegistered     {accounts, operations, listCommunicationPreference, updateC...
Conexlink.MyCloudIT                    NotRegistered     {accounts, operations, listCommunicationPreference, updateC...
Hive.Streaming                         NotRegistered     {services, operations, listCommunicationPreference, updateC...
Lombiq.DotNest                         NotRegistered     {sites, operations, listCommunicationPreference, updateComm...
Microsoft.ADHybridHealthService        Registered        {services, addsservices, configuration, operations...}        
Microsoft.Authorization                Registered        {roleAssignments, roleDefinitions, classicAdministrators, p...
Microsoft.BingMaps                     NotRegistered     {mapApis, operations, listCommunicationPreference, updateCo...
Microsoft.BizTalkServices              NotRegistered     {BizTalk}                                                     
Microsoft.CertificateRegistration      NotRegistered     {certificateOrders, certificateOrders/certificates, validat...
Microsoft.ClassicInfrastructureMigrate NotRegistered     {classicInfrastructureResources}                              
Microsoft.ContainerService             NotRegistered     {containerServices, locations, locations/operations, operat...
Microsoft.ContentModerator             NotRegistered     {applications, operations, listCommunicationPreference, upd...
Microsoft.DataCatalog                  NotRegistered     {catalogs, checkNameAvailability, operations, locations...}   
Microsoft.DataLakeAnalytics            NotRegistered     {operations}                                                  
Microsoft.DataLakeStore                NotRegistered     {operations}                                                  
Microsoft.DevTestLab                   NotRegistered     {labs, labs/virtualMachines, operations, locations...}        
Microsoft.DomainRegistration           NotRegistered     {domains, domains/domainOwnershipIdentifiers, topLevelDomai...
Microsoft.DynamicsLcs                  NotRegistered     {lcsprojects, lcsprojects/connectors, lcsprojects/clouddepl...
Microsoft.Features                     Registered        {features, providers, operations}                             
Microsoft.Logic                        NotRegistered     {workflows, locations/workflows, locations, operations...}    
Microsoft.MarketplaceOrdering          NotRegistered     {agreements, operations}                                      
Microsoft.OperationsManagement         NotRegistered     {solutions}                                                   
Microsoft.RecoveryServices             NotRegistered     {vaults, operations}                                          
Microsoft.Resources                    Registered        {tenants, locations, providers, checkresourcename...}         
Microsoft.Security                     NotRegistered     {securityStatus, securityStatuses, securityStatus/virtualMa...
Microsoft.ServerManagement             NotRegistered     {operations, gateways, nodes}                                 
Microsoft.ServiceFabric                NotRegistered     {clusters}                                                    
microsoft.support                      Registered        {operations, supporttickets}                                  
NewRelic.APM                           NotRegistered     {accounts}                                                    
Pokitdok.Platform                      NotRegistered     {services, operations, listCommunicationPreference, updateC...
RavenHq.Db                             NotRegistered     {databases, operations, listCommunicationPreference, update...
Raygun.CrashReporting                  NotRegistered     {apps, operations, listCommunicationPreference, updateCommu...
Signiant.Flight                        NotRegistered     {accounts, operations, listCommunicationPreference, updateC...
TrendMicro.DeepSecurity                NotRegistered     {accounts, operations, listCommunicationPreference, updateC...
U2uconsult.TheIdentityHub              NotRegistered     {services, operations, listCommunicationPreference, updateC...

有关详细信息,请参阅https://azure.microsoft.com/en-us/documentation/articles/resource-manager-supported-services/