Skip to content

Commit

Permalink
Merge pull request #1 from phelpdh/wsman-logging-via-nb-redfish
Browse files Browse the repository at this point in the history
Add SEL/LC logging via inventory microservice.  Expose through northb…
  • Loading branch information
phelpdh authored May 20, 2017
2 parents 4e3b72f + bb91fa4 commit 76716c9
Show file tree
Hide file tree
Showing 7 changed files with 814 additions and 379 deletions.
32 changes: 32 additions & 0 deletions data/views/redfish-1.0/wsman.1.0.0.lclogentry.1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/$entity",
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.recordId %>",
"@odata.type": "#LogEntry.1.0.0.LogEntry",
"Oem": {
"Dell":{
"Log Name": "<%= entry.logName %>",
"Category": "<%= entry.category %>",
"Entry Id": "<%= entry.instanceId %>",
"Severity": "<%= entry.severity %>",
"Comment": "<%= entry.comment %>",
"Agent": "<%= entry.agentId %>",
"fqdd": "<%= entry.fqdd %>",
"Raw Event Data": "<%= entry.rawEventData %>",
"Sequence Number": "<%= entry.sequenceNumber %>"
}
},
"Id": "<%= entry.recordId %>",
"Name": "<%= entry.elementName %>",
"EntryType": "Oem",
"Created": "<%= entry.creationTimeStamp %>",
"OemRecordFormat": "",
"Message": "<%= entry.message %>",
"MessageId": "<%= entry.messageId %>",
"MessageArgs": ["<%= entry.messageArguments %>"],
"Links": {
"Oem": {},
"OriginOfCondition": {
"@odata.id": "<%= entry.origin || 'null' %>"
}
}
}
44 changes: 44 additions & 0 deletions data/views/redfish-1.0/wsman.1.0.0.lclogentrycollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/Entries",
"@odata.id": "<%= url %>",
"@odata.type": "#LogEntryCollection.LogEntryCollection",
"Oem" : {},
"Name": "Log Service Entry Collection",
"[email protected]": <%= logEntries.length %>,
"Members": [
<% logEntries.forEach(function(entry, i, arr) { %>
{
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.recordId %>",
"@odata.type": "#LogEntry.1.0.0.LogEntry",
"Oem": {
"Dell":{
"Log Name": "<%= entry.logName %>",
"Category": "<%= entry.category %>",
"Severity": "<%= entry.severity %>",
"Comment": "<%= entry.comment %>",
"Agent": "<%= entry.agentId %>",
"fqdd": "<%= entry.fqdd %>",
"Raw Event Data": "<%= entry.rawEventData %>",
"Sequence Number": "<%= entry.sequenceNumber %>"
}
},
"Id": "<%= entry.recordId %>",
"Name": "<%= entry.elementName %>",
"EntryType": "<%= type %>",
"Created": "<%= entry.creationTimeStamp %>",
"OemRecordFormat": "",
"EntryCode": "<%= entry.instanceId %>",
"Message": "<%= entry.message %>",
"MessageId": "<%= entry.messageId %>",
"MessageArgs": ["<%= entry.messageArguments %>"],
"Links": {
"Oem": {},
"OriginOfCondition": {
"@odata.id": "<%= entry.origin || 'null' %>"
}
}
}
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
<% }); %>
]
}
25 changes: 25 additions & 0 deletions data/views/redfish-1.0/wsman.1.0.0.logentry.1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/$entity",
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.logId %>",
"@odata.type": "#LogEntry.1.0.0.LogEntry",
"Oem": {
"Dell":{
"instanceID": "<%= entry.instanceID %>",
"perceivedSeverity": "<%= entry.perceivedSeverity %>"
}
},
"Id": "<%= entry.recordID %>",
"Name": "<%= entry.elementName %>",
"EntryType": "<%= type %>",
"Created": "<%= entry.creationTimeStamp %>",
"OemRecordFormat": "",
"Message": "<%= entry.recordData %>",
"MessageId": "",
"MessageArgs": [],
"Links": {
"Oem": {},
"OriginOfCondition": {
"@odata.id": "<%= entry.origin || 'null' %>"
}
}
}
38 changes: 38 additions & 0 deletions data/views/redfish-1.0/wsman.1.0.0.logentrycollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"@odata.context" : "<%= basepath %>/$metadata#Systems/Links/Members/<%= identifier %>/LogServices/Members/<%=type%>/Entries",
"@odata.id": "<%= url %>",
"@odata.type": "#LogEntryCollection.LogEntryCollection",
"Oem" : {},
"Name": "Log Service Entry Collection",
"[email protected]": <%= logEntries.length %>,
"Members": [
<% logEntries.forEach(function(entry, i, arr) { %>
{
"@odata.id": "<%= basepath %>/Systems/<%=identifier%>/LogServices/<%=type%>/Entries/<%= entry.recordID %>",
"@odata.type": "#LogEntry.1.0.0.LogEntry",
"Oem": {
"Dell":{
"Log Name": "<%= entry.logName %>",
"Instance Id": "<%= entry.instanceID %>",
"Perceived Severity": "<%= entry.perceivedSeverity %>"
}
},
"Id": "<%= entry.recordID %>",
"Name": "<%= entry.elementName %>",
"EntryType": "<%= type %>",
"Created": "<%= entry.creationTimeStamp %>",
"OemRecordFormat": "",
"Message": "<%= entry.recordData %>",
"MessageId": "",
"MessageArgs": [],
"Links": {
"Oem": {},
"OriginOfCondition": {
"@odata.id": "<%= entry.origin || 'null' %>"
}
}
}
<%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
<% }); %>
]
}
Loading

0 comments on commit 76716c9

Please sign in to comment.