Previous Topic: Active Directory TestsNext Topic: DHCP Tests


Custom Tests

The Custom test provides the ability to use scripts or programs to perform custom tests.

Options and Arguments

Custom tests require the following specific option or argument:

You specify this option or argument when you create or modify tests.

Example

Use this example to create a test that monitors a custom service through a script or program. The entry instructs the agent to test a custom service once every 30 seconds, and to wait up to 20 seconds for a successful response. The agent calculates statistics over the last 3600 seconds (1 hour).

To create a new test in a policy

  1. Click + (New) on the Test Monitors toolbar.

    The New test pane appears.

  2. From the Test Type list, select Custom.
  3. In the Test Name field, specify Custom_test.
  4. In the Description field, specify Test custom service.
  5. In the Script path field, specify c:\@work\projects\shortcuts\custom_test.exe.
  6. In the Test Interval field, specify 30.
  7. In the Test Timeout field, specify 20.
  8. In the Samples Per Interval field, specify 1.
  9. In the Statistics Window field, specify 3600.
  10. Click Save Test.

When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:

{ 
index=123  
type=CUSTOM  
desc="Test custom service"  
dest="c:\@work\projects\shortcuts\custom_test.exe"  
interval=30  
samples=1  
timeout=20  
window=3600  
tos=0  
limit=0  
status=active  
name="Custom_test"
class="Custom_class"
context="Custom_context"
flags="0x0"
loglevel=3
}