Class EventDAL

Description

The EventDAL is used to get events, or messages that have been stored in the Foundation Database.

The EventDAL is used to get events, or messages that have been stored in the Foundation Database. Events are returned in the following format:

Array (
       [Count] => 583
       [Messages] => Array (
               [0] => Array (
                       [LogMessageID] => 584
                       [ApplicationName] => NAGIOS
                       [TextMessage] => CRITICAL - 172.28.113.54: Host unreachable @ 172.28.113.227. rta nan, lost 100%
                       [MessageCount] => 1
                       [FirstInsertDate] => 1175081596
                       [LastInsertDate] => 1175081594
                       [ReportDate] => 1175081596
                       [Device] => stdClass Object
                       (
                               [DeviceID] => 17
                               [Name] => 172.28.113.54
                               [Identification] => 172.28.113.54
                       )
                       [MonitorStatus] => stdClass Object
                       (
                               [MonitorStatusID] => 2
                               [Name] => DOWN
                               [Description] => Status DOWN
                       )
                       [Severity] => stdClass Object
                       (
                               [SeverityID] => 8
                               [Name] => CRITICAL
                               [Description] => GroundWork Severity CRITICAL. Also MIB standard
                       )
                       [Host] => stdClass Object
                       (
                               [HostID] => 16
                               [ApplicationTypeID] => 100
                               [Device] => stdClass Object
                               (
                                       [DeviceID] => 17
                                       [Name] => 172.28.113.54
                                       [Identification] => 172.28.113.54
                               )
                               [Name] => 172.28.113.54
                               [MonitorStatus] => stdClass Object
                               (
                                       [MonitorStatusID] => 2
                                       [Name] => DOWN
                                       [Description] => Status DOWN
                               )
                               [LastCheckTime] => 2007-03-28T11:56:29.000Z
                               [PropertyTypeBinding] => stdClass Object
                               (
                                       [StringProperty] => stdClass Object
                                       (
                                               [name] => LastPluginOutput
                                               [value] => CRITICAL - 172.28.113.54: Host unreachable @ 172.28.113.227. rta nan, lost 100%
                                       )
                                       [IntegerProperty] => Array
                                               [0] => stdClass Object
                                               (
                                                       [name] => CurrentNotificationNumber
                                                       [value] => 0
                                               )
                                               [1] => stdClass Object
                                               (
                                                       [name] => ScheduledDowntimeDepth
                                                       [value] => 0
                                               )
                                       )
                                       [LongProperty] => Array
                                       (
                                               [0] => stdClass Object
                                               (
                                                       [name] => TimeDown
                                                       [value] => 1175081594
                                               )
                                               [1] => stdClass Object
                                               (
                                                       [name] => TimeUnreachable
                                                       [value] => 0
                                               )
                                               [2] => stdClass Object
                                               (
                                                       [name] => TimeUp
                                                       [value] => 1175081195
                                               )
                                       )
                                       [DoubleProperty] => Array
                                       (
                                               [0] => stdClass Object
                                               (
                                                       [name] => ExecutionTime
                                                       [value] => 0
                                               )

                                               [1] => stdClass Object
                                               (
                                                       [name] => Latency
                                                       [value] => 0
                                               )
                                               [2] => stdClass Object
                                               (
                                                       [name] => PercentStateChange
                                                       [value] => 10.79
                                               )
                                       )
                                       [BooleanProperty] => Array
                                       (
                                               [0] => stdClass Object
                                               (
                                                       [name] => isAcknowledged
                                                       [value] =>
                                               )
                                               [1] => stdClass Object
                                               (
                                                       [name] => isChecksEnabled
                                                       [value] => 1
                                               )
                                               [2] => stdClass Object
                                               (
                                                       [name] => isEventHandlersEnabled
                                                       [value] => 1
                                               )
                                               [3] => stdClass Object
                                               (
                                                       [name] => isFailurePredictionEnabled
                                                       [value] => 1
                                               )
                                               [4] => stdClass Object
                                               (
                                                       [name] => isFlapDetectionEnabled
                                                       [value] => 1
                                               )
                                               [5] => stdClass Object
                                               (
                                                       [name] => isHostFlapping
                                                       [value] =>
                                               )
                                               [6] => stdClass Object
                                               (
                                                       [name] => isNotificationsEnabled
                                                       [value] => 1
                                               )
                                               [7] => stdClass Object
                                               (
                                                       [name] => isPassiveChecksEnabled
                                                       [value] => 1
                                               )
                                               [8] => stdClass Object
                                               (
                                                       [name] => isProcessPerformanceData
                                                       [value] => 1
                                               )
                                       )
                                       [DateProperty] => stdClass Object
                                       (
                                               [name] => LastStateChange
                                               [value] => 2007-03-28T11:33:14.000Z
                                       )
                               )
                       )
                       [Properties] => Array
                       (
                               [ErrorType] => HOST ALERT
                               [SubComponent] => 172.28.113.54
                       )
               )
       )
   )

