xref: /openbmc/phosphor-fan-presence/monitor/example/monitor.yaml (revision 27cc39f1f98c6fe0352ff01effb189ab1dead055)
1 #Example fan monitor definitions for phosphor-fan-monitor
2 
3 #List the fans that need to be monitored, along with some
4 #properties that define how much slack is allowed in the actual
5 #tach value as compared to the target tach value.
6 
7 #fans:
8 # - inventory:
9 #    [The system inventory location for the fan]
10 #  method: [timebased|count](optional)
11 #    [Available methods:
12 #     * timebased - use a percentage based deviation
13 #     * count - run up/down count fault detection]
14 #  functional_delay:
15 #    [Delay (in secs) before a fan is marked functional after returning
16 #     within the allowed deviation]
17 #  allowed_out_of_range_time: (required for method timebased)
18 #    [Time (in secs) actual speed can be outside of deviation of
19 #     target speed]
20 #  deviation:
21 #    [Percentage that actual speed must be within target speed]
22 #  num_sensors_nonfunc_for_fan_nonfunc:
23 #    [How many sensors on the fan must be faulted before fan
24 #     will be considered faulted]
25 #  sensors: [array of speed sensors for the fan]
26 #    - name [The name of the fan sensor]
27 #      has_target [true|false  If this sensor has a Target property for
28 #                  setting a fan speed (otherwise just for reads)]
29 #      target_interface [The fan target interface used by the sensor.
30 #                        Default is "xyz.openbmc_project.Control.FanSpeed"]
31 #      target_path [The full target path, which implements
32 #                   xyz.openbmc_project.Control.FanSpeed or
33 #                   xyz.openbmc_project.Control.FanPwm interface.
34 #                   Default is /xyz/openbmc_project/sensors/fan_tach/*"]
35 #      factor [The factor to multiply with target to calculate the expected
36 #              fan speed. Default is 1 for fan speed target;
37 #              Customized value for pwm target]
38 #      offset [The offset to add to calculate the expected fan speed.
39 #              Default is 0 for fan speed target;
40 #              Customized value for pwm target]
41 #  condition: [optional condition function to create fan functional monitoring]
42 #    name: [The name of an available condition function]
43 #    properties: [The properties used in the condition function]
44 #        - object: [Object path of property to use]
45 #          interface: [Interface of property to use]
46 #          property:
47 #              name: [Property name]
48 #              type: [Property data type]
49 #              value: [Property value to check condition against]
50 #
51 #sensor_trust_groups:
52 # - class: [Group class name
53 #           Available classes:
54 #           * NonzeroSpeed - Only trust if at least one sensor in the group
55 #                            has a nonzero speed.]
56 #   group:
57 #     - name [The name of the fan sensor in this group]
58 #       in_trust: [true|false] (optional)
59 #         [Include in trust determination or not. Default = true]
60 
61 #The code uses these parameters as follows:
62 #  After a speed reading of a sensor is outside of the allowed deviation of
63 #  the target speed for the allowed out of range time, if at least
64 #  num_sensors_nonfunc_for_fan_nonfunc sensors meet this condition,
65 #  the fan will be set to nonfunctional in the inventory.
66 #
67 #  Sensor trust groups are used to specify that the speed values for the
68 #  sensors in a group cannot be trusted based on some condition, where
69 #  the condition is based on the class used to implement the group.  All
70 #  sensors in the group go in and out of trust based on those defined
71 #  to be part of determining the trust.  This section is optional.
72 
73 #Example entries for 1 fan system:
74 #fans:
75 #  - inventory: /system/chassis/motherboard/fan0
76 #    functional_delay: 5
77 #    allowed_out_of_range_time: 15
78 #    deviation: 15
79 #    num_sensors_nonfunc_for_fan_nonfunc: 1
80 #    sensors:
81 #      - name: fan0
82 #        has_target: true
83 #    # Only create fan functional properties and monitor on air cooled
84 #    condition:
85 #      name: propertiesMatch
86 #      properties:
87 #        - object: /xyz/openbmc_project/inventory/system/chassis
88 #          interface: xyz.openbmc_project.Inventory.Decorator.CoolingType
89 #          property:
90 #            name: WaterCooled
91 #            type: bool
92 #            value: false
93 #sensor_trust_groups:
94 # - class: NonzeroSpeed
95 #    group:
96 #      - name: fan0_0
97 #        in_trust: false
98 #      - name: fan0_1
99 
100 #Example entries for count method fan system:
101 #fans:
102 #  - inventory: /system/chassis/motherboard/fan2
103 #    method: count
104 #    functional_delay: 5
105 #    deviation: 15
106 #    num_sensors_nonfunc_for_fan_nonfunc: 1
107 #    sensors:
108 #      - name: fan2
109 #        has_target: true
110 #    # Only create fan functional properties and monitor on air cooled
111 #    condition:
112 #      name: propertiesMatch
113 #      properties:
114 #        - object: /xyz/openbmc_project/inventory/system/chassis
115 #          interface: xyz.openbmc_project.Inventory.Decorator.CoolingType
116 #          property:
117 #            name: WaterCooled
118 #            type: bool
119 #            value: false
120