Associating the Corrective Script with the Test
To achieve this, do the following:
- Open the test configuration page of the test for which auto-correction is to be enabled.
- Switch auto-correction on by selecting the true option against correct.
- Select an alarmtype, and if the test takes user parameters, specify the userparams in the same format as discussed for Processes test.
Next, upload the correctivescript to the eG agent, so that the agent executes the script whenever the state of the test or measure changes to generate an alarm of the chosen alarmtype. To perform the upload, click on the Choose button alongside the correctivescript text box in Figure 1. This will invoke a popup window as depicted by Figure 1.
- As you can see, Figure 1 displays the name of the current test. Using this window, you can associate the script with the test as a whole, or with a particular measure reported by the test. If the script resolves issues pertaining to all the measures mapped to the test, then from the Choose corrective script for list, select the test name. Then, in the File to upload text box, specify the full path to the script file. You can use the Browse button in Figure 1 to browse for the file to be uploaded. Finally, click on the Upload button in the popup window to upload the file. This uploading process can be dispensed with if the script has already been uploaded.
Clicking the Upload button leads you to the test configuration page. In the correctivescript text box of the page, you will find that the name of the script file has changed to reflect the corresponding InternalTestName - i.e., the name that eG Enterprise maintains internally for the test selected from the Choose corrective script for list in Figure 1 (see Figure 2).
- Click the Update button to register the changes to the test configuration.
Now, if separate scripts exist for each of the measures of the test, then each of these script files should be uploaded one after another. To ensure this, first click on the Choose button in the test configuration page to open the pop-up window. Then, from the Choose corrective script for list box in the pop-up window of Figure 3, select a Test:Measure pair to which you want to associate a corrective script.
- Then, specify the full path to the corrective script that automatically corrects issues with that measure in the File to upload text box, and click the Upload button.
Once you return to the test configuration page, you will find that the script name in the correctivescript text box has changed to reflect the InternalTestName_InternalMeasureName - i.e., the name that eG Enterprise maintains internally for the Test:Measure pair selected from the Choose corrective script for list in Figure 4.
- Finally, click the update button in Figure 4.
Once the eG agent executing the test detects a state change in the test or any of its descriptors, it will first look for a script with the InternalTestName. Upon locating such a script, it will execute it to bring the state of the test back to Normal. If such a script is not available, then it will look for a script with the InternalTestName_InternalMeasureName and executes it.
- Corrective scripts written for external tests will be executed by the corresponding external agent only.
- The 'Auto Correction' capability is not available for tests run by a remote agent.