Skip to content

Commit 43e7320

Browse files
Merge pull request #155 from amd/development
dev -> main
2 parents c871c87 + e247709 commit 43e7320

93 files changed

Lines changed: 9450 additions & 3406 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 141 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ system debug.
1414
- ['run-plugins' sub command](#run-plugins-sub-command)
1515
- ['gen-plugin-config' sub command](#gen-plugin-config-sub-command)
1616
- ['compare-runs' subcommand](#compare-runs-subcommand)
17+
- ['show-redfish-oem-allowable' subcommand](#show-redfish-oem-allowable-subcommand)
1718
- ['summary' sub command](#summary-sub-command)
1819
- [Configs](#configs)
1920
- [Global args](#global-args)
@@ -85,7 +86,7 @@ options:
8586
--sys-platform STRING
8687
Specify system platform (default: None)
8788
--plugin-configs [STRING ...]
88-
built-in config names or paths to plugin config JSONs. Available built-in configs: NodeStatus (default: None)
89+
built-in config names or paths to plugin config JSONs. Available built-in configs: AllPlugins, NodeStatus (default: None)
8990
--system-config STRING
9091
Path to system config json (default: None)
9192
--connection-config STRING
@@ -116,6 +117,8 @@ node-scraper --sys-name <remote_host> --sys-location REMOTE --connection-config
116117
117118
##### Example: connection_config.json
118119
120+
In-band (SSH) connection:
121+
119122
```json
120123
{
121124
"InBandConnectionManager": {
@@ -128,6 +131,24 @@ node-scraper --sys-name <remote_host> --sys-location REMOTE --connection-config
128131
}
129132
```
130133
134+
Redfish (BMC) connection for Redfish-only plugins:
135+
136+
```json
137+
{
138+
"RedfishConnectionManager": {
139+
"host": "bmc.example.com",
140+
"port": 443,
141+
"username": "admin",
142+
"password": "secret",
143+
"use_https": true,
144+
"verify_ssl": true,
145+
"api_root": "redfish/v1"
146+
}
147+
}
148+
```
149+
150+
- `api_root` (optional): Redfish API path (e.g. `redfish/v1`). If omitted, the default `redfish/v1` is used. Override this when your BMC uses a different API version path.
151+
131152
**Notes:**
132153
- If using SSH keys, specify `key_filename` instead of `password`.
133154
- The remote user must have permissions to run the requested plugins and access required files. If needed, use the `--skip-sudo` argument to skip plugins requiring sudo.
@@ -319,6 +340,112 @@ node-scraper compare-runs path1 path2 --include-plugins DmesgPlugin --dont-trunc
319340
320341
You can pass multiple plugin names to `--skip-plugins` or `--include-plugins`.
321342
343+
#### **'show-redfish-oem-allowable' subcommand**
344+
The `show-redfish-oem-allowable` subcommand fetches the list of OEM diagnostic types supported by your BMC (from the Redfish LogService `OEMDiagnosticDataType@Redfish.AllowableValues`). Use it to discover which types you can put in `oem_diagnostic_types_allowable` and `oem_diagnostic_types` in the Redfish OEM diag plugin config.
345+
346+
**Requirements:** A Redfish connection config (same as for RedfishOemDiagPlugin).
347+
348+
**Command:**
349+
```sh
350+
node-scraper --connection-config connection-config.json show-redfish-oem-allowable --log-service-path "redfish/v1/Systems/UBB/LogServices/DiagLogs"
351+
```
352+
353+
Output is a JSON array of allowable type names (e.g. `["Dmesg", "JournalControl", "AllLogs", ...]`). Copy that list into your plugin config’s `oem_diagnostic_types_allowable` if you want to match your BMC.
354+
355+
**Redfish OEM diag plugin config example**
356+
357+
Use a plugin config that points at your LogService and lists the types to collect. Logs are written under the run log path (see `--log-path`).
358+
359+
```json
360+
{
361+
"name": "Redfish OEM diagnostic logs",
362+
"desc": "Collect OEM diagnostic logs from Redfish LogService. Requires Redfish connection config.",
363+
"global_args": {},
364+
"plugins": {
365+
"RedfishOemDiagPlugin": {
366+
"collection_args": {
367+
"log_service_path": "redfish/v1/Systems/UBB/LogServices/DiagLogs",
368+
"oem_diagnostic_types_allowable": [
369+
"JournalControl",
370+
...
371+
"AllLogs",
372+
],
373+
"oem_diagnostic_types": ["JournalControl", "AllLogs"],
374+
"task_timeout_s": 600
375+
},
376+
"analysis_args": {
377+
"require_all_success": false
378+
}
379+
}
380+
},
381+
"result_collators": {}
382+
}
383+
```
384+
385+
- **`log_service_path`**: Redfish path to the LogService (e.g. DiagLogs). Must match your system (e.g. `UBB` vs. another system id).
386+
- **`oem_diagnostic_types_allowable`**: Full list of types the BMC supports (from `show-redfish-oem-allowable` or vendor docs).
387+
- **`oem_diagnostic_types`**: Subset of types to collect on each run (e.g. `["JournalControl", "AllLogs"]`).
388+
- **`task_timeout_s`**: Max seconds to wait per collection task.
389+
390+
**How to use**
391+
392+
1. **Discover allowable types** (optional): run `show-redfish-oem-allowable` and paste the output into `oem_diagnostic_types_allowable` in your plugin config.
393+
2. **Set `oem_diagnostic_types`** to the list you want to collect (e.g. `["JournalControl", "AllLogs"]`).
394+
3. **Run the plugin** with a Redfish connection config and your plugin config:
395+
```sh
396+
node-scraper --connection-config connection-config.json --plugin-config plugin_config_redfish_oem_diag.json run-plugins RedfishOemDiagPlugin
397+
```
398+
4. Use **`--log-path`** to choose where run logs (and OEM diag archives) are written; archives go under `<log-path>/scraper_logs_<name>_<timestamp>/redfish_oem_diag_plugin/redfish_oem_diag_collector/`.
399+
400+
#### **RedfishEndpointPlugin**
401+
402+
The RedfishEndpointPlugin collects Redfish URIs (GET responses) and optionally runs checks on the returned JSON. It requires a Redfish connection config (same as RedfishOemDiagPlugin).
403+
404+
**How to run**
405+
406+
1. Create a connection config (e.g. `connection-config.json`) with `RedfishConnectionManager` and your BMC host, credentials, and API root.
407+
2. Create a plugin config with `uris` to collect and optional `checks` for analysis (see example below). For example save as `plugin_config_redfish_endpoint.json`.
408+
3. Run:
409+
```sh
410+
node-scraper --connection-config connection-config.json --plugin-config plugin_config_redfish_endpoint.json run-plugins RedfishEndpointPlugin
411+
```
412+
413+
**Sample plugin config** (`plugin_config_redfish_endpoint.json`):
414+
415+
```json
416+
{
417+
"name": "RedfishEndpointPlugin",
418+
"desc": "Redfish endpoint: collect URIs and optional checks",
419+
"global_args": {},
420+
"plugins": {
421+
"RedfishEndpointPlugin": {
422+
"collection_args": {
423+
"uris": [
424+
"/redfish/v1/",
425+
"/redfish/v1/Systems/1",
426+
"/redfish/v1/Chassis/1/Power"
427+
]
428+
},
429+
"analysis_args": {
430+
"checks": {
431+
"/redfish/v1/Systems/1": {
432+
"PowerState": "On",
433+
"Status/Health": { "anyOf": ["OK", "Warning"] }
434+
},
435+
"/redfish/v1/Chassis/1/Power": {
436+
"PowerControl/0/PowerConsumedWatts": { "max": 1000 }
437+
}
438+
}
439+
}
440+
}
441+
},
442+
"result_collators": {}
443+
}
444+
```
445+
446+
- **`uris`**: List of Redfish paths (e.g. `/redfish/v1/`, `/redfish/v1/Systems/1`) to GET and store.
447+
- **`checks`**: Optional. Map of URI to expected values or constraints for analysis. Supports exact match (e.g. `"PowerState": "On"`), `anyOf`, `min`/`max`, etc.
448+
322449
#### **'summary' sub command**
323450
The 'summary' subcommand can be used to combine results from multiple runs of node-scraper to a
324451
single summary.csv file. Sample run:
@@ -370,7 +497,11 @@ Below is an example that skips sudo requiring plugins and disables analysis.
370497
```
371498
372499
#### Plugin config: **'--plugin-configs' command**
373-
A plugin config can be used to compare the system data against the config specifications:
500+
A plugin config can be used to compare the system data against the config specifications.
501+
Built-in configs include **NodeStatus** (a subset of plugins) and **AllPlugins** (runs every
502+
registered plugin with default arguments—useful for generating a reference config from the full system).
503+
504+
Using a JSON file:
374505
```sh
375506
node-scraper --plugin-configs plugin_config.json
376507
```
@@ -431,10 +562,16 @@ Here is an example of a comprehensive plugin config that specifies analyzer args
431562
This command can be used to generate a reference config that is populated with current system
432563
configurations. Plugins that use analyzer args (where applicable) will be populated with system
433564
data.
434-
Sample command:
565+
566+
**Run all registered plugins (AllPlugins config):**
435567
```sh
436-
node-scraper --gen-reference-config run-plugins BiosPlugin OsPlugin
568+
node-scraper --plugin-config AllPlugins
437569
570+
```
571+
572+
**Generate a reference config for specific plugins:**
573+
```sh
574+
node-scraper --gen-reference-config run-plugins BiosPlugin OsPlugin
438575
```
439576
This will generate the following config:
440577
```json

0 commit comments

Comments
 (0)