Collage
Instances of this class use a CollageDB connection object to communicate with Collage and return information. It is mostly used as a base class for the inherited classes described below; however, instances can be used on their own to perform basic collage queries.
Constructor
function __construct($passedDB)
Will create a Collage object to properly query against.
Parameters
$passedDB (CollageDB) |
A Collage Connection object which points to an active Collage data source. |
Methods
function getMonitorStatus($status_id = NULL)
This method will return either a single Monitor Status record (defined by $status_id), or an array containing all monitor status entries. Will return NULL if error or no entries are found.
Parameters $status_id (numerical) |
If provided, will return the monitor status information that matches that status_id only. If not provided, will return all Monitor status entries. |
function getPriority($priority_id = NULL)
This method will return either a single Priority record (defined by $priority_id), or an array containing all Priority entries. Will return NULL if error or no entries are found.
Parameters
$priority_id (numerical) |
If provided, will return the Priority information that matches that priority_id only. If not provided, will return all Priority information entries. |
function getTypeRule($type_id = NULL)
This method will return either a single Type Rule record (defined by $type_id), or an array containing all Type Rule entries. Will return NULL if error or no entries are found.
Parameters
$type_id (numerical) |
If provided, will return the Type Rule information that matches that type_id only. If not provided, will return all Type Rule information entries. |
function getComponent($component_id = NULL)
This method will return either a single Component record (defined by $component_id), or an array containing all Component entries. Will return NULL if error or no entries are found.
Parameters
$component_id (numerical) |
If provided, will return the Component information that matches that component_id only. If not provided, will return all Component information entries. |
function getSeverity($severity_id = NULL)
This method will return either a single Severity record (defined by $severity_id), or an array containing all Severity entries. Will return NULL if error or no entries are found.
Parameters
$severity_id (numerical) |
If provided, will return the Severity information that matches that severity_id only. If not provided, will return all Severity information entries. |
function getOperationStatus($operation_status_id = NULL)
This method will return either a single Operation Status record (defined by $operation_status_id), or an array containing all Operation Status entries. Will return NULL if error or no entries are found.
Parameters
$operation_status_id (numerical) |
If provided, will return the Operation Status information that matches that operation_status_id only. If not provided, will return all Operation Status information entries. |
function getMessageFilter($filter_id = NULL)
This method will return either a single Message Filter record (defined by $filter_id), or an array containing all Message Filter entries. Will return NULL if error or no entries are found.
Parameters
$filter_id (numerical) |
If provided, will return the Message Filter information that matches that filter_id only. If not provided, will return all Message Filter information entries. |
function getConsolidationCriteria($criteria_id = NULL)
This method will return either a single Consolidation Criteria record (defined by $criteria_id), or an array containing all Consolidation Criteria entries. Will return NULL if error or no entries are found.
Parameters
$criteria_id (numerical) |
If provided, will return the Consolidation Criteria information that matches that criteria_id only. If not provided, will return all Consolidation Criteria information entries. |
function getLogPerformanceData($data_id = NULL)
This method will return either a single Log Performance Data record (defined by $data_id), or an array containing all Log Performance entries. Will return NULL if error or no entries are found.
Parameters
$data_id (numerical) |
If provided, will return the Log Performance Data information that matches that data_id only. If not provided, will return all Log Performance Data information entries. **It is NOT recommended to pull all records, as this may take a lot of time to process** |
function getCheckType($check_type_id = NULL)
This method will return either a single Check Type record (defined by $check_type_id), or an array containing all Check Type entries. Will return NULL if error or no entries are found.
Parameters
$check_type_id (numerical) |
If provided, will return the Check Type information that matches that check_type_id only. If not provided, will return all Check Type information entries. |
function getLogMessage($message_id = NULL)
This method will return either a single Log Message (defined by $criteria_id), or an array containing all Log Messages. Will return NULL if error or no messages are found.
Parameters
$message_id (numerical) |
If provided, will return the Log Message that matches that message_id only. If not provided, will return all Log Messages. **It is NOT recommended to pull all records, as this may take a lot of time to process** |
function getStateType($type_id = NULL)
This method will return either a single State Type record (defined by $type_id), or an array containing all State Type entries. Will return NULL if error or no entries are found.
Parameters
$type_id (numerical) |
If provided, will return the State Type that matches that type_id only. If not provided, will return all State Type entries. |
function getServiceAvailability($availability_id = NULL)
This method will return either a single Service Availability record (defined by $availability_id), or an array containing all Service Availability entries. Will return NULL if error or no entries are found.
Parameters
$availability_id (numerical) |
If provided, will return the Service Availability record that matches that availability_id only. If not provided, will return all Service Availability entries. |
function getHostAvailability($availability_id = NULL)
This method will return either a single Host Availability record (defined by $availability_id), or an array containing all Host Availability entries. Will return NULL if error or no entries are found.
Parameters
$availability_id (numerical) |
If provided, will return the Host Availability record that matches that availability_id only. If not provided, will return all Host Availability entries. |
function getMonitorServer($server_id = NULL)
This method will return either a single Monitor Server record (defined by $server_id), or an array containing all Monitor Server entries. Will return NULL if error or no entries are found.
Parameters
$server_id (numerical) |
If provided, will return the Monitor Server record that matches that server_id only. If not provided, will return all Monitor Server entries. |
function getMonitorList($server_id = NULL)
Normally used to get a list of devices that are assigned to a Monitor Server (defined by $server_id). If not provided, will return the entire list of assignments.
Parameters
$server_id (numerical) |
If provided, will return all entries that matches that server_id only. If not provided, will return all Monitor List entries. |
function getMonitorListByDevice($device_id = NULL)
Used to determine which Monitor Server monitors a specific Device (defined by $device_id). If not provided, will return the entire list of assignments.
Parameters
$device_id (numerical) |
If provided, will return the Monitor List entry that matches that device_id. If not provided, will return all Monitor List entries. |
function getDevice($device_id = NULL)
Will return the Device information for the specific Device (defined by $device_id), or a list of all devices and their properties. Parameters
$device_id (numerical) |
If provided, will return the Device entry that matches that device_id. If not provided, will return all Device entries. |
function getDeviceParents($device_id = NULL)
Will return a list of records which Device (defined by $device_id) is a child of.
Parameters
$device_id (numerical) |
If provided, will return the Device Parent entries that matches that device_id. If not provided, will return all Device Parent entries. |
function getDeviceChildren($device_id = NULL)
Will return a list of records which Device (defined by $device_id) is a parent of another Device. Parameters
$device_id (numerical) |
If provided, will return the Device Parent entries that matches that device_id. If not provided, will return all Device Parent entries. |
function getSchemaInfo()
Returns the data listed in SchemaInfo. (Used to determine what version of Collage you are running, and when it was created in the server). Parameters
function isError()
Returns true if the previous operation failed.
Parameters
function get_error_num()
Returns the error num which matches the definitions of error codes provided at the end of this document.
Parameters
|