Class StatisticsDAL

Description

Allows the user to retrieve various statistics on Hosts, Services and HostGroups. statistics can be retrieved such as counts of each of these entities in each state (UP, DOWN, CRITICAL, etc. retrieved.

Allows the user to retrieve various statistics on Hosts, Services and HostGroups. General statistics can be retrieved such as counts of each of these entities in each state (UP, DOWN, CRITICAL, etc.). Statistics specifically related to Nagios can also be retrieved.

Located in /StatisticsDAL.inc.php (line 23)


	
			
Method Summary
StatisticsDAL __construct (string $foundationURL)
statistic getHostStatisticsByHostGroupID (integer $hostGroupID)
statistic getHostStatisticsByHostGroupName (string $hostGroupName)
nagios getNagiosStatisticsByHostGroupID (integer $hostGroupID)
nagios getNagiosStatisticsByHostGroupName (string $hostGroupName)
statistics getNagiosStatisticsByHostName (string $hostName)
statistic getServiceStatisticsByHostGroupID (integer $hostGroupID)
statistic getServiceStatisticsByHostGroupName (string $hostGroupName)
statistic getServiceStatisticsByHostName (string $hostName)
Methods
Constructor __construct (line 32)

Create a StatisticDAL instance

Create a StatisticDAL instance

  • access: public
StatisticsDAL __construct (string $foundationURL)
  • string $foundationURL: - may not be null
getAllHostGroupStatistics (line 143)

returns statistics for all Hostgroups

returns statistics for all Hostgroups Data is returned in the following format

   Array
   (
       [TestPing] => Array
           (
               [TotalServices] => 0
               [TotalHosts] => 7
               [DOWN] => 0
               [UNREACHABLE] => 0
               [PENDING] => 7
               [UP] => 0
           )
       [Engineering] => Array
           (
               [TotalServices] => 98
               [TotalHosts] => 18
               [DOWN] => 7
               [UNREACHABLE] => 0
               [PENDING] => 0
               [UP] => 11
           )
       [TestUnix] => Array
           (
               [TotalServices] => 6
               [TotalHosts] => 15
               [DOWN] => 0
               [UNREACHABLE] => 0
               [PENDING] => 14
               [UP] => 1
           )
   )

  • return: data for hostgroups
  • access: public
statistic getAllHostGroupStatistics ()
getAllHostStatisticData (line 56)

returns statistics for all hosts - not broken down by hostgroup.

returns statistics for all hosts - not broken down by hostgroup. data returned is in the following format:

   Array
   (
       [Name] => _ALL_
       [TotalServices] => 550
       [TotalHosts] => 252
       [DOWN] => 124
       [UNREACHABLE] => 0
       [PENDING] => 21
       [UP] => 107
   )

  • return: data for hosts
  • access: public
statistic getAllHostStatisticData ()
getAllNagiosStatisticData (line 616)

gets statistics specific to nagios

gets statistics specific to nagios Data is returned in the following format:

   Array
   (
       [PassiveChecks] => Array
       (
               [HostsEnabled] => 252
               [HostsDisabled] => 0
               [ServicesEnabled] => 550
               [ServicesDisabled] => 0
        )
       [isChecksEnabled] => Array
       (
               [HostsEnabled] => 252
               [HostsDisabled] => 0
               [ServicesEnabled] => 550
               [ServicesDisabled] => 0
       )
       [ScheduledDowntimeDepth] => Array
       (
               [HostsEnabled] => 0
               [HostsDisabled] => 252
               [ServicesEnabled] => 0
               [ServicesDisabled] => 550
       )
       [Acknowledged] => Array
       (
               [HostsEnabled] => 0
               [HostsDisabled] => 145
               [ServicesEnabled] => 0
               [ServicesDisabled] => 452
       )
       [isNotificationsEnabled] => Array
       (
               [HostsEnabled] => 252
               [HostsDisabled] => 0
               [ServicesEnabled] => 550
               [ServicesDisabled] => 0
       )
       [isEventHandlersEnabled] => Array
       (
               [HostsEnabled] => 252
               [HostsDisabled] => 0
               [ServicesEnabled] => 550
               [ServicesDisabled] => 0
       )
   )

  • return: list of statistics
  • access: public
a getAllNagiosStatisticData ()
getAllServiceStatisticData (line 89)

returns statistics for all services - not broken down by host or hostgroup

returns statistics for all services - not broken down by host or hostgroup data is returned in the following format:

   Array
   (
       [Name] => _ALL_
       [TotalServices] => 550
       [TotalHosts] => 252
       [CRITICAL] => 175
       [WARNING] => 4
       [UNKNOWN] => 273
       [OK] => 98
       [PENDING] => 0
   )

  • return: data for services
  • access: public
statistic getAllServiceStatisticData ()
getHostGroupHostStatisticData (line 648)

gets counts for hosts broken down by hostgroup

gets counts for hosts broken down by hostgroup Data is returned in the following format:

   Array
   (
       [UP] => 9
       [DOWN] => 6
       [PENDING] => 3
       [UNREACHABLE] => 0
   )
This is interpreted as 9 Hostgroups have hosts that are UP, 6 Hostgroups have hosts that are DOWN, 3 Hostgroups have hosts that are PENDING, and 0 Hostgroups have hosts that are UNREACHABLE

  • return: for hosts by hostgroup
  • access: public
statistics getHostGroupHostStatisticData ()
getHostGroupServiceStatisticData (line 681)

gets counts for services broken down by hostgroup

gets counts for services broken down by hostgroup Data is returned in the following format:

Array
    (
       [OK] => 9
       [UNKNOWN] => 6
       [CRITICAL] => 6
       [WARNING] => 3
       [PENDING] => 0
   )
This is interpreted as 9 Hostgroups have services that are OK, 6 Hostgroups have services that are UNKNOWN, 6 Hostgroups have services that are CRITICAL, 3 Hostgroups have services that are WARNING, and 0 Hostgroups have hosts that are PENDING

  • return: for services by hostgroup
  • access: public
statistics getHostGroupServiceStatisticData ()
getHostStatisticsByHostGroupID (line 177)

gets host statistic data for a specific hostgroup

gets host statistic data for a specific hostgroup data is returned in the following format:

   Array
   (
       [Name] => google
       [TotalServices] => 151
       [TotalHosts] => 151
       [DOWN] => 110
       [UNREACHABLE] => 0
       [PENDING] => 0
       [UP] => 41
   )

  • return: data for hosts in the hostgroup
  • access: public
statistic getHostStatisticsByHostGroupID (integer $hostGroupID)
  • integer $hostGroupID
getHostStatisticsByHostGroupName (line 213)

gets statistic data for hosts in a specific hostgroup

gets statistic data for hosts in a specific hostgroup data is returned in the following format:

   Array
   (
       [Name] => google
       [TotalServices] => 151
       [TotalHosts] => 151
       [DOWN] => 110
       [UNREACHABLE] => 0
       [PENDING] => 0
       [UP] => 41
   )

  • return: data for hosts in hostgroup
  • access: public
statistic getHostStatisticsByHostGroupName (string $hostGroupName)
  • string $hostGroupName
getNagiosStatisticsByHostGroupID (line 400)

gets statistics specific to Nagios for a hostgroup

gets statistics specific to Nagios for a hostgroup data is returned in the following format:

   Array
   (
       [PassiveChecks] => Array
           (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
           )
       [isChecksEnabled] => Array
           (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
           )
       [ScheduledDowntimeDepth] => Array
           (
               [HostsEnabled] => 0
               [HostsDisabled] => 18
               [ServicesEnabled] => 0
               [ServicesDisabled] => 98
           )
       [Acknowledged] => Array
           (
               [HostsEnabled] => 0
               [HostsDisabled] => 7
               [ServicesEnabled] => 0
               [ServicesDisabled] => 90
           )
       [isNotificationsEnabled] => Array
           (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
           )
       [isEventHandlersEnabled] => Array
           (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
           )
   )

  • return: specific statistics for a hostgroup
  • access: public
nagios getNagiosStatisticsByHostGroupID (integer $hostGroupID)
  • integer $hostGroupID
getNagiosStatisticsByHostGroupName (line 477)

gets statistics specific to Nagios for a hostgroup

gets statistics specific to Nagios for a hostgroup data is returned in the following format:

   Array
   (
       [PassiveChecks] => Array
       (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
       )
       [isChecksEnabled] => Array
       (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
       )
       [ScheduledDowntimeDepth] => Array
       (
               [HostsEnabled] => 0
               [HostsDisabled] => 18
               [ServicesEnabled] => 0
               [ServicesDisabled] => 98
        )
      [Acknowledged] => Array
      (
               [HostsEnabled] => 0
               [HostsDisabled] => 7
               [ServicesEnabled] => 0
               [ServicesDisabled] => 90
      )
       [isNotificationsEnabled] => Array
       (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
       )
       [isEventHandlersEnabled] => Array
       (
               [HostsEnabled] => 18
               [HostsDisabled] => 0
               [ServicesEnabled] => 98
               [ServicesDisabled] => 0
       )
   )

  • return: statistics for a hostgroup
  • access: public
nagios getNagiosStatisticsByHostGroupName (string $hostGroupName)
  • string $hostGroupName
getNagiosStatisticsByHostName (line 541)

gets statistics specific to Nagios for a host

gets statistics specific to Nagios for a host Data is returned in the following format:

   Array
   (
       [PassiveChecks] => Array
       (
               [ServicesEnabled] => 6
               [ServicesDisabled] => 0
       )
       [isChecksEnabled] => Array
       (
               [ServicesEnabled] => 6
               [ServicesDisabled] => 0
       )
       [ScheduledDowntimeDepth] => Array
       (
               [ServicesEnabled] => 0
               [ServicesDisabled] => 6
       )
       [Acknowledged] => Array
       (
               [ServicesEnabled] => 0
               [ServicesDisabled] => 6
       )
       [isNotificationsEnabled] => Array
       (
               [ServicesEnabled] => 6
               [ServicesDisabled] => 0
       )
       [isEventHandlersEnabled] => Array
       (
               [ServicesEnabled] => 6
               [ServicesDisabled] => 0
       )
   )

  • return: for the specified host
  • access: public
statistics getNagiosStatisticsByHostName (string $hostName)
  • string $hostName
getServiceStatisticsByHostGroupID (line 250)

gets statistic data for services in a specific hostgroup

gets statistic data for services in a specific hostgroup data is returned in the following format:

   Array
   (
       [HostGroupName] => Engineering
       [TotalServices] => 98
       [TotalHosts] => 18
       [CRITICAL] => 40
       [WARNING] => 0
       [UNKNOWN] => 50
       [OK] => 8
       [PENDING] => 0
   )

  • return: data for services in a hostgroup
  • access: public
statistic getServiceStatisticsByHostGroupID (integer $hostGroupID)
  • integer $hostGroupID
getServiceStatisticsByHostGroupName (line 287)

gets statistic data for services in a specific hostgroup

gets statistic data for services in a specific hostgroup data is returned in the following format:

   Array
   (
       [HostGroupName] => Engineering
       [TotalServices] => 98
       [TotalHosts] => 18
       [CRITICAL] => 40
       [WARNING] => 0
       [UNKNOWN] => 50
       [OK] => 8
       [PENDING] => 0
   )

  • return: data for services in a hostgroup
  • access: public
statistic getServiceStatisticsByHostGroupName (string $hostGroupName)
  • string $hostGroupName
getServiceStatisticsByHostName (line 323)

gets service statistics for a host

gets service statistics for a host data is returned in the following format:

   Array
   (
       [Name] => 172.28.113.238
       [TotalServices] => 6
       [TotalHosts] => 1
       [CRITICAL] => 1
       [WARNING] => 0
       [UNKNOWN] => 5
       [OK] => 0
       [PENDING] => 0
   )

  • return: data for services associated with a host
  • access: public
statistic getServiceStatisticsByHostName (string $hostName)
  • string $hostName

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