Parameters in the sgagent.conf test section
You can use the parameters described in the following table to configure internal and external tests for Monitoring Agents.
Parameters in the sgagent.conf test section
The second part of the sgagent.conf file specifies which tests the Monitoring Agents carry out on the servers they monitor. A test begins with the test definition, followed by optional parameter lines, and ends with the command definition. The test and command parameters are always required. The interval, action, host, script, and recovery parameters are optional and have their default values if not specified for the test.
Parameter | Description |
---|---|
test name | Begins the test definition. Specifies the name of the test.
The name appears in the logs and alerts in the event of a failure. It should be descriptive to give the administrators enough information about what has happened. The test name can be any string. You must use quotation marks if the name contains spaces. This parameter is required and has no default value. |
interval time | Defines how often the test is executed.
Time is entered in the format [(hh:)mm:]ss. The minimum interval is 3 seconds and the maximum is 1 day. If no interval is defined, the default is 60 seconds. |
action alert|exclude | Defines what to do if the test fails.
|
host server | Defines the server to be tested. If the name of the server is specified in the host field of sgagent.local.conf, that name must be used here. Otherwise, the default
host name of the server must be used.
You can also list multiple server names, separated by spaces. If no specific server is defined, the test is performed on all Server Pool members by default. |
script [always|repeat] path | Specifies how many times the script is executed after the test fails, and the path to the script file. You must use quotation marks if the path contains spaces.
There are two options for how many times to execute the script after the test fails:
If no argument is given, the script is run only after the first failure by default. |
recovery always|time | Determines how long the tester reruns a failed test to see if it succeeds on the next attempt.
There are two options for specifying the time period:
If no recovery options are specified, the test is never rerun after a failure, and the server state remains Excluded. |
command external| test_expression [ retry ] [ timeout ] [ path ] [ parameters ] | Specifies which test script to use, and the options for running the test. This parameter is required and has no default value.
There are two options for specifying the test script:
The other options are used as follows:
|