Use this page to define a custom test for a service. You can specify a script or executable that will test the service. The script will be run using the supplied user credentials.
|
Parameter |
Description |
|---|---|
|
Command Line |
This indicates the command line for the script. |
|
Username / Password |
These are the operating system credentials under which the script will be run. |
|
Number of Retries |
This is the number of times that a script will be run (if it returns non-zero) until the status is determined to be down. |
|
Retry Interval |
This is the interval between consecutive retries. |
|
Timeout |
This is the amount of time that the agent will wait for the test to complete. If the timeout expires, then the status of the test will be considered down. |
| Metric | Description |
| Status | Indicates the status of the service test. The test is successful of the return code of the script is 0. |
| Total Time | Indicates the total time required to run the script. |
| Custom Metric 1 - 10 | These correspond to each line generated by the script. |
A numeric value should be generated for each line output to STDOUT by the custom script.
The script also generates a return code. A non-zero return code indicates that the test has failed.
The custom script must be installed on each beacon's host. File permissions must be set so that the agent can run the script.
A metric error will occur if the script generates non-numeric output.
Example
A sample perl script is given below. Create a perl script called "/usr/bin/perltest.pl":
#
# A perl script that always returns the same metric values.
#
print "100\n";
print "200\n";
print "300\n";
print "400\n";
pritn "500\n";
exit 0;
Enter "perl /usr/bin/perltest.pl" on the Command Line. Make sure that you have set the required permissions on "/usr/bin/perltest.pl" so that the Agent can run the script. When the Agent executes the metric, a zero-value exit code is returned. This indicates that the status is up. The Total Time reflects the time taken to run the perl command. Custom Metrics 1 through 5 will contain the values 100, 200, 300, 400 and 500 respectively.
Related Topics
Enterprise Manager Information Roadmap
Copyright © 1996, 2007, Oracle. All rights reserved.