Applications Systems

How to convert Windows service component monitors from WMI to RPC for SAM

You may come across an issue where you have a windows service monitor that is unknown, down or sometimes flapping its status when using specifically the WMI fetching method due to some environmental issues with that server. This article explains how you can potentially workaround such problem without drastic steps such as rebuilding performance counters or rebuilding the WMI repository and instead use RPC method.

First published date

10/16/2018 7:40 PM

Last published date

5/8/2019 1:52 PM

Overview

Fetching Method Details of Windows Service Component Monitor.

Select the Fetching Method (Communication Type):

WMI (Windows Management Instrumentation) - Use WMI communication to test if the specified Windows process is running.

RPC (Remote Procedure Call) - Use RPC communication to test if the specified Windows process is running.

SAM will poll the service state, and information about CPU/memory usage will be retrieved using performance counters.

Product section

Server Application Monitor

Resolution

To change a single Windows Service Monitor to RPC method
  • Browse to the SAM Summary page in the Orion web console
  • Edit the application template that has the windows service component.
  • Expand the Windows Service component.
  • Change from WMI to RPC method.
  • Save.

To change ALL possible Windows Service Monitors to RPC method across all your applications

The following SQL Script will convert all existing Windows service component monitors fetching method from WMI to RPC.

The following SQL Script converts the polling method of all existing Windows service component monitors from WMI to RPC. This script can be used for agent and agentless nodes.

You can copy the code below, paste it in Notepad, and save it with the .sql extension.

  • Set the variable in the following code as @Value = 'RPC' to update all existing Windows Service and Process.
  • Components\component templates to use 'RPC (Remote Procedure Call' fetching method setting.
  • And set it as @Value = 'WMI' to update all existing Windows Service and Process
  • Components\component templates to use 'WMI (Windows Management Instrumentation' fetching method setting.
-- Scripts are not supported under any SolarWinds support program or service. 
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further 
-- disclaims all warranties including, without limitation, any implied warranties 
-- of merchantability or of fitness for a particular purpose. The risk arising 
-- out of the use or performance of the scripts and documentation stays with you. 
-- In no event shall SolarWinds or anyone else involved in the creation, 
-- production, or delivery of the scripts be liable for any damages whatsoever 
-- (including, without limitation, damages for loss of business profits, business 
-- interruption, loss of business information, or other pecuniary loss) arising 
-- out of the use of or inability to use the scripts or documentation.

DECLARE    @Value NVARCHAR(max)
SELECT @Value = 'RPC' --'WMI'
UPDATE APM_ComponentSetting;

SET [Value] = @Value
WHERE [ComponentID] IN
SELECT c.ID FROM APM_Component c WHERE c.ComponentType IN (1, 9) AND [Key] = 'FetchingMethod' AND [ValueType] = 5;

 
UPDATE APM_ComponentTemplateSetting SET Value = @Value WHERE [ComponentTemplateID] IN;
SELECT ct.ID FROM APM_ComponentTemplate ct WHERE ct.ComponentType IN (1, 9) AND [Key] = 'FetchingMethod' AND [ValueType] = 5;