com.groundwork.collage
Interface CollageStateQuery


public interface CollageStateQuery

Provides access and information on the overall state of the system.

Author:
rdandridge

Method Summary
 java.lang.Float getHostAverageAvailability(java.lang.String hostName)
          Returns the average amount of time a Host has been UP.
 java.lang.Float getHostGroupAverageAvailability(java.lang.String hostGroupName)
          Returns the overall average availability of a HostGroup.
 CollageTrend getHostGroupServiceAvailabilityTrend(java.lang.String hostGroupName)
          Returns a CollageTrend representing the trend of HostGroupServiceAvailability.
 java.lang.Float getServiceAverageAvailability(java.lang.String serviceName)
          Returns the average amount of time a Service has been UP.
 

Method Detail

getServiceAverageAvailability

public java.lang.Float getServiceAverageAvailability(java.lang.String serviceName)
                                              throws CollageException
Returns the average amount of time a Service has been UP.

Parameters:
serviceName - Name of the Service.
Returns:
The amount of time a service has been up as a percentage.
Throws:
CollageException

getHostAverageAvailability

public java.lang.Float getHostAverageAvailability(java.lang.String hostName)
                                           throws CollageException
Returns the average amount of time a Host has been UP.

Parameters:
hostName - Name of the Host.
Returns:
The amount of time a Host has been UP as a percentage.
Throws:
CollageException

getHostGroupAverageAvailability

public java.lang.Float getHostGroupAverageAvailability(java.lang.String hostGroupName)
                                                throws CollageException
Returns the overall average availability of a HostGroup. This number is calculated by averaging the 30 day moving average value for each Service (30DayMovingAvg field of the ServiceStatus table) that belongs to the specified HostGroup.

Parameters:
hostGroupName - Name of the HostGroup.
Returns:
the average amount of time that the HostGroup has been UP as a percentage.
Throws:
CollageException - if no Services exist for the HostGroup

getHostGroupServiceAvailabilityTrend

public CollageTrend getHostGroupServiceAvailabilityTrend(java.lang.String hostGroupName)
                                                  throws CollageException
Returns a CollageTrend representing the trend of HostGroupServiceAvailability. The trend is based on datapoints in the PercentTimeDownUnscheduled field of the HostGroupHostAvailability table. This field is updated every hour by a background task calling into Nagios. There must be a minimum of 3 datapoints (or 3 hours) of data in order for the trend to be calculated.

Parameters:
hostGroupName - name of the HostGroup
Returns:
a CollageTrend where -1 = DOWN, 0 = FLAT, and 1 = UP
Throws:
CollageException - if there's not enough data to determine the trend or if an error occurs while calculating the trend.


Copyright © 2005 IT Groundwork. All Rights Reserved.