History log of /openbmc/bmcweb/features/redfish/src/dbus_log_watcher.cpp (Results 1 – 7 of 7)
Revision Date Author Comments
# f86cdd7d 12-Aug-2025 Ed Tanous <etanous@nvidia.com>

Move common structures

It's ideal if the various BMCWEB_ROUTE lib calls do not call from one
another. This reduces the amount of code that's compiled each time
separately.

Tested: Code compiles.

Move common structures

It's ideal if the various BMCWEB_ROUTE lib calls do not call from one
another. This reduces the amount of code that's compiled each time
separately.

Tested: Code compiles.

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

show more ...


# 56431b29 03-Dec-2024 Alexander Hansen <alexander.hansen@9elements.com>

dbus event subscriptions: test dbus_log_watcher

Currently that code is still unfinished,
but we can already define some trivial testcases.

The main result of this function is populating EventLogObj

dbus event subscriptions: test dbus_log_watcher

Currently that code is still unfinished,
but we can already define some trivial testcases.

The main result of this function is populating EventLogObjectsType.

Tested: Unit tests pass.

Change-Id: I2e23147190be33192d41176413c16cd98c7bfd81
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 546d0785 10-Jan-2025 Alexander Hansen <alexander.hansen@9elements.com>

dbus event subscription: add MessageId

Use dbus property 'Message' for the redfish Message Id.

The dbus property is not documented to be used for this purpose in the
interface definition [1] but th

dbus event subscription: add MessageId

Use dbus property 'Message' for the redfish Message Id.

The dbus property is not documented to be used for this purpose in the
interface definition [1] but the design [3] uses it. If there is no
valid MessageId, the event filtering code will drop the event anyways.

Tested: The code was already tested in this form in
[2] but found to perhaps not be compliant to the redfish specification

References:
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Logging/Entry.interface.yaml[2] 6c58a03e1f6818c3cd0a521466f69ef9e869bf25
[3] https://github.com/openbmc/docs/blob/d886ce89fe66c128b3ab492e530ad48fa0c1b4eb/designs/event-logging.md?plain=1#L448

Change-Id: I4dfe0194e02dc657403d3c0c7162528ec7a597c2
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 4a7a15c2 03-Dec-2024 Alexander Hansen <alexander.hansen@9elements.com>

dbus event subscription: add timestamp

Get the timestamp from dbus
xyz.openbmc_project.Logging.Entry 'Timestamp' property.

This is then transformed into 'EventTimestamp' property.

Tested: Manually

dbus event subscription: add timestamp

Get the timestamp from dbus
xyz.openbmc_project.Logging.Entry 'Timestamp' property.

This is then transformed into 'EventTimestamp' property.

Tested: Manually tested [1]

This is already done in this way for the polling api,
in log_services.hpp

1455 objectToFillOut["Created"] =
1456 redfish::time_utils::getDateTimeUintMs(entry.Timestamp);

using the same function. So there is nothing new here.

[1] https://discord.com/channels/775381525260664832/1285909954095616050/1327330501937205382

Change-Id: I49670b13d609ac54a5c9d21da9ff1697c7524b5d
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...


# 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 ...