Ask the Community
Groups
How to create advance WMI test - Connect IT Community | Kaseya
<main> <article class="userContent"> <h3 data-id="question"><strong>QUESTION:</strong></h3> <p>How can I create an advance WMI test?</p> <h3 data-id="resolution"><strong>RESOLUTION:</strong></h3> <p><strong>Traverse can use WMI to monitor for example the CPU and memory utilization of specific processes running on a Windows server. In order to setup monitoring of an application named "<em>MyApp</em>", as visible on Windows Task Manager, follow these steps.</strong></p> <p> </p> <p>Before the creation of the test in Traverse we need to gather the information about the wmi class we will utilize and the properties.</p> <ul><li>In the Device that you would like to monitor, please run a Power Shell session and run the following:</li> </ul><p><code class="code codeInline" spellcheck="false" tabindex="0">Get-WmiObject -Class Win32_PerfRawData_PerfProc_Process | Where-Object {$_.__PATH -like "*power*"}</code></p> <p> Note that I replaced "MyApp" for "*power*" to match the application I will monitor which is Power Shell</p> <p><img src="/attachments/token/5F3TOsbMJVmOhu1wTbQHoCdDh/?name=wmi_test1.JPG" alt="wmi_test1.JPG" width="805" height="574" class="embedImage-img importedEmbed-img"></img></p> <p> Now we look for the property that we are interested on, in my case PercentProcessorTime</p> <p><img src="/attachments/token/6pExzPwnnwFXfvkiv8TdcfGqO/?name=wmi_test2.JPG" alt="wmi_test2.JPG" class="embedImage-img importedEmbed-img"></img></p> <p>Now in Traverse:</p> <ol><li>Log into Traverse Web Application as an end-user</li> <li>Navigate to Administration -> Devices </li> <li>Click on Tests link for the <em>device</em> where the process is running</li> <li>Click on Create New Advanced Tests link</li> <li>Enable Advanced WMI Test and configure test parameters:</li> </ol><p><img src="/attachments/token/mruWDFwQ16hJ4ytkdmArc0K7p/?name=wmi_test3.JPG" alt="wmi_test3.JPG" width="930" height="292" class="embedImage-img importedEmbed-img"></img></p> <pre class="code codeBlock" spellcheck="false" tabindex="0">Thresholds = 25 (warning) and 55 (critical) WMI Property = \Win32_PerfRawData_PerfProc_Process:PercentProcessorTime:Name="<em>MyApp</em>" Result Multiplier = 0.0000001 Maximum Value = 100 Test Units = %</pre> <ol><li>Click on Provision Tests </li> </ol><p>Replace <em>MyApp</em> and the thresholds with suitable values. Since this test requires two consecutive polls to calculate the value, you should see a valid result within 10 minutes. For memory utilization, follow the same steps as above with these settings:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">Thresholds = 300 (warning) and 450 (critical) WMI Property = \Win32_PerfRawData_PerfProc_Process:WorkingSet:Name="<em>MyApp</em>" Result Multiplier = 0.000001 Test Units = MB</pre> <p>Now when you navigate to Status -> Devices and drill-down into the device, the new tests should be shown with current test status.</p> <p><img src="/attachments/token/b7MyW6BNf1Q1OIR3rhDzPIUvi/?name=wmi_test4.JPG" alt="wmi_test4.JPG" width="901" height="136" class="embedImage-img importedEmbed-img"></img></p> <p><strong>APPLIES TO </strong></p> <p>All versions of Traverse </p> <p><strong>REFERENCE </strong></p> <p>None</p> <p> </p> </article> </main>