match thresholdAsserted signal for threshold event monitor
thresholdAsserted signal includes the sensor reading that caused
threshold property change. This removes the need to read the
sensor value at the time of logging, which may miss the bad reading
when the log is delayed.
Tested:
Build and send the following command
busctl set-property xyz.openbmc_project.ADCSensor
/xyz/openbmc_project/sensors/voltage/P1V8_PCH
xyz.openbmc_project.Sensor.Value Value d 1.97
observed the following event logged
P1V8_PCH sensor crossed a critical high threshold going high. Reading=1.970000 Threshold=1.961000.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ie8831a9ba48188e1dd343db22583485c02f35dbc
diff --git a/src/sel_logger.cpp b/src/sel_logger.cpp
index fadcc17..186072e 100644
--- a/src/sel_logger.cpp
+++ b/src/sel_logger.cpp
@@ -202,8 +202,8 @@
ifaceAddSel->initialize();
#ifdef SEL_LOGGER_MONITOR_THRESHOLD_EVENTS
- sdbusplus::bus::match::match thresholdEventMonitor =
- startThresholdEventMonitor(conn);
+ sdbusplus::bus::match::match thresholdAssertMonitor =
+ startThresholdAssertMonitor(conn);
#endif
#ifdef REDFISH_LOG_MONITOR_PULSE_EVENTS