Agents Administration - Tests
 

Configuration of WVDProcessTest

Application processes can be identified based on specific regular expression patterns. For example, web server processes can be identified by the pattern *httpd*, while DNS server processes can be specified by the pattern *named* where * denotes zero or more characters. For each such pattern running on a chosen Session Host / Azure Virtual Desktop, the process test reports a variety of CPU and memory statistics.

The default parameters associated with this test are as follows:

  • The TEST PERIOD list box helps the user to decide how often this test needs to be executed.

  • In the HOST text box, specify the IP address of the host for which this test is to be configured.

  • In the PORT text box, the default port is NULL.

  • In the Process text box, enter a comma separated list of names: pattern pairs which identify the process(es) associated with the AVD being considered. processName is a string that will be used for display purposes only. processPattern is an expression of the form - *expr* or expr or *expr or expr* or *expr1*expr2*... or expr1*expr2, etc. A leading ‘*’ signifies any number of leading characters, while a trailing ‘*’ signifies any number of trailing characters. For example, say that the session host / AVD in question has three processes running, namely kcs, kjs, and kxs. In this case, in the Process text box, enter "kcsProcess:*kcs*, kjsProcess:*kjs*, kxsProcess:*kxs*, where * denotes zero or more characters. Other special characters such as slashes (\) can also be used while defining the process pattern.

    Note:

    The Process parameter supports process patterns containing the ~ character.

    To determine the process pattern to use for your application, on Windows environments, look for the process name(s) in the Task Manager -> Processes selection.

    Also, while monitoring processes on the session host / AVD, if the Wide parameter of this test is set to Yes, then your process patterns can include the full path to the process and/or the arguments supported by the process. For instance, your processpattern specification can be as follows:

    Terminal:C:\WINDOWS\System32\svchost -k DcomLaunch,Remote:C:\WINDOWS\system32\svchost.exe -k netsvcs

    To save the time and effort involved in such manual process specification, eG Enterprise offers an easy-to-use auto-configure option in the form of a View/Configure processes button that is available next to the Process text box. Refer to Section 1.0.0.1.1 topic to know how to use the auto-configure option.

  • By default, this parameter has a value “none”; this means that the test monitors all processes that match the configured patterns, regardless of the user executing them. If you want the test to monitor the processes for specific users alone, then, specify a comma-separated list of “domain name-user name” pairs, where every pair is expressed in the following format: Domainname\Username. For example, to monitor the processes of user john and elvis who belong to domain mas, your user specification should be: mas\john,mas\elvis. Also, you will find system processes running on the following user accounts: SYSTEM, LOCAL SERVICE, and NETWORK SERVICE. While configuring these user accounts, make sure the Domainame is always NT AUTHORITY. In this case therefore, your user specification will be: NT AUTHORITY\SYSTEM,NT AUTHORITY\LOCAL SERVICE,NT AUTHORITY\NETWORK SERVICE.

    If multiple processes are configured for monitoring and multiple users are also configured, then the test will check whether the first process is run by the first user, the second process by the second user, and so on. For instance, if the processes configured are java:java.exe,apache:*httpd* and the users configured are john,elvis, then the test will check whether user john is running the process java, and user elvis is running the process apache. Similarly, if multiple processes are configured, but a single user alone is configured, then the test will check whether the specified user runs each of the configured processes. However, if you want to check whether a single process, say java.exe, is run by multiple users - say, james and jane - then, you have to do the following:

    • Your user specification should be:<Domainname>\james,<Domainname>\jane

    • Your process configuration should be: Process1:java.exe,Process2:java.exe. The number of processes in this case should match the number of users.

    • Such a configuration will ensure that the test checks for the java.exe process for both the users, james and jane.

  • By default, the eG agent uses perfmon to search for the processes that match the configured patterns. Accordingly, the Wide parameter is set to Noby default. Typically, a process definition in Windows includes the full path to the process, the process name, and process arguments (if any). Perfmon however scans the system only for process names that match the configured patterns - in other words, the process path and arguments are ignored by perfmon. This implies that if multiple processes on a Windows host have the same name as specified against processpattern, then perfmon will only be able to report the overall resource usage across all these processes; it will not provide any pointers to the exact process that is eroding the host's resources. To understand this better, consider the following example. Typically, Windows represents any Java application executing on it as java.exe. Say, two Java applications are executing on a Windows host, but from different locations.

    If java.exe has been configured for monitoring, then by default, perfmon will report the availability and average resource usage of both the Java applications executing on the host. If say, one Java application goes down, then perfmon will not be able to indicate accurately which of the two Java applications is currently inaccessible. Therefore, to enable administrators to easily differentiate between processes with the same name, and to accurately determine which process is unavailable or resource-hungry, the eG agent should be configured to perform its process searches based on the process path and/or process arguments, and not just on the process name - in other words, the eG agent should be configured not to use perfmon.

    To achieve this, first, set the Wide parameter to Yes. This will instruct the eG agent to not use perfmon to search for the configured process patterns. Once this is done, then, you can proceed to configure a processpattern that includes the process arguments and/or the process path, in addition to the process name. For instance, if both the Remote Access Connection Manager service and the Terminal Services service on a Windows host, which share the same name - svchost - are to be monitored as two different processes, then your processpattern specification should be as follows:

    Terminal:C:\WINDOWS\System32\svchost -k DcomLaunch,Remote:C:\WINDOWS\system32\svchost.exe -k netsvcs

    You can also use wildcard characters, wherever required. For instance, in the above case, your processpattern can also be:

    Terminal:*svchost -k DcomLaunch,Remote:*svchost.exe -k netsvcs

    Similarly, to distinctly monitor two processes having the same name, but operating from different locations, your specification can be:

    JavaC:c:\javaapp\java.exe,JavaD:d:\app\java.exe

    Note:

    • Before including process paths and/or arguments in your processpattern configuration, make sure that the Wide parameter is set to Yes. If not, the test will not work.

    • If your processpattern configuration includes a process path that refers to the Program Files directory, then make sure that you do not a include a ~ (tilde) while specifying this directory name. For instance, your processpattern specification should not be say, Adobe:C:\Progra~1\Adobe\AcroRd32.exe.

  • Increased uptime and lower mean time to repair are critical to ensuring that IT infrastructures deliver a high quality of service to users. Towards this end, the eG Enterprise embeds an optional auto-correction capability that enables eG agents to automatically correct problems in the environment, as soon as they occur. With this capability, as and when an abnormal situation is detected, an eG agent can initiate corrective actions automatically to resolve the problem. Automatic correction without the need for manual intervention by IT operations staff reduces service downtime and improves operational efficiency. By default, the auto-correction capability is available in the eG Enterprise for the Processes running measure of Processes - AVD test, and the Service availability measure of Windows Services - AVD test. The eG Enterprise includes a default auto-correction script for Processes - AVD test.

    When a process that has been configured for monitoring stops, this script automatically executes and starts the process. To enable the auto-correction capability for the Processes - AVD test, first, select the Yes option against the Correct parameter in this page (by default, No will be selected here(.

  • Upon selecting the Yes option against Correct, three new parameters, namely, Alarm Type, User Params, and Corrective Script will appear. You can set the corrective script to execute when a specific type of alarm is generated, by selecting an option from the Alarm Type list box. For example, if the Critical option is chosen from the Alarm Type list box, then the corrective script will run only when a critical alarm for the Processes - AVD test is generated. Similarly, if the Critical/Major option is chosen, then the corrective script will execute only when the eG Enterprise system generates critical or major alarms for the Processes - AVD test. In order to ensure that the corrective script executes regardless of the alarm type, select the Critical/Major/Minor option.

  • The user-defined parameters that are to be passed to the corrective script are specified in the User Params text box. One of the following formats can be applied to the User Params specification:

    exec@processName:command: In this specification, processName is the display name of the process pattern specified against the Process parameter, and command is the command to be executed by the default script when the process(es) represented by the processName stops. For example, assume that the :Process parameter of Processes - AVD test has been configured in the following manner: Apache:*\eGurkha\manager\apache\bin\httpd*,Tomcat:*java*tomcat*, where Apache and Tomcat are the processNames or display names of the configured patterns. If auto-correction is enabled for these processes, then the User Params specification can be as follows:

    exec@Apache:C:\eGurkha\manager\apache\bin\apachectl start,Tomcat:C:\tomcat\bin\catalina.bat start

    This indicates that if the processes configured under the processName "Apache" stop (i.e. *\eGurkha\manager\apache\bin\httpd*), then the script will automatically execute the command "C:\eGurkha\manager\apache\bin\apachectl start" to start the processes. Similarly, if the “Tomcat” processes (i.e. *java*tomcat*) stop, the script will execute the command “C:\tomcat\bin\catalina.bat start” to start the processes.

    command: In this specification, command signifies the command to be executed when any of the processes configured for monitoring, stop. Such a format best suits situations where only a single process has been configured for monitoring, or, a single command is capable of starting all the configured processes. For example, assume that the Process parameter has been configured to monitor IISWebSrv:*inetinfo*. Since only one process requires monitoring, the first format need not be used for configuring the User Params. Therefore, simplify specify the command, "net start World Wide Web Publishing Service".

    Note:

    • The User Params specification should be placed within double quotes if this value includes one or more blank spaces (eg.,"Apache:C:\eGurkha\bin\apachectl start").

    • Note that if a processName configured in the Process parameter does not have a corresponding entry in User Params (as discussed in format 1), then the autocorrection capability will not be enabled for these processes.

  • Specify none in the Corrective Script text box to use the default auto-correction script. Administrators can build new auto-correction capabilities to address probable issues with other tests, by writing their own corrective scripts. To know how to create custom autocorrection scripts, refer to the eG User Manual.

  • If multiple components of the same component type are awaiting configuration, then an APPLY TO OTHER COMPONENTS check box will appear in this page. Clicking on this check box will allow you to apply the configuration to all/selected components of that type.

  • Once the above values are provided, click on the UPDATE button to register the changes made.

When changing the configuration for specific servers, a “*” beside the text box corresponding to the parameter signifies that these values have to be manually configured by the user. The parameter values that require to be configured will typically be prefixed with a “$” or contain a series of “*”. A value of “none” in the parameter value indicates that the corresponding parameter value can be changed if required.