GitXplorerGitXplorer
d

redfish-event-experiment

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
0aad57b7349f024e6696f7b04cace450d2df4762

include context in dump output

ddhellmann committed 4 years ago
Verified
9de13015aee3fcd3b6fd3d4599684c0ebd043284

update gofish to version with protocol and context arguments

ddhellmann committed 4 years ago
Verified
fae936ac3eab1b8c7c58d047b7be93f3df4319af

extend readme

ddhellmann committed 4 years ago
Verified
3be0b319dd0d950a10ac65d2c72bb87a54577b38

add readme

ddhellmann committed 4 years ago
Verified
e4380652dc8bff49da6a0085d10363b776ee810b

switch to using config file instead of command line args

ddhellmann committed 4 years ago
Verified
d1182da552a95020c8e207b0ed7056c9547a9b09

use tls for receiver since idrac requires it

ddhellmann committed 4 years ago

README

The README file for this repository.

Experimenting with Redfish Event Subscription

Config files

Copy config.yaml.example to config.yaml and modify the BMC settings and the IP address for the receiver endpoint.

Data dumper

dump/main.go shows some settings for the BMC, including existing event subscriptions.

go run ./dump/main.go

Receiver

receiver/main.go is a web server that dumps the event notifications to the console. To run it

  1. First, use make_certs.sh to generate certificates (you may need to modify openssl.conf to change the hostname for the certs).

  2. Then run

    go run ./receiver/main.go
    

Register the receiver

register/main.go configures the BMC to send events to the receiver service.

go run ./register/main.go

Testing

After the receiver is registered, using the dumper should trigger a login event notification. The output on the console will look something like this.

$ go run ./receiver/main.go
listening on https://10.8.1.133:9090

[POST] /: "{\"Context\":\"Public\",\"EventId\":\"8491\",\"EventTimestamp\":\"2020-11-13T15:22:43-0500\",\"EventType\":\"Alert\",\"MemberId\":\"f35299c0-25ed-11eb-a058-588a5afa1cc4\",\"Message\":\"Successfully logged in using Username, from 10.8.1.133 and REDFISH.\",\"MessageArgs\":[\"Username\",\"10.8.1.133\",\"REDFISH\"],\"MessageArgs@odata.count\":3,\"MessageId\":\"USR0030\",\"OriginOfCondition\":\"iDRAC.Embedded.1\",\"Severity\":\"Informational\"}\n"
Accept: */*
Content-Length: 394
Content-Type: application/json

The web UI for the BMC also includes a way to send test events. The input must be a valid message ID, as defined by the hardware. One value that works for Dell is CPU0001.

Cleaning up

unsubscribe/main.go removes a subscription from the BMC. Use the dumper program to get the URI, then pass it on the command line.

go run ./unsubscribe/main.go /redfish/v1/EventService/Subscriptions/f35299c0-25ed-11eb-a058-588a5afa1cc4