{"action":"published","release":{"url":"https://api.github.com/repos/OSTC/enhanced-monitoring-service/releases/1374870","assets_url":"https://api.github.com/repos/OSTC/enhanced-monitoring-service/releases/1374870/assets","upload_url":"https://uploads.github.com/repos/OSTC/enhanced-monitoring-service/releases/1374870/assets{?name}","html_url":"https://github.com/OSTC/enhanced-monitoring-service/releases/tag/v1.0","id":1374870,"tag_name":"v1.0","target_commitish":"master","name":"","draft":false,"author":{"login":"yuezh","id":6800404,"avatar_url":"https://avatars.githubusercontent.com/u/6800404?v=3","gravatar_id":"","url":"https://api.github.com/users/yuezh","html_url":"https://github.com/yuezh","followers_url":"https://api.github.com/users/yuezh/followers","following_url":"https://api.github.com/users/yuezh/following{/other_user}","gists_url":"https://api.github.com/users/yuezh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuezh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuezh/subscriptions","organizations_url":"https://api.github.com/users/yuezh/orgs","repos_url":"https://api.github.com/users/yuezh/repos","events_url":"https://api.github.com/users/yuezh/events{/privacy}","received_events_url":"https://api.github.com/users/yuezh/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2015-06-04T03:32:07Z","published_at":"2015-06-04T03:39:15Z","assets":[{"url":"https://api.github.com/repos/OSTC/enhanced-monitoring-service/releases/assets/620841","id":620841,"name":"EnhancedMonitoring.msi","label":null,"uploader":{"login":"yuezh","id":6800404,"avatar_url":"https://avatars.githubusercontent.com/u/6800404?v=3","gravatar_id":"","url":"https://api.github.com/users/yuezh","html_url":"https://github.com/yuezh","followers_url":"https://api.github.com/users/yuezh/followers","following_url":"https://api.github.com/users/yuezh/following{/other_user}","gists_url":"https://api.github.com/users/yuezh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuezh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuezh/subscriptions","organizations_url":"https://api.github.com/users/yuezh/orgs","repos_url":"https://api.github.com/users/yuezh/repos","events_url":"https://api.github.com/users/yuezh/events{/privacy}","received_events_url":"https://api.github.com/users/yuezh/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":65536,"download_count":0,"created_at":"2015-06-04T03:38:34Z","updated_at":"2015-06-04T03:38:37Z","browser_download_url":"https://github.com/OSTC/enhanced-monitoring-service/releases/download/v1.0/EnhancedMonitoring.msi"}],"tarball_url":"https://api.github.com/repos/OSTC/enhanced-monitoring-service/tarball/v1.0","zipball_url":"https://api.github.com/repos/OSTC/enhanced-monitoring-service/zipball/v1.0","body":"How to install the Enhanced Monitoring Service on Windows Server 2012 R2\r\n======\r\nThis tool provides enhanced data monitoring for virtual machines. It allows you to monitor the performance and resource status of the physical server from within the virtual machine.\t\r\n\r\nPrerequisites\r\n------\r\nThis tool relies on [KVP data exchange chanel](https://technet.microsoft.com/en-us/library/dn798297.aspx) to pass performance data from host to guest VM.\r\n\t\r\nInstallation\r\n------\r\n1. Download the EnhancedMonitoring.msi package\r\n2. Run MSI to install the Enhanced Monitoring Service\r\n\r\n![](doc/installer.png)\r\n\r\nValidate the installation\r\n-----\r\nAfter the installation confirm that  the \"Enhanced Monitoring Provider Service\" service is visible in the services console, and that it is automatically started.\r\n\r\n![](doc/service.png)\r\n\r\nConfiguration\r\n-----\r\n#### Configure Enhanced Monitoring Service on the Host\r\nThe configuration file path is ```C:\\ProgramData\\Enhanced Monitoring\\EnhancedMonitoringProviderConfig.xml```. You may modify the file to configure the Enhanced Monitoring Service. Any modification to the configuration file will only take effect after you restart the service.\r\n\r\nExample: You can turn on verbose logging for troubleshooting by changing the  \"LogLevel\" value to “Verbose” :\r\n\r\n```\r\n  <!-- Optional -->\r\n  <LogLevel>Verbose</LogLevel>\r\n```\r\nHowever, we advise to leave the configuration file unchanged unless there is a good reason to do so.\r\n\r\n#### Configure the guest VM to receive monitoring data\r\nA key-value-pair ```Enhanced_Monitoring_Supported=1``` needs to be presented by the guest VM to the host so that the host is aware that this particular guest VM is expecting monitoring data. Only then the  Enhanced Monitoring Service will populate the KVP data exchange channel for this VM with monitoring data.\r\n\r\nOn a Linux VM this can be done by writing the key-value-pair ```Enhanced_Monitoring_Supported=1``` to the file ```/var/lib/hyperv/.kvp_pool_1```. On a Windows VM a registry key ```HKLM:\\SOFTWARE\\Microsoft\\Virtual Machine\\Guest\\Enhanced_Monitoring_Supported``` must be created and set to the value 1.\r\n\r\nThe sample code can be found under [sample](/sample).\r\n\r\nRead monitoring data inside a guest VM\r\n-----\r\nAfter the guest VM is configured to receive monitoring data, the host will send monitoring data to the guest VM through the KVP channel.\r\n\r\nIn a Linux VM the data is received under ```/var/lib/hyperv/.kvp_pool_0```. In a Windows VM the data is received under the register key ```HKLM:\\SOFTWARE\\Microsoft\\Virtual Machine\\External```.\r\n\r\nThe performance data is base64-encoded and split into multiple parts to follow the length limitation of the KVP channel. The sample code for parsing the data can be found under [sample](/sample).\r\n\r\nTrouble shooting\r\n-----\r\nAll issues are logged under ```C:\\ProgramData\\Enhanced Monitoring\\log```.\r\n\r\n![](doc/log.png)\r\n\r\nThe Enhanced Monitoring Service has a limitation for the guest VM name. Guest VMs must have different names and the VM name must not contain the following characters:\r\n```\r\n( ) * / # \"\r\n```\r\nThis limitation is introduced by Hyper-V.\r\n\r\nRefresh Rate\r\n-----\r\nIf you have a large number of guest VMs (more than 40) running on the same host, you need to increase the refresh rate to 2 minutes. You can do this by setting the \"RefreshRate\" value in the configuration file to ```120``` and restart the service.\r\n```\r\n  <!-- Refresh interval in seconds-->\r\n  <!-- Mandatory -->\r\n  <RefreshRate>120</RefreshRate>\r\n```\r\n\r\nWMI quota\r\n-----\r\nThe Enhanced Monitoring Service relies on the WMI Provider Service to monitor the performance and resource status of the physical server. However, the WMI Provider Service has a resource limitation  for threads, memory, etc. If you have a large number of VMs (more than 40), you need to increase the quota. Likewise,  if you have other work loads that might use the WMI Provider Service running on the same host, you also need to increase the quota.\r\n\r\n[How to Increase WMI quota](http://blogs.technet.com/b/askperf/archive/2008/09/16/memory-and-handle-quotas-in-the-wmi-provider-service.aspx)\r\n"}}