Control Actions

Monitoring solutions often provide the ability to alert an administrator over email, pager, SMS, etc., when problems occur. In response to an alert, the administrator has to perform domain-specific detailed analysis of the problem, often by running different commands on the target system. In this process, the administrator has to figure out and initiate corrective measures. Most monitoring solutions provide remote problem alerting capability, but the ability to remotely login in a secure manner and perform detailed analysis and troubleshooting is not available. To allow true anytime, anywhere management capability, such remote control of the target IT infrastructure must be possible using a web browser.

eG’s Remote Control Action capability allows an administrator to remotely and securely access any monitored server in an IT infrastructure and to execute remote commands in order to perform detailed analysis of problems and to initiate corrective actions against them.

The benefits of eG’s remote control actions are:

  • Enable remote control in addition to routine monitoring, thereby offering a quick and easy way of initiating corrective actions
  • Remote diagnosis and control of any component in the monitored infrastructure is enabled from anywhere, using just a web browser
  • Remote control capability is selectively enabled for users based on their access rights

The control actions are enabled with no change in the eG architecture. The agents do not listen on any TCP ports. Hence, security risks in the target environment are minimum. Furthermore, since control actions can be initiated from a web browser, they can be triggered from anywhere, at any time.

To understand this concept better, consider the example of a web server shown in Figure 1.

Figure 1 : A web server indicating a problem in the Windows Service layer

Figure 1 indicates that the World Wide Web Publishing service of a web server has stopped running and hence, the web server is not available. Starting this service in the web server host will solve this problem. For this, you will not be required to manually access the host and start the WWW service in it.

Instead, simply click on the (Remote Control) button indicated by Figure 1. Upon clicking, a page depicted by Figure 2 will appear.

Figure 2 : Executing a remote command for starting the service

Follow the steps below on Figure 2, to get the WWW service back up:

  1. From the Actions list in Figure 2, you need to pick the remote action that you want to perform on the web server host. Typically, for any managed component, eG Enterprise readily provides a set of pre-configured commands to choose from,. Closely-related commands are grouped together to form a command category - for instance, commands that are to be run on the operating system are grouped under the OS category. The Actions drop-down will list these default categories and the commands in each category. If no command is pre-configured for any component, then the OS category alone will appear in the Actions drop-down, with a single 'Execute Command' bundled within. In the case of the web server in our example, the Actions drop-down list displays the 'Execute Command' option alone. Selecting this option enables you to run any custom command on the target host, remotely. In the case of our example therefore, select Execute Command and then specify the command to start the WWW Service in the Command text area in Figure 2.

    Note:

     

    By default, only the admin user has the right to directly execute a command on the agent host. To grant such a right to any other user(s), follow the steps given below:

    • Edit the eg_controls.ini file in the <eg_install_dir>\manager\config directory
    • In the [control_defaults] section of the file, you will find an AllowOtherCommands parameter that is set to admin, by default. This indicates that, by default, only the admin user is privileged to execute commands other than the ones listed in the Commands list.
    • To extend that right to other users, specify a comma-separated list of user names against the AllowOtherCommands parameter:

      AllowOtherCommands=admin,john,elvis,brian

    • Finally, save the eg_controls.ini file.
  2. Then, set the value of Output required to Yes (see Figure 1) to view the output of the specified command. Otherwise, select No.

  3. Then, enter the Timeout period. This is the duration for which the eG manager will wait for an output for the specified command. Upon the expiry of the period, the command execution will be automatically terminated.

  4. Finally, execute the command by clicking the Execute button in Figure 3.

  5. If Output required is set to Yes, then you will view the output of the executed command (see Figure 3).

    Figure 3 : Output of the specified command

Note:

If you attempt to run a remote command on a Citrix XenApp server, Microsoft RDS server, VMware Horizon RDS server, or any VDI component, then you will find that the Actions drop-down in Figure 2 is populated with a User/Session category of commands. One of the commands in this category is 'Shadow user session'. Session shadowing lets multiple users view and control a single session and its applications. This allows technical support and system administrators to provide remote assistance to customers and users. Session shadowing may also be used for live collaboration.

To run the Shadow user session command remotely on a Citrix XenApp server, Microsoft RDS server, VMware Horizon RDS server, or any VDI component, you need to enable certain permissions in the group policy. This is why, before you run this command on such components, you need to do the following:

  • Login to the target server.

  • Open the Group Policy Management Editor.

  • Browse the folder structure in the left panel, and open the Remote Desktop Services folder within. Then, expand the Remote Desktop Session Hosts folder, and click on the Connections folder therein.

  • The right panel will then change as shown by Figure 4 below.

    Figure 4 : Enabling remote control of RDP user sessions via group policy

  • Double click on the Set rules for remote control of Remote Desktop Services user sessions option in the right panel.

  • When the Set rules for remote control of Remote Desktop Services user sesions dialog box appears, select the Enabled option therein to activate the policy setting. Then, pick the Full control with user's permission option from the Options list box (see Figure 4).

The eG monitoring console also allows you to view all the eG agent and their modes of operation, so you can pick and choose the agents you want to remotely control, and run commands on them. For this, do the following:

  1. Select the Remote Control option from the Miscellaneous tile in the Monitor menu.

  2. When Figure 5 appears, select the Normal option from the Agent Mode drop-down to view all the agent hosts that are in that mode of operation.

    Figure 5 : Agents in the Normal mode

    By default, an eG agent is in the Normal mode. No remote action can be performed on a host when the agent is in this mode. To start remote control activities, the agent has to be moved into a Control mode. For this, you first need to select the agent host that you want to control. Browse the agent host list in Figure 5 to identify the host that you want to remotely control. Alternatively, you can specify the whole/part of the IP address/nick name of the agent in the Agent IP / Nick name text box (see Figure 5), and click the 'magnifying glass' icon within. This will invoke Figure 6, where all hosts with IP addresses / nick names that match the specification will appear.

    Figure 6 : Agent hosts with IP address / nick name matching the specification

  3. To change the mode of operation of an agent from Normal to Control, click on the agent host in Figure 5 or Figure 6 (as the case may be). The agent will instantly switch to the Waiting mode. The waiting mode is a transition mode between the Normal and Control modes. An agent remains in this state for a very short time, and finally changes to the Control mode.

    Figure 7 : An agent in the Waiting mode

  4. Once the agent switches to the Control mode, Figure 8 will appear, wherein you need to specify the command to be executed remotely on the agent host.

    Figure 8 : Executing a command on the agent in the Control mode

  5. From the Command list box, select the command to be executed remotely. By default, the Command list contains a set of pre-configured, ready-to-use commands. If the command to be executed is already available in the Command list, select it, and specify the Arguments (if any), that may be supported by the chosen command (see ).
  6.  If the command you want to execute is not pre-configured, then you have the following options:  

    • First, add the command to the Command list (using the Agents -> Settings -> Remote Control menu sequence in the eG administrative interface), and then select that command from the Command list, OR,

    • Directly issue the command using the remote control page.

  7. If you opt for the former, then follow the procedure discussed in Administering eG Enterprise.
  8. If you pick the latter, you need to first check whether you are authorized to execute a remote command that is outside of the Command list.

    Note:

     

    By default, only the admin user has the right to directly execute a command on the agent host. To grant such a right to any other user(s), follow the steps given below:

    • Edit the eg_controls.ini file in the <eg_install_dir>\manager\config directory
    • In the [control_defaults] section of the file, you will find an AllowOtherCommands parameter that is set to admin, by default. This indicates that, by default, only the admin user is privileged to execute commands other than the ones listed in the Commands list.
    • To extend that right to other users, specify a comma-separated list of user names against the AllowOtherCommands parameter:

      AllowOtherCommands=admin,john,elvis,brian

    • Finally, save the eg_controls.ini file.
  9. Once the right is granted to you, you can proceed to directly execute an 'unregistered' remote command by selecting the Other option from the Command list, and providing the Command Syntax (see Figure 3).

  10. Then, set the value of Output required to Yes to view the output of the specified command. Otherwise, select No.
  11. Then, enter the Timeout period. This is the duration for which the eG manager will wait for an output for the specified command. Upon the expiry of the period, the command execution will be automatically terminated.
  12. Finally, execute the command by clicking the execute button in Figure 3.
  13. If Output required is set to Yes, then you will view the output of the executed command.

    Note:

    An agent will remain in the Control mode for 10 minutes, after which, it will return to the Normal mode.