Correct message for threshold events

Thresholds can be deasserted not only because of the actual sensor
data, but also because of the change in the general system state.
For example some sensors can be configured to be measured only when
the system is powered on.
In such cases current messages can be confusing:
"PVPP_ABCD_CPU2 sensor crossed a critical low threshold going high.
Reading=0.033000 Threshold=2.410000".
Replace message template to be more generic to cover discussed cases:
"PVPP_ABCD_CPU2 critical low threshold deassert.
Reading=0.033000 Threshold=2.410000".

Change-Id: I875056c04bb2ff5e5dbcef10042a82c1ca06de5f
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
1 file changed
tree: 9594d956128c71fe4e08b1a8a0b6758968d86f0d
  1. include/
  2. service_files/
  3. src/
  4. subprojects/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. meson.build
  9. meson_options.txt
  10. OWNERS
  11. README.md
README.md

phosphor-sel-logger

Overview

The SEL Logger daemon handles all requests to add new IPMI SEL records to the journal. SEL records stored in the journal are identified by the standard MESSAGE_ID metadata. Other metadata fields are used to store event-specific information for each record.

Metadata

SEL records are identified in the journal using the MESSAGE_ID field.

The MESSAGE_ID for SEL records is "b370836ccf2f4850ac5bee185b77893a".

The additional metadata fields for a SEL record are

IPMI_SEL_RECORD_ID = Two byte unique SEL Record ID
IPMI_SEL_RECORD_TYPE = The type of SEL entry (system or OEM)
                       which determines the definition of the
                       remaining bytes
IPMI_SEL_GENERATOR_ID = The IPMI Generator ID (usually the
                        IPMB Slave Address) of the requester
IPMI_SEL_SENSOR_PATH = D-Bus path of the sensor in the event
IPMI_SEL_EVENT_DIR = Direction of the event (assert or deassert)
IPMI_SEL_DATA = Raw binary data included in the SEL record

Interface

The SEL Logger daemon exposes an interface for manually adding System and OEM type SEL events, and provides the capability to monitor for types of events and log them automatically.

The interface for System type events requires

  • A text message to include in the journal entry
  • The sensor path
  • Up to three bytes of SEL data
  • The direction of the event (assertion or deassertion)
  • The generator ID of the requester

The interface for OEM type events requires

  • A text message to include in the journal entry
  • Up to thirteen bytes of SEL data (depending on the record type)
  • The record type

The MESSAGE_ID and IPMI_SEL_RECORD_ID metadata fields are added by the daemon.

Event Monitoring

The SEL Logger daemon can be configured to watch for specific types of events and automatically log SEL records for them.

As an example, the SEL Logger has a "threshold event monitor" which implements a D-Bus match for any "PropertiesChanged" event on the xyz.openbmc_project.Sensor.Threshold interface. The handler then checks for any new threshold events and logs SEL records accordingly.