Redfish Event Listener in PowerShell
The Redfish specification supports event mechanism through which the target Redfish devices can send events from different components in the system to an event listener. The PSRedfishEventListener project provides an event listener that is create in native PowerShell.
Full documentation of commands with examples is available at: https://psredfishlistener.readthedocs.io/en/latest/
Example Workflow
- Start an event listener using the
Start-PSRedfishEventListener
command.
|
|
The above command will start new event listener that is bound to a specific IP address on the local host and to port 9090. The log path will be set to C:\RedfishEvents.
- Perform registration on a Redfish Endpoint to send alerts to the listener. This is done using the
Register-PSRedfishEventSubscription
command.
|
|
The above command will register (create an event subscription) Redfish device 172.16.100.21 to send all event types to listener at https://172.16.102.76.
- Test event subscription using the
Send-PSRedfishTestEvent
.
|
|
The above command will submit a test event from Redfish device with an IP address 172.16.100.21 to the event listener at 172.16.102.76. The event type and message ID will be set to the defaults defined by the function.
4.Stop the event listener using the Stop-PSRedfishEventListener
command.
|
|
I have a few new features lined up for the next release. Similar to PowerShell object events, with the upcoming release, you will be able to tag an action associated to a specific event type from all Redfish device source or a specific source.
Share on: