History log of /openbmc/bmcweb/redfish-core/src/event_log.cpp (Results 1 – 4 of 4)
Revision Date Author Comments
# 4a19a7b5 27-Jan-2025 Ed Tanous <etanous@nvidia.com>

Deduplicate event ids

Redfish specification states:
```
The value of the id field shall be the same as the Id property in the
event payload. The value of the Id property in the event payload should

Deduplicate event ids

Redfish specification states:
```
The value of the id field shall be the same as the Id property in the
event payload. The value of the Id property in the event payload should
be the same as the EventId property of the last event record in the
Events array. The value of the EventId property for an event record
should be a positive integer value and should be generated in a
sequential manner.
```

The event service code did not implement that correctly. So:
1. Add ID fields for all events.
2. Remove the per-sse connection id field and rely solely on
EventServiceManager.
3. Make sure all paths, (including metric report) are generating an
event id that's based on the eventservice event id

Tested: Redfish event listener now sees events populated.
LastEventId when sent to the SSE socket now sees a contiguous id.

```
uri=$(curl -s --user "root:0penBmc" -k "https://192.168.7.2/redfish/v1/EventService" | jq -r .ServerSentEventUri)
curl -u root:0penBmc -vvv -k -N -H "Accept: text/event-stream" -H "Last-Event-Id: 0" "https://192.168.7.2$uri"
```

Change-Id: Ic32e036f40a53a9b2715639ae384d7891c768260
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 0309c216 10-Jan-2025 Igor Kanyuka <ifelmail@gmail.com>

Improve subscriptions logging

If the event is not sent to the destination it
was supposed to be sent to, it's hard to find
out why it was not sent, and what was the message
content the code was work

Improve subscriptions logging

If the event is not sent to the destination it
was supposed to be sent to, it's hard to find
out why it was not sent, and what was the message
content the code was working with. Having additional
logging (mostly debug) helps with troubleshooting.

Tested:
Built an image with these changes, ran in QEMU,
enabled debug logging, setup subscription:
```
{
"@odata.id": "/redfish/v1/EventService/Subscriptions/3489160873",
"@odata.type": "#EventDestination.v1_14_1.EventDestination",
"Context": "127.0.0.1",
"DeliveryRetryPolicy": "RetryForever",
"Destination": "http://127.0.0.1:8888/events",
"EventFormatType": "Event",
"HeartbeatIntervalMinutes": 10,
"HttpHeaders": [],
"Id": "3489160873",
"MessageIds": [],
"MetricReportDefinitions": [],
"Name": "Event Destination 3489160873",
"Protocol": "Redfish",
"RegistryPrefixes": [],
"ResourceTypes": [],
"SendHeartbeat": false,
"SubscriptionType": "RedfishEvent",
"VerifyCertificate": true
}
```

and sent a message:
```
root@bmc:~# busctl call xyz.openbmc_project.Logging \
/xyz/openbmc_project/logging \
xyz.openbmc_project.Logging.Create \
Create 'ssa{ss}' \
OpenBMC.0.1.PowerButtonPressed \
xyz.openbmc_project.Logging.Entry.Level.Error 0

o "/xyz/openbmc_project/logging/entry/16"
```

Got this in the log:
```
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:65]
Handling new DBus Event Log Entry
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface org.freedesktop.DBus.Peer
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface org.freedesktop.DBus.Introspectable
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface org.freedesktop.DBus.Properties
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface xyz.openbmc_project.Common.FilePath
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface xyz.openbmc_project.Software.Version
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface xyz.openbmc_project.Association.Definitions
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface xyz.openbmc_project.Object.Delete
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:74] Found
dbus interface xyz.openbmc_project.Logging.Entry
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG dbus_log_watcher.cpp:59] Found
Event Log Entry Id=16, Timestamp=, Message=
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG subscription.cpp:283]
Processing logEntry: 16, ''
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG event_log.cpp:134]
formatEventLogEntry: could not find messageID '' for log entry 16 in
registry
Jan 13 04:13:13 bmc bmcwebd[823]: [WARNING subscription.cpp:292] Read
eventLog entry failed
Jan 13 04:13:13 bmc bmcwebd[823]: [DEBUG subscription.cpp:317] No log
entries available to be transferred.
```

Change-Id: I5cc8d48a0258f2419a7bd4f726f185abbd628110
Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>

show more ...


# d109e2b6 18-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: move registries functions to their file

There were same functions from namespace 'registries' in
event_service_manager.hpp. Move them to registries.cpp/hpp.

Tested:
- Using Redfish Event

Refactor: move registries functions to their file

There were same functions from namespace 'registries' in
event_service_manager.hpp. Move them to registries.cpp/hpp.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Id0912f6581637bb4117e67b138122c355256b561
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# b80ba2e4 18-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

Refactor: extract src/event_log.cpp

event_service_manager.hpp contains namespace 'event_log' which is
confusing. Extract it to a separate header and cpp file to have the
filename match the namespace

Refactor: extract src/event_log.cpp

event_service_manager.hpp contains namespace 'event_log' which is
confusing. Extract it to a separate header and cpp file to have the
filename match the namespace.

No functional changes have been made to the code.

Tested:
- Using Redfish Event Listener, test subscriptions and eventing.
- Redfish Service Validator passes

Change-Id: Ia0bf658b8b46f92aede059d46e8de48f160e073e
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...