Located in /EventDAL.inc.php (line 221)


	
			
Method Summary
EventDAL __construct (string $foundationURL)
A getAllOpenEvents ([integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
A getOpenEventsByHostGroupId (integer $hostGroupId, [integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
A getOpenEventsByHostId (integer $hostId, [integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
A getOpenEventsByServiceDescription (string $serviceDescription, integer $hostId, [integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
Methods
Constructor __construct (line 231)

create an instance of the EventDAL

create an instance of the EventDAL

  • access: public
EventDAL __construct (string $foundationURL)
  • string $foundationURL: - path to foundation MUST be provided
getAllOpenEvents (line 249)

gets all "Open" events or events that have not been "Accepted" and therefore cleared from the console screen.

gets all "Open" events or events that have not been "Accepted" and therefore cleared from the console screen.

  • return: list of open events
  • access: public
  • see: MetaDataDAL to get application types defined in the Foundation DB.
A getAllOpenEvents ([integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
  • integer $appTypeId: if provided, allows filtering by application type.
  • list $sortItems: a comma separated list of fields to sort on, if provided.
  • integer $firstResult: the row to begin retrieving events from
  • integer $lastResult: the total number of events to retrieve
getOpenEventsByHostGroupId (line 274)

Get all open events for the hostgroup specified by hostgroup id

Get all open events for the hostgroup specified by hostgroup id

  • return: list of open events for the HostGroup ID
  • access: public
A getOpenEventsByHostGroupId (integer $hostGroupId, [integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
  • integer $hostGroupId: The Id of the hostgroup to retrieve events for
  • integer $appTypeId: if provided, allows filtering by application type
  • list $sortItems: a comma separated list of fields to sort on, if provided.
  • integer $firstResult: the row to begin retrieving events from
  • integer $lastResult: the total number of events to retrieve
getOpenEventsByHostId (line 299)

Get all open events for the host specified by hostId

Get all open events for the host specified by hostId

  • return: list of Open events for the host specified
  • access: public
A getOpenEventsByHostId (integer $hostId, [integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
  • integer $hostId: The Id of the host that this service is associated with
  • integer $appTypeId: if provided, allows filtering by application type
  • list $sortItems: a comma separated list of fields to sort on, if provided.
  • integer $firstResult: the row to begin retrieving events from
  • integer $lastResult: the total number of events to retrieve
getOpenEventsByServiceDescription (line 325)

Get all open events for the service specified by the service Description and hostId

Get all open events for the service specified by the service Description and hostId

  • return: list of Open events
  • access: public
A getOpenEventsByServiceDescription (string $serviceDescription, integer $hostId, [integer $appTypeId = null], [list $sortItems = null], [integer $firstResult = -1], [integer $lastResult = -1])
  • string $serviceDescription: Description of the service
  • integer $hostId: The Id of the host that this service is associated with
  • integer $appTypeId: if provided, allows filtering by application type
  • list $sortItems: a comma separated list of fields to sort on, if provided.
  • integer $firstResult: the row to begin retrieving events from
  • integer $lastResult: the total number of events to retrieve

Documentation generated on Fri, 04 May 2007 16:49:44 -0700 by phpDocumentor 1.3.0RC3