The agent developer can use this primitive to query if the LevelOne (Basic) monitoring or the LevelTwo (Detail) monitoring or both need to be scheduled.
Output parameters:
level_one: This parameter will be updated to 1 or 0 if basic monitoring needs to be scheduled or not. A value of 0 means that basic monitoring should not be scheduled while a value of 1 means that basic monitoring should be scheduled.
See IMF.
level_two: This parameter will be updated to 0, 1, or 2 based on the present state of the resource, and if detail monitoring needs to be scheduled. A value of 0 means that detail monitoring should not be scheduled, a value of 1 means that detail monitoring should be scheduled, and a value of 2 means that detail monitoring should be scheduled if basic monitoring (level_ one) reports state as online
Following example describes setting of output parameters,
If you set LevelTwoMonitorFrequency to 5 and the resource state is ONLINE, then every fifth monitor cycle, level_two will have the value as 1. If the resource state is OFFLINE, then every monitor cycle level_two will have the value as 2.
See LevelTwoMonitorFreq.
If you set MonitorFreq to 5 and the resource is registered with IMF, then every fifth monitor cycle level_one parameter will have the value of 1.
See IMF.
This API is typically used as Perl/Shell based script.
Perl based:
This API return the value of level_one and level__two and status as return value.
Usage:($ret, $level_one, $level_two) = VCSAG_GET_MONITOR_LEVEL();
$ret : Checks whether the API passed or failed.
$level_one : Holds the value of level one monitor flag if API is passed.
$level_two : Holds the value of level two monitor flag if API is passed.
Shell based:
This API return the value of level_one and level__two as environment variable VCSAG_MONITOR_LEVEL_ONE and VCSAG_MONITOR_LEVEL_TWO, and status as return value.
Usage:VCSAG_GET_MONITOR_LEVEL