monitor: Support a separate upper deviation
Add an optional 'upper_deviation' field to the fan monitor config and if
supplied it will be used for the allowed deviation when the fan value is
over the target. If not supplied it will work as today and the single
deviation value will be used for both the upper and lower bounds.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I085dc1996832e79b94bd1df3a05681d107f466eb
diff --git a/monitor/fan.hpp b/monitor/fan.hpp
index 75c2213..5892ba2 100644
--- a/monitor/fan.hpp
+++ b/monitor/fan.hpp
@@ -258,6 +258,13 @@
const size_t _deviation;
/**
+ * @brief The percentage that the input speed must be above
+ * the target speed to be considered an error.
+ * Between 0 and 100.
+ */
+ const size_t _upperDeviation;
+
+ /**
* The number of sensors that must be nonfunctional at the
* same time in order for the fan to be set to nonfunctional
* in the inventory.