Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit 76716c9

Browse files
authored
Merge pull request #1 from phelpdh/wsman-logging-via-nb-redfish
Add SEL/LC logging via inventory microservice. Expose through northb…
2 parents 4e3b72f + bb91fa4 commit 76716c9

7 files changed

Lines changed: 814 additions & 379 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/$entity",
3+
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.recordId %>",
4+
"@odata.type": "#LogEntry.1.0.0.LogEntry",
5+
"Oem": {
6+
"Dell":{
7+
"Log Name": "<%= entry.logName %>",
8+
"Category": "<%= entry.category %>",
9+
"Entry Id": "<%= entry.instanceId %>",
10+
"Severity": "<%= entry.severity %>",
11+
"Comment": "<%= entry.comment %>",
12+
"Agent": "<%= entry.agentId %>",
13+
"fqdd": "<%= entry.fqdd %>",
14+
"Raw Event Data": "<%= entry.rawEventData %>",
15+
"Sequence Number": "<%= entry.sequenceNumber %>"
16+
}
17+
},
18+
"Id": "<%= entry.recordId %>",
19+
"Name": "<%= entry.elementName %>",
20+
"EntryType": "Oem",
21+
"Created": "<%= entry.creationTimeStamp %>",
22+
"OemRecordFormat": "",
23+
"Message": "<%= entry.message %>",
24+
"MessageId": "<%= entry.messageId %>",
25+
"MessageArgs": ["<%= entry.messageArguments %>"],
26+
"Links": {
27+
"Oem": {},
28+
"OriginOfCondition": {
29+
"@odata.id": "<%= entry.origin || 'null' %>"
30+
}
31+
}
32+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/Entries",
3+
"@odata.id": "<%= url %>",
4+
"@odata.type": "#LogEntryCollection.LogEntryCollection",
5+
"Oem" : {},
6+
"Name": "Log Service Entry Collection",
7+
"Members@odata.count": <%= logEntries.length %>,
8+
"Members": [
9+
<% logEntries.forEach(function(entry, i, arr) { %>
10+
{
11+
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.recordId %>",
12+
"@odata.type": "#LogEntry.1.0.0.LogEntry",
13+
"Oem": {
14+
"Dell":{
15+
"Log Name": "<%= entry.logName %>",
16+
"Category": "<%= entry.category %>",
17+
"Severity": "<%= entry.severity %>",
18+
"Comment": "<%= entry.comment %>",
19+
"Agent": "<%= entry.agentId %>",
20+
"fqdd": "<%= entry.fqdd %>",
21+
"Raw Event Data": "<%= entry.rawEventData %>",
22+
"Sequence Number": "<%= entry.sequenceNumber %>"
23+
}
24+
},
25+
"Id": "<%= entry.recordId %>",
26+
"Name": "<%= entry.elementName %>",
27+
"EntryType": "<%= type %>",
28+
"Created": "<%= entry.creationTimeStamp %>",
29+
"OemRecordFormat": "",
30+
"EntryCode": "<%= entry.instanceId %>",
31+
"Message": "<%= entry.message %>",
32+
"MessageId": "<%= entry.messageId %>",
33+
"MessageArgs": ["<%= entry.messageArguments %>"],
34+
"Links": {
35+
"Oem": {},
36+
"OriginOfCondition": {
37+
"@odata.id": "<%= entry.origin || 'null' %>"
38+
}
39+
}
40+
}
41+
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
42+
<% }); %>
43+
]
44+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/$entity",
3+
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.logId %>",
4+
"@odata.type": "#LogEntry.1.0.0.LogEntry",
5+
"Oem": {
6+
"Dell":{
7+
"instanceID": "<%= entry.instanceID %>",
8+
"perceivedSeverity": "<%= entry.perceivedSeverity %>"
9+
}
10+
},
11+
"Id": "<%= entry.recordID %>",
12+
"Name": "<%= entry.elementName %>",
13+
"EntryType": "<%= type %>",
14+
"Created": "<%= entry.creationTimeStamp %>",
15+
"OemRecordFormat": "",
16+
"Message": "<%= entry.recordData %>",
17+
"MessageId": "",
18+
"MessageArgs": [],
19+
"Links": {
20+
"Oem": {},
21+
"OriginOfCondition": {
22+
"@odata.id": "<%= entry.origin || 'null' %>"
23+
}
24+
}
25+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/Entries",
3+
"@odata.id": "<%= url %>",
4+
"@odata.type": "#LogEntryCollection.LogEntryCollection",
5+
"Oem" : {},
6+
"Name": "Log Service Entry Collection",
7+
"Members@odata.count": <%= logEntries.length %>,
8+
"Members": [
9+
<% logEntries.forEach(function(entry, i, arr) { %>
10+
{
11+
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.recordID %>",
12+
"@odata.type": "#LogEntry.1.0.0.LogEntry",
13+
"Oem": {
14+
"Dell":{
15+
"Log Name": "<%= entry.logName %>",
16+
"Instance Id": "<%= entry.instanceID %>",
17+
"Perceived Severity": "<%= entry.perceivedSeverity %>"
18+
}
19+
},
20+
"Id": "<%= entry.recordID %>",
21+
"Name": "<%= entry.elementName %>",
22+
"EntryType": "<%= type %>",
23+
"Created": "<%= entry.creationTimeStamp %>",
24+
"OemRecordFormat": "",
25+
"Message": "<%= entry.recordData %>",
26+
"MessageId": "",
27+
"MessageArgs": [],
28+
"Links": {
29+
"Oem": {},
30+
"OriginOfCondition": {
31+
"@odata.id": "<%= entry.origin || 'null' %>"
32+
}
33+
}
34+
}
35+
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
36+
<% }); %>
37+
]
38+
}

0 commit comments

Comments
 (0)