Time forecast model API

The Time forecast model API provides a way to run a time forecast model. It is exposed by the Data Hub component, and therefore the web service is located on the TrueSight Capacity Optimization Data Hub server.

Before you begin

  • Ensure that you have valid user credentials in Base64-encoded format for the Authorization HTTP header. For more details, see Restful web services authentication.
  • Ensure that your user role has the Enable access to Time forecasting model API activity (API_TF_MODEL) assigned to it. The out-of-the-box role API-Client has access to all the APIs by default. For more information about managing roles and activities, see Adding and managing roles.

Method

URI Pattern

Description

POST

tfm/forecastmodel/execute

Executes the forecast model specified in the request and returns the ForecastResponse instance which contains the forecast results.

Time forecast request format

Forecast requests can be submitted to the TrueSight Capacity Optimization Data Hub TimeForecast Model service according to the following Document Type Definition (DTD):

<!DOCTYPE [
<!ELEMENT forecastRequest (threshold?|statistics?|whatIfEvent*)>
<!ATTLIST forecastRequest seriesIdList CDATA #REQUIRED>
<!ATTLIST forecastRequest timeUnit CDATA #REQUIRED>
<!ATTLIST forecastRequest backperiodFromdate CDATA #REQUIRED>
<!ATTLIST forecastRequest forecastRange CDATA #REQUIRED>
<!ATTLIST forecastRequest algorithmId CDATA #IMPLIED>
<!ELEMENT statistics>
<!ATTLIST statistics applyTo CDATA #REQUIRED>
<!ATTLIST statistics stat CDATA #REQUIRED>
<!ELEMENT threshold (fixThreshold*| seriesThreshold*)>
<!ATTLIST threshold thresholdType CDATA #REQUIRED>
<!ELEMENT fixThreshold>
<!ATTLIST fixThreshold applyTo CDATA #REQUIRED>
<!ATTLIST fixThreshold multFactor CDATA #REQUIRED>
<!ELEMENT seriesThreshold>
<!ATTLIST seriesThreshold applyTo CDATA #REQUIRED>
<!ATTLIST seriesThreshold thresholdSeries CDATA #REQUIRED>
<!ATTLIST seriesThreshold multFactor CDATA #REQUIRED>
<!ELEMENT whatIfEvent(whatIfProps*)>
<!ATTLIST whatIfEvent eventType #REQUIRED>
<!ATTLIST whatIfEvent eventTime #REQUIRED>
<!ATTLIST whatIfEvent eventSeriesIdList #REQUIRED>
<!ELEMENT whatIfProps>
<!ATTLIST whatIfProps key CDATA #REQUIRED>
<!ATTLIST whatIfProps value CDATA #REQUIRED>
]>

Time forecast request format parameters

The forecast request format is composed of the following parameter sets:

Basic parameters

Node name

Attribute name

Supported values

Description

forecastRequest

seriesIdList

(SOB|WOB)<id>

System or workload object to forecast

timeUnit

HOUR|DAY|MONTH

Data resolution

backperiodFromdate

(H|D|M)<value>

Data starting point

forecastRange

(H|D|M)<value>

Forecast range

algorithmId

[1 through 15]

1: By Time Shifts
2: Exponential – Multiplicative Trend
4: Linear
5: Robust Linear
6: Robust Linear – Last Ramp
7: Robust Linear – Smoothed Last Ramp
8: Quadratic
9: Cubic
10: Holt-Winters Exponential Smoothing
11: Yearly Time Shift
12: Robust Exponential Damping
13: Robust Exponential Damping – Last Ramp
14: Automated Box and Jenkins
15: Automated Box and Jenkins – Last Ramp
[DEFAULT: Automatic]

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.

<forecastRequest seriesIdList ='SOB1366282' timeUnit ='DAY' 
backperiodFromdate ='D60' forecastRange='D14'/>

Statistics parameters

Node name

Attribute name

Supported values

Description

statistics

applyTo

(SOB|WOB)<id>

System or workload object
to apply statistic to

stat

  • AVGVALUE
  • MINVALUE
  • MAXVALUE
  • SUMVALUE
  • SUMQUADVALUE
  • CUMSUMVALUE
  • WAVGVALUE

Statistic to apply

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: Maximum statistic will be used to compute forecast.

<forecastRequest seriesIdList='SOB1366282' 
timeUnit ='DAY' 
backperiodFromdate='D60' 
forecastRange='D14'>
<statistics applyTo='SOB1366282' 
stat='MAXVALUE'/>
</forecastRequest>

Threshold parameters

Node name

Attribute name

Supported values

Description

threshold

thresholdType

FIX|SERIES

Threshold type

fixThreshold

applyTo

(SOB|WOB)<id>

System or workload object to apply threshold

value

[0 through 100]

Percentage of system or workload object to use as threshold

seriesThreshold

applyTo

(SOB|WOB)<id>

System or workload object to apply threshold

thresholdSeries

(SOB|WOB)<id>

System or workload object to use as threshold

multFactor

[0 through 100]

