1description: >
2    Implement this interface to provide trigger inspection features. An
3    implementation service should additionally implement
4    xyz.openbmc_project.Object.Delete for deletion of individual trigger.
5
6properties:
7  - name: Discrete
8    type: boolean
9    description: >
10        If true than trigger uses discrete thresholds as threshold conditions.
11        Otherwise numeric thresholds is used.
12    flags:
13    - const
14  - name: TriggerActions
15    type: array[enum[self.TriggerAction]]
16    description: >
17        Defines actions which are taken when threshold conditions are met.
18    flags:
19    - const
20  - name: Persistent
21    type: boolean
22    description: Defines if Trigger is stored in non volatile memory.
23  - name: ReportNames
24    type: array[string]
25    description: >
26        Collection of report names that are updated when threshold conditions
27        are met. List is ignored if TriggerActions property does not contain
28        'UpdateReport' action.
29  - name: Sensors
30    type: array[struct[object_path, string]]
31    description: >
32        Array of sensors that is monitored within trigger. First parameter of a
33        structure is a sensor path. Second parameter is a metadata that is used
34        to store user data about sensor.
35  - name: Thresholds
36    type: variant[array[struct[enum[self.Type],uint64,enum[self.Direction],double]],array[struct[string,enum[self.Severity],uint64,string]]]
37    description: >
38        First type in variant is a collection of numeric thresholds that has
39        following fields - type, dwell time, direction and threshold value.
40        Second type holds by variant is a collection of discrete thresholds that
41        contains following fields - user id, severity, dwell time and threshold
42        value. Discrete value does not need to be a number. Numeric threshold
43        array is limited by Type enumeration, only 4 elements are allowed.
44        Discrete threshold array size is not limited. If discrete threshold
45        array is empty than every value change is taken into account of
46        threshold condition. Dwell time specify for how long condition has to
47        persist to trigger an action.
48
49enumerations:
50  - name: TriggerAction
51    description: >
52        Defines a action which is taken once threshold condition is met.
53    values:
54      - name: LogToLogService
55        description: Trigger will log to journal.
56      - name: RedfishEvent
57        description: Trigger will log Redfish message.
58      - name: UpdateReport
59        description: >
60            Trigger will update reports. Reports that will be updated are
61            specified in ReportNames property.
62  - name: Type
63    description: >
64        Defines a context of a message that is logged when numeric threshold
65        condition is met.
66    values:
67      - name: LowerCritical
68      - name: LowerWarning
69      - name: UpperWarning
70      - name: UpperCritical
71  - name: Direction
72    description: >
73        Defines in which direction threshold value is crossed to fulfill numeric
74        threshold condition.
75    values:
76      - name: Either
77        description: >
78            Crossing threshold value fulfill numeric threshold condition.
79      - name: Decreasing
80        description: >
81            If threshold value is crossed and previous sensor value was greater
82            then threshold value then numeric threshold condition is met.
83      - name: Increasing
84        description: >
85            If threshold value is crossed and previous sensor value was less
86            then threshold value then numeric threshold condition is met.
87  - name: Severity
88    description: >
89        Defines a context of a message that is logged when discrete threshold
90        condition is met.
91    values:
92      - name: OK
93      - name: Warning
94      - name: Critical
95