Problemen met de Windows Azure Pack Usage Service oplossen
Van toepassing op: Windows Azure Pack
Informatie over het oplossen van problemen is beschikbaar voor verschillende aspecten van de Windows Azure Pack Usage Service.
Problemen met poor usage Gegevensstroom oplossen in Windows Azure Pack
Controleer in het algemeen de tabel [gebruik]. [ProvidersConfiguration] in het schema [Microsoft.MgmtSvc.Usage] eerst. Deze tabel bevat alle resourceproviders die correct zijn geregistreerd bij Windows Azure Pack om gebruiksgegevens op te geven. Als een resourceprovider ontbreekt in die tabel, wordt er geen contact opgenomen met gebruiksgegevens door de service voor de gebruiksverzamelaar.
Als u een onjuiste registratie van een resourceprovider wilt diagnosticeren, bekijkt u de [mp]. [ResourceProviders] tabel in het schema [Microsoft.MgmtSvc.Store]. Hiermee worden alle resourceproviders in het systeem weergegeven. Controleer de waarden voor het doorsturen van gebruiksadressen en referenties om te zien waar de resourceprovider bij is geregistreerd. Dit moet altijd uw eerste stop zijn bij het valideren van de juiste configuratie van een resourceprovider.
Tabellen met diagnostische gegevens over gebruik
Naast de bovenstaande stappen worden de volgende diagnostische tabellen voor gebruik weergegeven in de database Microsoft.MgmtSvc.Usage. Elke tabel heeft een kolom 'Fout' waarin uitzonderingen worden vastgelegd.
Belangrijk
Diagnostische gegevens worden standaard drie dagen bewaard. Dit kan worden geconfigureerd door DiagnosticDataDetationDays in de tabel Usage Configuration Table
Tabel |
Logboekgegevens |
---|---|
UsageDiagnostics.CollectionCycles |
Bevat logboeken voor alle aanroepen door de gebruiksverzamelaar. |
UsageDiagnostics.ProviderCollectionCycles |
Bevat logboeken voor alle aanroepen van de gebruiksverzamelaar naar resourceproviders in het systeem. |
UsageDiagnostics.FrontEndRequests |
Bevat logboeken voor alle aanroepen naar de Usage REST API (Usage Service) van een externe factureringsservice. |
UsageDiagnostics.MaintenanceCycles |
Er zijn onderhoudsbewerkingen die worden uitgevoerd op de basisgebruikstabellen, bijvoorbeeld het opschonen van gebruiksrecords op basis van de opschoningscyclus. Deze tabel bevat logboeken met betrekking tot de onderhoudscycli. |
SQL-query's
De volgende SQL query's bevatten nuttige informatie over probleemoplossing
Tabel [UsageDiagnostics]. [ProviderCollectionCycles]
Er zijn fouten opgetreden bij het verzamelen van gebruiksgegevens.
SELECT TOP 1000 [ProviderCycleID],[CollectionCycleID],[ResourceProviderID],
[ResourceProviderStatus],[RecordsCount],[DownloadStartTime],
[DownloadDurationMilliSeconds],[ResourceProviderHostName],[DownloadStatus],[Error]
FROM [Microsoft.MgmtSvc.Usage].[UsageDiagnostics].[ProviderCollectionCycles]
WHERE Error NOT LIKE 'NULL'
Totaal aantal verzamelingspogingen in de afgelopen (v1) uur.
DECLARE @v1 int = 5
SELECT count(*) as 'Total Collection Attempts in last (v1) hours',
sum([RecordsCount]) as 'Total Records Collected in last (v1 hours)',
sum(DownloadDurationMilliSeconds) as 'Time spent collecting (ms)',
[ResourceProviderID],[ResourceProviderHostName]
FROM [Microsoft.MgmtSvc.Usage].[UsageDiagnostics].[ProviderCollectionCycles]
WHERE DownloadStartTime > DATEADD(HOUR,-@v1,GETDATE())
GROUP BY ResourceProviderID,ResourceProviderHostName
ORDER BY ResourceProviderID
Totaal aantal verzamelingspogingen en records in de afgelopen (v2) dagen voor resourceprovider (v3).
DECLARE @v2 int = 5
DECLARE @v3 int = 1
SELECT cast(DownloadStartTime As Date) as 'Day',[ResourceProviderID],
[ResourceProviderHostName],count(*) as 'Total Collection Attempts this day',
sum([RecordsCount]) as 'Total Records Collected this day',
(sum(DownloadDurationMilliSeconds)/60000) as 'Time spent collecting ~(min)'
FROM [Microsoft.MgmtSvc.Usage].[UsageDiagnostics].[ProviderCollectionCycles]
WHERE cast(DownloadStartTime As Date) > DATEADD(DAY,-@v2,GETDATE())
AND ResourceProviderID = @v3
GROUP BY cast(DownloadStartTime As Date),ResourceProviderID,ResourceProviderHostName
ORDER BY cast(DownloadStartTime As Date)
Er zijn fouten opgetreden bij het verzamelen van gebruiksgegevens.
SELECT TOP 1000 [ProviderCycleID],[CollectionCycleID],[ResourceProviderID],
[ResourceProviderStatus],[RecordsCount],[DownloadStartTime],
[DownloadDurationMilliSeconds],[ResourceProviderHostName],[DownloadStatus],[Error]
FROM [Microsoft.MgmtSvc.Usage].[UsageDiagnostics].[ProviderCollectionCycles]
ORDER BY ProviderCycleID DESC
Tabel [Gebruik]. [Records]
Alle resourceproviders die zijn geconfigureerd voor gebruiksgegevens.
SELECT ALL [ProviderId],[ProviderName]
FROM [Microsoft.MgmtSvc.Usage].[usage].[ProvidersConfiguration]
Totaal aantal records van elke resourceprovider.
SELECT count(*) as 'Total Records Received',ResourceProviderId
FROM [Microsoft.MgmtSvc.Usage].[usage].[Records]
GROUP BY ResourceProviderId
Totaal aantal records van elke resourceprovider binnen de afgelopen (v1) uur.
DECLARE @v1 int = 5
SELECT count(*) as 'Total Records in last (v1) hours',ResourceProviderId
FROM [Microsoft.MgmtSvc.Usage].[usage].[Records]
WHERE EndTime > DATEADD(HOUR,-@v1,GETDATE())
GROUP BY ResourceProviderId
Gebruiksrecords van resourceprovider (v2) binnen de afgelopen (v3) uur.
DECLARE @v2 int = 1
DECLARE @v3 int = 5
SELECT [RecordId],[ExternalRecordId],[ResourceId],[StartTime],[EndTime],
[ResourceProviderId],[ServiceType],[SubscriptionId],[Properties],[Resources]
FROM [Microsoft.MgmtSvc.Usage].[usage].[Records]
WHERE ResourceProviderId = @v2 AND EndTime > DATEADD(HOUR,-@v3,GETDATE())
ORDER BY StartTime desc
Gebruiksrecords voor abonnement (v4) binnen de afgelopen (v5) uur.
DECLARE @v4 varchar(50) = 'E6F86A02-3D89-44E9-AE8E-17C77223676E'
DECLARE @v5 int = 5
SELECT [RecordId],[ExternalRecordId],[ResourceId],[StartTime],[EndTime],
[ResourceProviderId],[ServiceType],[SubscriptionId],[Properties],[Resources]
FROM [Microsoft.MgmtSvc.Usage].[usage].[Records]
WHERE SubscriptionId = @v4 AND EndTime > DATEADD(HOUR,-@v5,GETDATE())
ORDER BY StartTime desc