Revert back to custom OpenBMC messages for threshold events
The Redfish standard Resource Event Message Registry has more
messages defined than we need and the threshold event messages
don't appear to be ready yet (typos in the message text), so
go back to our custom messages for now.
Tested:
Verified that threshold events are logged with the proper MessageId
and MessageArgs for the OpenBMC threshold messages.
Change-Id: I6d40ec6d09fffa1fce47c8266332fb9ed2236e89
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 b29717d..1470b3f 100644
--- a/include/threshold_event_monitor.hpp
+++ b/include/threshold_event_monitor.hpp
@@ -31,7 +31,7 @@
static constexpr const uint8_t thresholdEventDataTriggerReadingByte2 = (1 << 6);
static constexpr const uint8_t thresholdEventDataTriggerReadingByte3 = (1 << 4);
-static const std::string resourceEventMessageRegistryVersion("1.0");
+static const std::string openBMCMessageRegistryVersion("0.1");
inline static sdbusplus::bus::match::match startThresholdEventMonitor(
std::shared_ptr<sdbusplus::asio::connection> conn)
@@ -202,19 +202,19 @@
std::string threshold;
std::string direction;
std::string redfishMessageID =
- "ResourceEvent." + resourceEventMessageRegistryVersion;
+ "OpenBMC." + openBMCMessageRegistryVersion;
if (event == "CriticalLow")
{
threshold = "critical low";
if (assert)
{
direction = "low";
- redfishMessageID += ".ResourceErrorThresholdExceeded";
+ redfishMessageID += ".SensorThresholdCriticalLowGoingLow";
}
else
{
direction = "high";
- redfishMessageID += ".ResourceErrorThresholdCleared";
+ redfishMessageID += ".SensorThresholdCriticalLowGoingHigh";
}
}
else if (event == "WarningLow")
@@ -223,12 +223,12 @@
if (assert)
{
direction = "low";
- redfishMessageID += ".ResourceWarningThresholdExceeded";
+ redfishMessageID += ".SensorThresholdWarningLowGoingLow";
}
else
{
direction = "high";
- redfishMessageID += ".ResourceWarningThresholdCleared";
+ redfishMessageID += ".SensorThresholdWarningLowGoingHigh";
}
}
else if (event == "WarningHigh")
@@ -237,12 +237,12 @@
if (assert)
{
direction = "high";
- redfishMessageID += ".ResourceWarningThresholdExceeded";
+ redfishMessageID += ".SensorThresholdWarningHighGoingHigh";
}
else
{
direction = "low";
- redfishMessageID += ".ResourceWarningThresholdCleared";
+ redfishMessageID += ".SensorThresholdWarningHighGoingLow";
}
}
else if (event == "CriticalHigh")
@@ -251,12 +251,12 @@
if (assert)
{
direction = "high";
- redfishMessageID += ".ResourceErrorThresholdExceeded";
+ redfishMessageID += ".SensorThresholdCriticalHighGoingHigh";
}
else
{
direction = "low";
- redfishMessageID += ".ResourceErrorThresholdCleared";
+ redfishMessageID += ".SensorThresholdCriticalHighGoingLow";
}
}
@@ -271,7 +271,7 @@
redfishMessageID.length(), redfishMessageID.data(),
"REDFISH_MESSAGE_ARG_1=%.*s", sensorName.length(),
sensorName.data(), "REDFISH_MESSAGE_ARG_2=%f",
- thresholdVal);
+ sensorVal, "REDFISH_MESSAGE_ARG_3=%f", thresholdVal);
};
sdbusplus::bus::match::match thresholdEventMatcher(
static_cast<sdbusplus::bus::bus &>(*conn),