Skip to main content

POST – Trigger

Rules

  1. The following properties are mandatory to create a Trigger :
    • Id

    • Name

    • MetricType

    • TriggerActions

    • NumericThresholds or (DiscreteTriggerCondition & DiscreteTriggers)

    • MetricProperties

  2. If the value of the ServiceEnabled attribute available under the Telemetry Service Resource (i.e./redfish/v1/TelemetryService) is true, it signifies that the Telemetry Service is in Enabled state and the POST Request will succeed.

  3. If it is false, it signifies that the Telemetry Service is in Disabled state and it will fail with an error message stating, the operation failed because this service is disabled can no longer take incoming requests.

  4. Status->State and Status->Health are read-only attributes and cannot be passed in the POST Request Body.

  5. Only a maximum of 5 triggers can be created.

  6. For creation of Numeric Triggers, NumericThresholds attribute is mandatory. Four sub-attributes are supported under NumericThresholds attribute LowerCritical, LowerWarning, UpperCritical and UpperWarning. Not all four sub-attributes are mandatory for Numeric Triggers creation but at least one sub-attribute should be present. It is entirely left up to the Redfish User's choice to have one or more sub-attributes.

  7. Under each of these four sub-attributes, we again have support for three sub attributes - Activation, DwellTime and Reading. These three attributes are mandatory for each of the four sub-attributes, if specified in the request body.

  8. For creation of Discrete Triggers, if value of DiscreteTriggerCondition attribute is changed, then DiscreteTriggers attribute should not be present and if value of DiscreteTriggerCondition attribute is specified, then DiscreteTriggers attribute should be present.

  9. DiscreteTriggers attribute should consist of an array of objects where each object can have the following four sub attributes - Name, Value, Severity and DwellTime. The sub-attributes Value, Severity and DwellTime are mandatory ones whereas Name is an optional one.

Request

Create Numeric Triggers

POST https://{{ip}}/redfish/v1/TelemetryService/Triggers
Content-Type: application/json

{
"Id": "TemperatureTrigger",
"Name": "Temperature Trigger",
"MetricType": "Numeric",
"TriggerActions": [
"LogToLogService",
"RedfishEvent"
],
"NumericThresholds": {
"LowerCritical": {
"Activation": "Either",
"DwellTime": "PT1M",
"Reading": 30
},
"LowerWarning": {
"Activation": "Decreasing",
"DwellTime": "PT1M30S",
"Reading": 50
},
"UpperCritical": {
"Activation": "Increasing",
"DwellTime": "PT1M50S",
"Reading": 80
},
"UpperWarning": {
"Activation": "Increasing",
"DwellTime": "PT30S",
"Reading": 70
}
},
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius"
]
}

Response

Create Numeric Triggers

HTTP/1.1 201 Created
Location: http://<IP>/redfish/v1/TelemetryService/Triggers/TemperatureTrigger
Content-Type: application/json
{
"@odata.context": "/redfish/v1/$metadata#TelemetryService.Triggers(Name,TriggerActions,
MetricProperties,Id,Status,Links,MetricType,NumericThresholds)",
"@odata.etag": "\"1573457484\"",
"@odata.id": "/redfish/v1/TelemetryService/Triggers/TemperatureTrigger",
"@odata.type": "#Triggers.v1_1_1.Triggers",
"Id": "TemperatureTrigger",
"Links": [],
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius"
],
"MetricType": "Numeric",
"Name": "Temperature Trigger",
"NumericThresholds": {
"LowerCritical": {
"Activation": "Either",
"DwellTime": "PT1M",
"Reading": 30
},
"LowerWarning": {
"Activation": "Decreasing",
"DwellTime": "PT1M30S",
"Reading": 50
},
"UpperCritical": {
"Activation": "Increasing"
"DwellTime": "PT1M50S",
"Reading": 80
},
"UpperWarning": {
"Activation": "Increasing",
"DwellTime": "PT30S",
"Reading": 70
}
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"TriggerActions": [
"RedfishEvent",
"LogToLogService"
]
}

Request

Create Discrete Triggers

POST https://{{ip}}/redfish/v1/TelemetryService/Triggers
Content-Type: application/json

{
"ChassisIndicatorLED",
"Name": "Chassis_IndicatorLED",
"MetricType": "Discrete",
"TriggerActions": [
"LogToLogService",
"RedfishEvent"
],
"DiscreteTriggerCondition": "Specified",
"DiscreteTriggers": [
{
"Name": "LED_Blinking",
"Value": "Blinking",
"Severity": "Critical",
"DwellTime": "PT30S"
}
],
"MetricProperties": [
"/redfish/v1/Chassis/Self#/IndicatorLED"
]
}

Response

Create Discrete Triggers