Multiply factor to apply on thresholdSeries

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example 1

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: A fixed threshold set at 50% of series 1366282 will be applied to the forecast.

<forecastRequest seriesIdList='SOB1366282' 
timeUnit ='DAY' 
backperiodFromdate='D60' 
forecastRange='D14'>
<threshold thresholdType='FIX'>
<fixThreshold applyTo='SOB1366282' multFactor='50'/>
</threshold>
<statistics applyTo='SOB1366282' stat='MAXVALUE'/>
</forecastRequest>

Example 2
Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: Series 1366296 will be used as threshold limit for series 1366281.

<forecastRequest seriesIdList='SOB1366281' 
timeUnit ='DAY' 
backperiodFromdate='D60' 
forecastRange='D14'>
<threshold thresholdType='SERIES'>
<seriesThreshold applyTo='SOB1366281' 
multFactor='90' 
thresholdSeries='SOB1366296'/>
</threshold>
<statistics applyTo='SOB1366281' 
stat='MAXVALUE'/>
</forecastRequest>

What-if events parameters

Node name

Attribute name

Supported values

Description

whatIfEvent

eventType

  • 2: CPU SpeedUp
  • 10: Grid Multiplicity

Event type

eventTime

yyyy-mm-dd hh:mm:ss

Event time

eventSeriesIdList

(SOB|WOB)<id>

System or workload object to
apply what if event to

whatIfProps

key

See succeeding table

See succeeding table

value

See succeeding table

See succeeding table

What-if events parameters: Event types

What-if event type

Keys

Values

2: CPU SpeedUp

EVENTCURRENTCPU

CPU number in current configuration

EVENTCURRENTCPUMHZ

CPU frequency in current configuration

EVENTNEWCPUNUM

CPU number of target configuration

EVENTNEWCPUMHZ

CPU frequency of target configuration

7: Generic SpeedUp

EVENTSPEEDUP

SpeedUp percentage

10: Grid Multiplicity

EVENTCURRGRIDNUM

Server number of the current grid

EVENTWHATIFGRIDNUM

Server number of the target grid

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: A CPU SpeedUp whatIf event (from 4 to 8 cores) is also shown.

<forecastRequest seriesIdList='SOB1366282' 
timeUnit ='DAY' 
backperiodFromdate='D60' 
forecastRange='D14'>
<whatIfEvent eventType=2 
eventTime='2011-01-01 00:00:00' 
eventSeriesIdList ='SOB1366282'>
<whatIfProps key='EVENTCURRENTCPU' value=4/>
<whatIfProps key='EVENTNEWCPUNUM' value=8/>
<whatIfProps key='EVENTNEWCPUMHZ' value=1500/>
</whatIfEvent>
</forecastRequest>

Time forecast response format

Forecast responses can be submitted to the TrueSight Capacity Optimization Data Hub TimeForecast Model service according to the following Document Type Definition (DTD):

<!DOCTYPE [
<!ELEMENT forecastResponse (forecastRequest ,forecastedSeries)>
<!ELEMENT forecastRequest (threshold*| statistics*|whatIfEvent*)>
<!ATTLIST forecastRequest seriesIdList CDATA #REQUIRED>
<!ATTLIST forecastRequest timeUnit CDATA #REQUIRED>
<!ATTLIST forecastRequest backperiodFromdate  CDATA #REQUIRED>
<!ATTLIST forecastRequest forecastRange  CDATA #REQUIRED>
<!ATTLIST forecastRequest algorithmId CDATA #IMPLIED>
<!ELEMENT threshold (fixThreshold*| seriesThreshold*)>
<!ATTLIST threshold thresholdType CDATA #REQUIRED>
<!ELEMENT fixThreshold>
<!ATTLIST fixThreshold  applyTo CDATA #REQUIRED>
<!ATTLIST fixThreshold  multFactor CDATA #REQUIRED>
<!ELEMENT seriesThreshold>
<!ATTLIST seriesThreshold  applyTo CDATA #REQUIRED>
<!ATTLIST seriesThreshold  thresholdSeries CDATA #REQUIRED>
<!ATTLIST seriesThreshold  multFactor CDATA #REQUIRED>
<!ELEMENT whatIfEvent(whatIfProps*)>
<!ATTLIST whatIfEvent eventType #REQUIRED>
<!ATTLIST whatIfEvent eventTime #REQUIRED>
<!ATTLIST whatIfEvent eventSeriesIdList #REQUIRED>
<!ELEMENT whatIfProps>
<!ATTLIST whatIfProps key CDATA #REQUIRED>
<!ATTLIST whatIfProps value CDATA #REQUIRED>
<!ELEMENT forecastedSeries (DATA+)>
<!ELEMENT data>
<!ATTLIST data ts CDATA #REQUIRED>
<!ATTLIST data value CDATA #REQUIRED>
<!ATTLIST data duration CDATA #REQUIRED>
<!ATTLIST data overThreshold CDATA #REQUIRED>
<!ATTLIST data isForecastedCDATA #REQUIRED>
]>
Was this page helpful? Yes No Submitting... Thank you

Comments