System Center & Windows Azure Pack – IaaS Usage Metering Configuration Check

Two weeks ago I decided to write a PowerShell script for the purpose to check the whole IaaS usage metering configuration of System Center & Windows Azure Pack. As you already may know I have some kind of addiction for the usage metering & reporting process and the troubleshooting part.

-> http://www.danielstechblog.de/azure-like-chargeback-with-system-center-windows-azure-pack-part-1/
-> http://www.danielstechblog.de/azure-like-chargeback-with-system-center-windows-azure-pack-part-2/
-> http://www.danielstechblog.de/windows-azure-pack-iaas-usage-metering-reporting-troubleshooting/
-> http://channel9.msdn.com/Series/SCUE2014/Windows-Azure-Pack-Usage-Metering-Reporting-Troubleshooting-Guide
-> http://www.danielstechblog.de/system-center-2012-r2-service-reporting-troubleshooting/

From a troubleshooting perspective you have to check a lot of parts in the usage metering chain if something is broken and that is the reason why I wrote this script! Run it and you know where you have to fix the broken usage metering chain.

The requirements for your workstation to run this script are the following ones.

  • System Center 2012 R2 VMM PowerShell Cmdlets (Installed VMM console)
  • System Center 2012 R2 OpsMgr PowerShell Cmdlets (Installed OpsMgr console)

The next maybe conflict with some of your security strategies. You need an account that has access or full access to the following components.

  • SCVMM
  • SCOM
  • Service Provider Foundation
  • Windows Azure Pack usage server
  • Service Reporting
  • SQL server which hosts the SCOM database
  • SQL server which hosts the SCOM data warehouse database
  • SQL server which hosts the SPF database
  • SQL server which hosts the WAPack  Microsoft.MgmtSvc.Usage database
  • SQL server which hosts the Service Reporting database
  • SQL server which hosts the Service Reporting analysis services database

Before you can run the script you have to edit the variables from line 20 to line 38 in the script to fit your environment.

VariableDescription
$VMMServerFQDN of the VMM management server e.g.
srv-1.neumanndaniel.local
$SPFServerFQDN of the SPF server e.g.
srv-2.neumanndaniel.local
$SPFLBNameFQDN of the SPF Load Balancer e.g.
srv-2.neumanndaniel.local
If you are not using a LB use the FQDN of the SPF server.
$WAPackUsageServerFQDN of the WAPack usage server e.g.
srv-5.neumanndaniel.local
$SRServerFQDN of the Service Reporting server e.g.
srv-5.neumanndaniel.local
$OperationsManagerSQLServerSQL server and instance name of the SQL server which hosts the SCOM database e.g.
SRV-2SCOM
$OperationsManagerDWSQLServerSQL server and instance name of the SQL server which hosts the SCOM data warehouse database e.g.
SRV-2SCOM
$OperationsManagerDBNameName of the SCOM database e.g.
OperationsManager
$OperationsManagerDWDBNameName of the SCOM data warehouse database e.g.
OperationsManagerDW
$SRSQLServerSQL server and instance name of the SQL server which hosts the Service Reporting database e.g.
SRV-5SR
$SRSQLAnalysisServerSQL server and instance name of the SQL server which hosts the Service Reporting analysis services database e.g.
SRV-5SR
$SRSQLAnalysisDBNameName of the Service Reporting analysis services database e.g.
UsageAnalysisDB
$SPFSQLServerSQL server and instance name of the SQL server which hosts the Service Provider Foundation database e.g.
SRV-2SPF
$WAPackSQLServerSQL server and instance name of the SQL server which hosts the WAPack Microsoft.MgmtSvc.Usage database e.g.
SRV-5WAP
$SPFUsageUserService account which has been used during the SPF installation e.g.
NEUMANNDANIELspf
$SRSQLUserService account which has been used during the Service Reporting SQL server installation for the SQL database service e.g.
NEUMANNDANIELspf
$SRSQLAgentUserService account which has been used during the Service Reporting SQL server installation for the SQL agent service e.g.
NEUMANNDANIELspfagent
$SRPathWDPath to the directory WorkDir on the Service Reporting server e.g.
C:Program FilesMicrosoft System Center 2012 R2Service ReportingWorkDir
$SRPathSPPath to the directory SSISPackages on the Service Reporting server e.g.
C:Program FilesMicrosoft System Center 2012 R2Service ReportingSSISPackages

After a run the script will show you the following output for a correct usage metering configuration.

Testing

But the output values can be different depending if your configuration is correct or not. Have a look at the following table which output values you get for the different tests.

TestOutput
VMM SCOM Connection StatusOK | Unhealthy | Broken
SPF Get-SCSPFServer: SCOM Management Server NameMatch | Mismatch
SPF Get-SCSPFSetting: SCOM DW SQLMatch | Mismatch
SPF Get-SCSPFSetting: SCOM Management Server NameMatch | Mismatch
SPF Website StatusOK | Broken
SPF Usage Application Pool StatusOK | Broken
SPF Usage Account OpsMgr DW DB User StatusOK | Missing
SPF Usage Account OpsMgrReader Membership StatusOK | Missing
WAPack Service Provider Usage: SPF Usage AccountMatch | Mismatch
WAPack Service Provider Usage: Forwarding AddressMatch | Mismatch
WAPack Usage Website StatusOK | Broken
WAPack Usage Collector Website StatusOK | Broken
WAPack Usage Application Pool StatusOK | Broken
WAPack Usage Collector Application Pool StatusOK | Broken
WAPack Last Usage Record Index and SPF Last Usage Record Index StatusMatch | Mismatch
WAPack Provider Configuration Usage Record Index and SPF Last Usage Record Index StatusMatch | Mismatch
WAPack Usage Provider Collection Cycle Download StatusOK | Error
Service Reporting SQL Agent Account OpsMgr DB User StatusOK | Missing
Service Reporting SQL Agent Account db_datareader Membership StatusOK | Missing
Service Reporting SQL Account SQL Analysis DB SR_Administrator Membership StatusOK | Missing
Service Reporting SQL Agent Account SQL Analysis DB SR_Administrator Membership StatusOK | Missing
Service Reporting DW System Job Last Run StatusOK | Failed
Service Reporting SQL Agent Account SSISPackages Directory Security StatusOK | Missing
Service Reporting SQL Agent Account SSISPackages Directory Permission StatusOK | Denied
Service Reporting SQL Agent Account WorkDir Directory Security StatusOK | Missing
Service Reporting SQL Agent Account WorkDir Directory Permission StatusOK | Denied

You can download the PowerShell script from the TechNet Gallery.

-> https://gallery.technet.microsoft.com/System-Center-Windows-7091e0e1

Facebooktwittergoogle_pluslinkedinmail

Leave a Reply