Skip to content

MI3xx AFID_SAG.json Serviceability plugin#233

Open
alexandraBara wants to merge 21 commits into
developmentfrom
alex_serviceability
Open

MI3xx AFID_SAG.json Serviceability plugin#233
alexandraBara wants to merge 21 commits into
developmentfrom
alex_serviceability

Conversation

@alexandraBara

@alexandraBara alexandraBara commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

-Serviceability plugin to service MI3XX with an afid_sag.json file. This file is given by AMD with NDA to customers and node-scraper does not provide it.
-The plugin is intended to be run with a hub that would analyze the redfish events from the collector part. This is also distribuited through NDA.

For customers without NDA the plugin does provide Redfish events collection.

Test plan

  • pytest test/unit
  • pytest test/functional (if applicable)
  • pre-commit run --all-files

Checklist

  • Added/updated tests (or explained why not)
  • Updated docs/README if behavior changed
  • No secrets or credentials committed
    Sample collection only run:
 node-scraper --connection-config connection-config.json 
--plugin-configs=plugin_config_serviceability_coll.json
  2026-06-22 16:22:52 CDT       INFO               nodescraper | Log path: ./scraper_logs_ausalexbara02_2026_06_22-04_22_52_PM
  2026-06-22 16:22:52 CDT       INFO               nodescraper | System Name: ausalexbara02
  2026-06-22 16:22:52 CDT       INFO               nodescraper | System location: SystemLocation.LOCAL
  2026-06-22 16:22:52 CDT       INFO               nodescraper | --------------------------------------------------     
  2026-06-22 16:22:52 CDT       INFO               nodescraper | Running plugin ServiceabilityPluginMI3XX
  2026-06-22 16:22:52 CDT       INFO               nodescraper | Initializing connection: RedfishConnectionManager      
  2026-06-22 16:22:52 CDT       INFO               nodescraper | Connecting to Redfish at <>
  2026-06-22 16:22:52 CDT       INFO               nodescraper | Running data collector: MI3XXCollector
  2026-06-22 16:22:52 CDT       INFO               nodescraper | Serviceability: event log Redfish URI /redfish/v1/Systems/UBB/LogServices/EventLog/Entries (follow_next_link=True)
  2026-06-22 16:22:59 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) Fetched CPER attachment for Redfish event 1513 (376 bytes)
  2026-06-22 16:22:59 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) Fetched CPER attachment for Redfish event 1522 (408 bytes)
  2026-06-22 16:23:00 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) Fetched CPER attachment for Redfish event 1525 (376 bytes)
  2026-06-22 16:23:00 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) Fetched CPER attachment for Redfish event 1541 (376 bytes)
  2026-06-22 16:23:00 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) Collected 4 CPER attachment(s) for analyzer decode
  2026-06-22 16:23:00 CDT       INFO               nodescraper | Serviceability: firmware inventory Redfish GET /redfish/v1/UpdateService/FirmwareInventory
  2026-06-22 16:23:00 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) Collected 2683 event log member(s)
  2026-06-22 16:23:00 CDT       INFO               nodescraper | Running data analyzer: MI3XXAnalyzer
  2026-06-22 16:23:00 CDT       INFO               nodescraper | (ServiceabilityPluginMI3XX) ServiceabilityAnalyzerArgsare required
  2026-06-22 16:23:00 CDT       INFO               nodescraper | Closing connections
  2026-06-22 16:23:00 CDT       INFO               nodescraper | Running result collators
  2026-06-22 16:23:00 CDT       INFO               nodescraper | Running TableSummary result collator
  2026-06-22 16:23:00 CDT       INFO               nodescraper | 

+--------------------------+--------+-----------------------------+
| Connection               | Status | Message                     |
+--------------------------+--------+-----------------------------+
| RedfishConnectionManager | OK     | task completed successfully |
+--------------------------+--------+-----------------------------+

+---------------------------+--------+-------------------------------------+
| Plugin                    | Status | Message                             |
+---------------------------+--------+-------------------------------------+
| ServiceabilityPluginMI3XX | OK     | Plugin tasks completed successfully |
+---------------------------+--------+-------------------------------------+

  2026-06-22 16:23:00 CDT       INFO               nodescraper | Data written to csv file: ./scraper_logs_ausalexbara02_2026_06_22-04_22_52_PM/nodescraper.csv

See log folder for details on collected data:

 ls ./scraper_logs_ausalexbara02_2026_06_22-04_22_52_PM/serviceability_plugin_MI3XX/MI3XX_collector/
command_artifacts.json            redfish_responses.json            serviceability_uri_manifest.json
firmware_inventory.json           result.json

Sample plugin_config.json used:

cat plugin_config_serviceability_coll.json 
{
  "name": "ServiceabilityPlugin",
  "desc": "Collect and analyze BMC event log",
  "global_args": {},
  "plugins": {
    "ServiceabilityPluginMI3XX": {
      "collection_args": {
        "uri": "/redfish/v1/Systems/UBB/LogServices/EventLog/Entries",
        "rf_firmware_bundle_uri": "/redfish/v1/UpdateService/FirmwareInventory",
        "follow_next_link": true,
        "max_pages": 200
      }
    }
  },
  "result_collators": {}
}

filtered.append(member)
return filtered

def is_cper_event(self, event: dict) -> bool:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be overkill, but recommend the following for CPER detection. Current implementation might treat something as being a CPER that isn't if a truthy AdditionalDataURI is returned

return "CPER" in event and str(event.get("DiagnosticDataType", "")).upper() == "CPER" and bool(event.get("AdditionalDataURI"))

oem = event.get("Oem")
if not isinstance(oem, dict):
return []
raw = oem.get("AMDFieldIdentifiers")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nesting may change here (e.g. event["Oem"]["AMDFieldIdentifiers"] or event["Oem"]["AMD"]["AMDFieldIdentifiers"])

if not isinstance(item, dict):
continue
for key in ("AFID", "Afid", "afid"):
if key in item and item[key] is not None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could fetch/check once
if (v := item.get(key)) is not None:
try:
out.append(int(v))



def _err_data_arr_entries(event: dict[str, Any]) -> list[dict[str, Any]]:
oem = event.get("Oem")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above may be Oem ->ErrDataArr or Oem -> AMD -> ErrDataArr

if _nonempty_serial_in_mapping(meta):
return True
decoded = entry.get("DecodedData")
if _nonempty_serial_in_mapping(decoded):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Believe this would always evaluate to false - recommend removing for loop content after checking if non-empty serial is present in meta


from typing import Any

# Redfish CPER (RF) style AFIDs start at this value; lower values are in-band /

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redfish method is in 10K range
CPER method is <= 34

RF events can report the CPER method AFIDs (e.g. shared with IB CPERs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants