|
Command Line Analysis |
|
|
Objective The aim of this tool is to execute a command line and parse the output of this command, and in addition, verify the status of the execution by searching for a string, to run an infinite background command or to stop a command execution if the timeout elapses. Although Monitoring Studio offers a variety of tools with extensive capabilities, you may have an in-house script or command that you need to run and analyze at regular intervals in order to monitor your application. You can configure Monitoring Studio to execute any command line and parse the output of this command. In addition, the command line execution feature allows you to:
Thus, the command line execution feature gives you the options you need to properly execute, analyze and monitor the script or command line.
Create or edit a command line analysis To create a new Command Line analysis, right-click the application/container icon in the PATROL Console and select KM Commands > New > Command Line analysis...
New Command Line Execution Wizard — Welcome Page To edit an existing Command Line analysis, right-click the Command Line icon in the PATROL Console and select KM Commands > Edit. Classic command execution Step 1: Entering the command line to execute
New Application/Container Icon Wizard — Command Line Page Command line to execute: Enter the OS command line or the path to the script that Monitoring Studio will execute. Execute this command line as Username/Password: Enter a username and password if the command line needs to be run with a user account different from the default PATROL Agent account.
Step 2: Execution period, and execution timeout As the option This command needs to be launched only once and runs continuously is not selected in step 1, the following dialog box is displayed.
New Application/Container Icon Wizard — Command Execution Period Page Stop the command if it takes longer than … seconds: The time after which the command will be stopped.
Command to execute if the timeout above is reached: A command similar to a recovery/cleaning action that will be executed when the timeout is reached.
Step 3: Command execution validation (optional) This option is useful to avoid basic execution errors like File not found because the command line was mistyped. The following panel will pop up:
New Application/Container Icon Wizard — Command Execution Validation Page Command Exit Status: States if the command line has been properly executed:
Command execution validation: The regular expression entered here will be searched in the output of the command. If it is not found, the value of the ExecutionStatus parameter will be set to 1, indicating that the command failed to execute properly. Step 4: Monitoring Studio settings
New Application/Container Icon Wizard — Settings Page Object display name: Label that will be displayed in the PATROL Console for this command line monitoring object. Object internal identifier (ID): PATROL internal identifier of this monitored object. What thresholds do you want to set for the newly created instance? A drop-down list allows you to select the mode of setting alert thresholds:
Never-ending Command Execution Step 1: Entering the command line to execute
Never-ending Command Execution — Command Line Command line to execute: Enter the OS command line or the path to the script that Monitoring Studio will execute. Execute this command line as Username/Password: Enter a username and password if the command line needs to be run with a user account different from the default PATROL Agent account. This command needs to be launched only once and runs continuously: A so-called "never-ending" command is a program or script that runs continuously. It is not actually polled but instead executed just once and the returned value of the command is displayed in the ReturnOutput parameter as it runs. In addition, String and Numeric value searches are performed as new output is received.
Step 2: Confirm never-ending command and additional command to execute to stop the never-ending command If you select the option This command needs to be launched only once and runs continuously in step 1, the following pop-up asks you to confirm your choice:
Never-ending Command Execution — Confirmation Message Once the "never-ending" option is confirmed, the following dialog box confirming that the command line will be executed just once and will run continuously is shown:
Never-ending Command Execution — Command Execution Additional command to execute in such a case: Enter a specific command to execute in order to stop the execution of the previous launched never-ending Command. This command runs when the command analysis is deleted from the PATROL configuration. It is required to properly end the execution of the command. Abort any previous execution of this command upon a PATROL Agent restart: Select this option if you wish the system to automatically stop the execution of the previous launched never-ending Command upon the next PATROL Agent restart. Click Next. Step 3: Monitoring Studio settings
Never-ending Command Execution — Settings Object display name: Label displayed in the PATROL Console Object internal identifier (ID): PATROL internal identifier What thresholds do you want to set for the newly created instance? A drop-down list allows you to select the mode of setting alert thresholds:
Command line analysis objects are instances of the SW_OSCOMMANDS class. See Also
|