#
6c58a03e |
| 21-Nov-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
event service: dbus log: enable event subscription
enable the event subscriptions
/redfish/v1/EventService/Subscriptions/
to work for the dbus event log.
So if you are enabling redfish-dbus-log o
event service: dbus log: enable event subscription
enable the event subscriptions
/redfish/v1/EventService/Subscriptions/
to work for the dbus event log.
So if you are enabling redfish-dbus-log option, event subscriptions should work similar to when this option is disabled, with one difference:
- 'MessageArgs' property is currently not implemented and cannot be found in the returned json.
Tested: - Using Redfish Event Listener, test subscriptions and eventing. - Manual Test below with the Redfish Event Listener:
1. Created a maximal Event Log Subscription
redfish { "@odata.id": "/redfish/v1/EventService/Subscriptions/2023893979", "@odata.type": "#EventDestination.v1_8_0.EventDestination", "Context": "EventLogSubscription", "DeliveryRetryPolicy": "TerminateAfterRetries", "Destination": "http://${ip}:5000/event-receiver", "EventFormatType": "Event", "HttpHeaders": [], "Id": "2023893979", "MessageIds": [], "MetricReportDefinitions": [], "Name": "Event Destination 2023893979", "Protocol": "Redfish", "RegistryPrefixes": [], "ResourceTypes": [], "SubscriptionType": "RedfishEvent", "VerifyCertificate": true }
which matches on all registries and all message ids.
2. created a new phosphor-logging entry
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
3. bmcweb picks up this new entry via the dbus match, this can be verified by putting bmcweb in debug logging mode.
4. the event log entry makes it through the filtering code
5. the POST request is sent to the subscribed server as expected, and contains the same properties as with the file-based backend.
Change-Id: I122e1121389f72e67a998706aeadd052ae607d60 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
#
2ac69850 |
| 22-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out Dbus events into class
EventServiceManager is already too large. Implement the TODO from run that these should be classes, and fix the issue where events are being registered on startup,
Break out Dbus events into class
EventServiceManager is already too large. Implement the TODO from run that these should be classes, and fix the issue where events are being registered on startup, not on a subscription being created.
To accomplish this, this patch takes global state and breaks them out into RAII classes from EventServiceManager, one for monitoring DBus matches, and one for monitoring filesystem log events using inotify. Each of these connect to static methods on EventService that can send the relevant events to the user.
Fundamentally, no code within the two new classes is changed, and the only changes to event service are made to support creation and destruction of the RAII classes.
There are a number of call sites, like cacheRedfishLogFile, that are obsoleted when the class is raii. The file will be re-cached on creation.
Tested: WIP No TelemetryService tests exist in Redfish.
Change-Id: Ibc91cd1496edf4a080e2d60bfc1a32e00a6c74b8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
b26ff34d |
| 22-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out dbus telemetry watcher
EventServiceManager is too large. Make it smaller by breaking out the dbus log watching mechanisims into a class.
No changes are made, with the exception of the ad
Break out dbus telemetry watcher
EventServiceManager is too large. Make it smaller by breaking out the dbus log watching mechanisims into a class.
No changes are made, with the exception of the addition of sendTelemetryReportToSubs to allow sending events from outside the class, without needing the subscription list, which should be private.
Tested: On last patch in series.
Change-Id: Idf17886971ddff5dddeabeeb6ae44e733063b909 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|