Carapace Monitor

Overview

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

Implementation

script monitor.cpl
interface Monitor

The Monitor interface contains the following methods

Monitor 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


now

Return the current time in configured format.

Arguments: none

Return type: String


created

Return the time this monitor was created.

Arguments: none

Return type: String


set

Set the agent-specific attribute.

Arguments:

agentClassString
agentNameString
attributeString
valueObject

Return type: the empty List ()


get

Get the agent-specific attribute.

Arguments:

agentClassString
agentNameString
attributeString

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:

agentClassString
agentNameString
attributeString

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:

agentClassString
agentNameString
attributeString

Return type: Integer


recordError

Record the error information.

Arguments:

agentClassString
agentNameString
activityString
errorError

Return type: the empty List ()


clearErrors

Clear all errors recorded before a given time.

Arguments:

thresholdInteger

Return type: the empty List ()


recordNotice

Record the top-level information.

Arguments:

agentClassString
agentNameString
activityString
noticeString

Return type: the empty List ()


clearNotices

Clear all top-level notices recorded before a given time.

Arguments:

thresholdInteger

Return type: the empty List ()


addClass

Allow information about a given class of agents to be recorded within the Monitor.

Arguments:

agentClassString

Return type: the empty List ()


addAgent

Allow information about a particular agent to be recorded within the Monitor.

Arguments:

agentClassString
agentNameString

Return type: the empty List ()


removeClass

Remove information about a given class of agents from the Monitor.

Arguments:

agentClassString

Return type: the empty List ()


removeAgent

Remove information about a particular agent from the Monitor.

Arguments:

agentClassString
agentNameString

Return type: the empty List ()


classes

List all the classes of agent which are recorded within the Monitor.

Arguments: none

Return type: List


agents

List all the classes of agent which are recorded within the Monitor.

Arguments:

agentClassString

Return type: List


classDetails

Return the entire set of details held for all agents within the supplied class.

Arguments:

agentClassString

Return type: List


agentDetails

Return the entire set of details held for a particular agent.

Arguments:

agentClassString
agentNameString

Return type: List


errors

Return the set of recorded error information.

Arguments: none

Return type: List


notices

Return the set of top-level details.

Arguments: none

Return type: List


Contents Index Current topic: Carapace Hub Related topics: audit