Product Documentation

GetMachineFailureTrendsByType

Jul 24, 2013

Gets a list of machine failure and success counts by type, together with a trend for each type, for the specified time period. Each data point in the trend represents the total number of machines in a failure state in the last interval (intervalLength parameter). You can specify a particular failure type to limit the query or get all failure types.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the machine failure trend. Must be UTC. Not required if not fetching trends.
endDate DateTime End of the time window to be queried for the machine failure trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
machineFailureType int (MachineFailureType) If provided (>0), returns only that machine failure type in the results. Otherwise (null or zero) returns a list of all failure types. This integer corresponds to MachineFailureType enum.
sessionSupport int (SessionSupport) Nullable int. If not provided, then returns all sessionSupport types. Single=1, Multiple=2, Unknown=0

Returns

An IQueryable of MachineFailureTrend objects that contain the following for each MachineFailureType.

If all types are requested, the sum is also returned with MachineFailureType = -1

If $expand=FailureTrend is included in the query, the trend and TotalFailureCount properties are retrieved for each failure type.

If $expand=DesktopGroupBreakdown is included in the query, that property is also retrieved for each failure type.

Property Name Type Comments
MachineFailureType int [MachineFailureType] Type of connection failure (see: Determine enum values).
TotalFailureCount int Total number of failures at the endDate specified.
FailureTrend List<TrendItem> TrendItem contains a UTC Date (DateTime), a Count (double) to indicate the trend of machine failures over the time period specified for this type of failure.
DesktopGroupBreakdown List<DesktopGroupBreakdown> DesktopGroupBreakdown contains a DesktopGroup object and Count (int) to represent the total number of machines in a failure state at the endDate specified.

Examples

Retrieve both Delivery Group breakdown and the failure trend for all machine failure types for Nov-14 at 5am (UTC) to Nov 14 at 7am (UTC), with a data point every 30 minutes for all Server OS Machines (i.e. sessionSupport =2):

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrendsByType?startDate=datetime'2011-11-14T05:00:00'&endDate=datetime'2011-11-14T07:00:00'&intervalLength=30&machineFailureType=0&sessionSupport=2&$expand=FailureTrend,DesktopGroupBreakdown

Retrieve Delivery Group breakdown only for machine failure type 3 (Stuck on Boot) for Nov-14 at 5am (UTC) to Nov 14 at 7am (UTC) for Desktop OS Machines:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrendsByType?startDate=datetime'2011-11-14T05:00:00'&endDate=datetime'2011-11-14T07:00:00'&machineFailureType=3&sessionSupport=1&$expand=FailureTrend

Retrieve the failure trend for all failure types for all machine session types from Nov-14 at 12am (UTC) to Nov 14 at 11pm (UTC), with a data point every hour:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrendsByType?startDate=datetime'2011-11-14T00:00:00'&endDate=datetime'2011-11-14T23:00:00'&intervalLength=60&machineFailureType=0&$expand=FailureTrend