SCOM 2016 System Center Core Monitoring Fix

This problems should be fixed, though I leave this here for educational purposes.None of the enhancements I did to SCOMprecentageCPUTime will carry over though.Note: This is not tested with the new hotfix MP released for SCOM 2016 found here:https://blogs.technet.microsoft.com/mo

 
 
 
 
 
5 Star
(2)
817 times
Add to favorites
System Center
11/1/2018
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Is this fixed in 1801
    3 Posts | Last post November 02, 2018
    • Hi Lerun.
      We have recently upgraded to 1801. We didn't have either your or the hotfix MP installed. I am still getting timeouts from SCOMpercentageCPUTimeCounter.ps1 in 1801. I tried to install the "official" MS hotfix, but the version of the core monitoring and Internal Library MPs are older than 1801's. Are you aware if this problem was fixed in 1801? If it wasn't, would your MP help?
      
      Thanks in advance.
      Yochai.
    • Hi, I'm sorry but I have moved on from working with SCOM and do not know of the changes dones in 1801.
    • Also note the original fix here was just for the WinRM problems. It seems like MS has revisited the powershell scripts I took issue with. Hopefully they are better now.
      
      Therefore you should remove my MPs and go with the defaults.
  • Typo in Condition Detection.
    4 Posts | Last post November 02, 2018
    • I was just looking through your solution files and found this Condition Detection in "MonitorTypes.mpx";
      
      UnitMonitorType ID="Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterMonitorTypeAddendum"
      
       It seems that you have not used the property bag item in the XPathQuery, but rather there is a generic "Value" there (hopefully my copy/paste of the xml will appear correctly in this comment.)
      
                  <ConditionDetection ID="SufficientCriticalSamplesCD" TypeID="System!System.ExpressionFilter">
                    <Expression>
                      <SimpleExpression>
                        <ValueExpression>
                          <XPathQuery Type="Double">Value</XPathQuery>
                        </ValueExpression>
                        <Operator>GreaterEqual</Operator>
                        <ValueExpression>
                          <Value Type="Double">$Config/ConsecutiveSampleCountCritical$</Value>
                        </ValueExpression>
                      </SimpleExpression>
                    </Expression>
                  </ConditionDetection>
                  <ConditionDetection ID="SufficientHealthySamplesCD" TypeID="System!System.ExpressionFilter">
                    <Expression>
                      <SimpleExpression>
                        <ValueExpression>
                          <XPathQuery Type="Double">Value</XPathQuery>
                        </ValueExpression>
                        <Operator>GreaterEqual</Operator>
                        <ValueExpression>
                          <Value Type="Double">$Config/ConsecutiveSampleCountHealthy$</Value>
                        </ValueExpression>
                      </SimpleExpression>
                    </Expression>
                  </ConditionDetection>
    • To follow up on this a bit, it seems that you should be using 'SCOMpercentageCPUTime' from the property bag returned by the script. 
      
      So instead of this:
      <XPathQuery Type="Double">Value</XPathQuery>
      
      it should be this:
      <XPathQuery Type="Double">Property[@Name='SCOMpercentageCPUTimeStatus']$</XPathQuery>
    • Sorry for the late reply, but I have since moved on from this.
      
      Thanks for pointing out these potential problems, it has been some time since I did this. Though I can not remember touching the MP logic outside of just renaming them.
      
      My focus was on refactoring the Powershell code of the monitors. 
      
      Looking here:
      https://systemcenter.wiki/?GetElement=Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCounterMonitorType&Type=UnitMonitorType&ManagementPack=Microsoft.SystemCenter.2007&Version=7.3.13142.0
      
      You can see the same mistake is still in effect, so I just inherited it in my fix.
      
    • I have added your suggestions to my git repo, though as I can not test it myself I will not compile a new version and publish it here.
      
      https://github.com/mortenlerudjordet/lerunTools/blob/master/SCOM/MPs/Microsoft.SystemCenter.2007.Addendum/MonitorTypes.mpx
  • Collection script timeout
    3 Posts | Last post June 13, 2017
    • Hi,
      
      I have a SCOm 2016 UR3 environment with yhis MP loaded. Many servers report that Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollectionAddendum workflow times out (120sec). Have you seen this in any of your environments?
      
      Martin
    • Hi, I have not seen this myself. But if servers have a lot of processes running I can see this script taking a long time to run.
      
      I did some measuring of what parts of the script was taking the most time, and unfortunately to tackle this I will have to rewrite everything from scratch (removing all the original code). In my environment the script normally runs for about 30 - 40 sec. 
      
      To find out more about you environment specifics take the script and run it on the server where you are seeing the problem. Run it from powershell command line (admin) and not from the ISE. 
      Do : 
      .\SCOMpercentageCPUTimeCounter.ps1 -ComputerName "servername.mydomain.dom" -ConfigForRun "False" -ProcessIterationCount 3
      
      Usually it is the iteration count that makes this script take a long time to complete. It uses this to get several rounds of performance data from the processes the health service spawns. This is then averaged. One way of reducing runtime is to set a lower number for ProcessIterationCount. Another is to set the original script timeout value back to 300 sec, instead of the 120 I have set. 
      
    • If you have the time can you try to run this version of the script on one of the servers that are timing out? I have changed some more code logic to hopefully optimize better the filtering of what processes it should get the performance counters from. 
      There are still many places where sleep is used, so it is impossible to get it to run faster than the combined values of these sleep commands. 
      
      https://github.com/mortenlerudjordet/lerunTools/blob/master/SCOM/MPs/Microsoft.SystemCenter.2007.Addendum/SCOMpercentageCPUTimeCounter.ps1
      
      Thanks