The Monitor holds a snapshot of the state of the CHub -- the Carapace Hub. Within the CHub all the work is done via agents. These agents are grouped into classes -- each agent within a class performs the same task. The structure of the data held by the Monitor reflects this as follows:
Some examples of these different details are as follows:
| top-level | CHub startup time, database name used by the CHub state of the dialup Internet connection |
| class-specific | max. no. of agents allowed in the class, max. no. of agents created so far, current number of agents |
| agent-specific | no. of calls processed time of most recent call handled |
| script | monitor.cpl |
|---|---|
| interface | Monitor |
The Monitor interface contains the following
methods
| method name | description |
|---|---|
now |
return the current time in configured format |
created |
return the time this monitor was created |
set |
set the agent-specific attribute |
get |
get the agent-specific attribute |
increment |
increment the agent-specific attribute |
decrement |
decrement the agent-specific attribute |
recordError |
record the error information |
clearErrors |
clear all errors recorded before a given time |
recordNotice |
record the top-level information |
clearNotices |
clear all notices recorded before a given time |
addClass |
allow information about a given class of agents to be recorded within the Monitor |
addAgent |
allow information about a particular agent to be recorded within the Monitor |
removeClass |
remove information about a given class of agents from the Monitor |
removeAgent |
remove information about a particular agent from the Monitor |
classes |
list all the classes of agent which are recorded within the Monitor |
agents |
list all the agents within a given class |
classDetails |
return the entire set of details held for all agents within the supplied class |
agentDetails |
return the entire set of details held for a particular agent |
errors |
return the set of recorded error information |
notices |
return the set of top-level details |
nowReturn the current time in configured format.
Arguments: none
Return type: String
createdReturn the time this monitor was created.
Arguments: none
Return type: String
setSet the agent-specific attribute.
Arguments:
| agentClass | String |
| agentName | String |
| attribute | String |
| value | Object |
Return type: the empty List ()
getGet the agent-specific attribute.
Arguments:
| agentClass | String |
| agentName | String |
| attribute | String |
Return type: Object
increment
Increment the agent-specific attribute. It the value does not yet exist, then the initial
value is created and set to 1. The new value is returned.
Arguments:
| agentClass | String |
| agentName | String |
| attribute | String |
Return type: Integer
decrement
Decrement the agent-specific attribute. It the value does not yet exist, then the initial
value is created and set to 0. The new value is returned.
Arguments:
| agentClass | String |
| agentName | String |
| attribute | String |
Return type: Integer
recordErrorRecord the error information.
Arguments:
| agentClass | String |
| agentName | String |
| activity | String |
| error | Error |
Return type: the empty List ()
clearErrorsClear all errors recorded before a given time.
Arguments:
| threshold | Integer |
Return type: the empty List ()
recordNoticeRecord the top-level information.
Arguments:
| agentClass | String |
| agentName | String |
| activity | String |
| notice | String |
Return type: the empty List ()
clearNoticesClear all top-level notices recorded before a given time.
Arguments:
| threshold | Integer |
Return type: the empty List ()
addClassAllow information about a given class of agents to be recorded within the Monitor.
Arguments:
| agentClass | String |
Return type: the empty List ()
addAgentAllow information about a particular agent to be recorded within the Monitor.
Arguments:
| agentClass | String |
| agentName | String |
Return type: the empty List ()
removeClassRemove information about a given class of agents from the Monitor.
Arguments:
| agentClass | String |
Return type: the empty List ()
removeAgentRemove information about a particular agent from the Monitor.
Arguments:
| agentClass | String |
| agentName | String |
Return type: the empty List ()
classesList all the classes of agent which are recorded within the Monitor.
Arguments: none
Return type: List
agentsList all the classes of agent which are recorded within the Monitor.
Arguments:
| agentClass | String |
Return type: List
classDetailsReturn the entire set of details held for all agents within the supplied class.
Arguments:
| agentClass | String |
Return type: List
agentDetailsReturn the entire set of details held for a particular agent.
Arguments:
| agentClass | String |
| agentName | String |
Return type: List
errorsReturn the set of recorded error information.
Arguments: none
Return type: List
noticesReturn the set of top-level details.
Arguments: none
Return type: List
| Contents | Index | Current topic: Carapace Hub | Related topics: audit |