HTTP/1.1 201 Created
Location: http://<IP>/redfish/v1/TelemetryService/Triggers/ChassisIndicatorLED
Content-Type: application/json
{
"@odata.context": "/redfish/v1/$metadata#TelemetryService.Triggers(Id,Status,Links,Name,MetricProperties,
DiscreteTriggerCondition,DiscreteTriggers,TriggerActions,MetricType,Description)",
"@odata.etag": "\"1583924493\"",
"@odata.id": "/redfish/v1/TelemetryService/Triggers/ChassisIndicatorLED",
"@odata.type": "#Triggers.v1_1_1.Triggers",
"Description": "TelemetryService-Triggers-ChassisIndicatorLED",
"DiscreteTriggerCondition": "Specified",
"DiscreteTriggers": [
{
"DwellTime": "PT30S",
"Name": "LED_Blinking",
"Severity": "Critical",
"Value": "Blinking"
}
"Id": "ChassisIndicatorLED",
"Links": [],
"MetricProperties": [
"/redfish/v1/Chassis/Self#/IndicatorLED"
],
"MetricType": "Discrete",
"Name": "Chassis_IndicatorLED",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"TriggerActions": [
"RedfishEvent",
"LogToLogService"
]
}

The triggers created can be either numeric or discrete in nature. During each polling cycle of telemetry handler, the current value of each of the metric properties specified in trigger is compared with the specified trigger value.

Behavior

  1. Whenever a trigger condition occurs for each of the metric properties, the initial point of measurement of dwell time duration is noted.

  2. For each subsequent polling cycle, if the trigger condition persists, the time duration between the current time and the initial point of measurement of dwell time is calculated and compared with the DwellTime value and if the time difference is greater than or equal to the DwellTime value, the actions specified by the TriggerActions attribute from amongst these ("LogToLogService", "RedfishEvent" and "RedfishMetricReport") is being performed.

  3. The current value for the specific MetricProperty is also noted, in order to avoid triggering of actions for the same set of MetricProperty-MetricValue pair in the subsequent polling cycles.

  4. For example, if we do create a numeric trigger with the below mentioned Temperature MetricProperties.
    {
    .....
    ,
    "NumericThresholds": {
    "UpperWarning": {
    "Activation": "Increasing",
    "DwellTime": "PT20S",
    "Reading": 10
    }
    },
    "MetricProperties": [
    "/redfish/v1/Chassis/Self/Thermal#/Temperatures/250_0/ReadingCelsius",
    "/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
    "/redfish/v1/Chassis/Self/Thermal#/Temperatures/92_0/ReadingCelsius",
    "/redfish/v1/Chassis/Self/Thermal#/Temperatures/120_0/ReadingCelsius",
    "/redfish/v1/Chassis/Self/Thermal#/Temperatures/33_0/ReadingCelsius",
    "/redfish/v1/Chassis/Self/Thermal#/Temperatures/39_0/ReadingCelsius"
    ],
    .....
    }
  5. During each polling cycle, the current value of each of the MetricProperties (for e.g. "/redfish/v1/Chassis/Self/Thermal#/Temperatures/250_0/ReadingCelsius") specified above is compared with the specified trigger value (refer value of attribute "Reading" i.e. 10).

  6. Whenever a trigger condition occurs (say, "ReadingCelsius" value of Sensor Number 250 goes above 10), the initial point of measurement of dwell time duration is noted.

  7. For each subsequent polling cycle, if the trigger condition persists (i.e. "ReadingCelsius" value of Sensor Number 250 is still above 10), the time duration between the current time and the initial point of measurement of dwell time is calculated and compared with the DwellTime value (i.e. 20 seconds) and if the time difference is greater than or equal to the DwellTime value, the actions specified by the TriggerActions attribute from amongst these ("LogToLogService", "RedfishEvent" and "RedfishMetricReport") is being performed.

  8. The current value for the specific MetricProperty ("/redfish/v1/Chassis/Self/Thermal#/Temperatures/250_0/ReadingCelsius") is also noted. The DwellTime logic is applicable to both numeric and discrete triggers.

Trigger conditions

  1. In Numeric Triggers, under the below mentioned scenarios, the trigger condition is met:

    1. If Numeric Threshold Activation attribute value is "Increasing", the threshold is activated when the reading changes from a value lower than the threshold to a value higher than the threshold.

    2. If Numeric Threshold Activation attribute value is "Decreasing", the threshold is activated when the reading changes from a value higher than the threshold to a value lower than the threshold.

    3. If Numeric Threshold Activation attribute value is "Either", the threshold is activated when either the Increasing or Decreasing conditions are met.

  2. In Discrete Triggers, under the below mentioned scenarios, the trigger condition is met:

    1. If the value of DiscreteTriggerCondition attribute is "Changed", whenever the value of any MetricProperty changes, the current value of the MetricProperty is compared with the previous value. If there is a change, trigger action is taken. In this case, any value provided under "DiscreteTriggers" attribute is ignored.

    2. If the value of DiscreteTriggerCondition attribute is "Specified", whenever the value of any Metric Property matches the specified trigger value, trigger action is taken.

  3. In the case of Numeric Triggers, MetricProperties only support the values defined under the Members of MetricDefinitions URI “/redfish/v1/TelemetryService/MetricDefinitions”.

  4. In the case of Discrete Triggers, MetricProperties can support URI properties with value type "string".