Update Threshold Sensor events to new Redfish message format
The REDFISH_MESSAGE_ID requirements and format for
REDFISH_MESSAGE_ARGS have changed, so this change updates the
Redfish message to the new format.
Tested:
Checked the Redfish Event Log for threshold sensor events and
verified that the expected Redfish message with the updated
MessageArgs format was logged.
Change-Id: Ieef7a41cdefd24d4498197a1d0e4e57f4f7583f0
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/include/threshold_event_monitor.hpp b/include/threshold_event_monitor.hpp
index 1470b3f..81cd3aa 100644
--- a/include/threshold_event_monitor.hpp
+++ b/include/threshold_event_monitor.hpp
@@ -266,12 +266,11 @@
" Threshold=" + std::to_string(thresholdVal) +
".");
- selAddSystemRecord(journalMsg, std::string(msg.get_path()), eventData,
- assert, selBMCGenID, "REDFISH_MESSAGE_ID=%.*s",
- redfishMessageID.length(), redfishMessageID.data(),
- "REDFISH_MESSAGE_ARG_1=%.*s", sensorName.length(),
- sensorName.data(), "REDFISH_MESSAGE_ARG_2=%f",
- sensorVal, "REDFISH_MESSAGE_ARG_3=%f", thresholdVal);
+ selAddSystemRecord(
+ journalMsg, std::string(msg.get_path()), eventData, assert,
+ selBMCGenID, "REDFISH_MESSAGE_ID=%s", redfishMessageID.c_str(),
+ "REDFISH_MESSAGE_ARGS=%.*s,%f,%f", sensorName.length(),
+ sensorName.data(), sensorVal, thresholdVal);
};
sdbusplus::bus::match::match thresholdEventMatcher(
static_cast<sdbusplus::bus::bus &>(*conn),