Conversation
| DATA_MODEL = NetworkDataModel | ||
|
|
||
| # Regex patterns for error fields checked from network statistics | ||
| ERROR_FIELD_PATTERNS = [ |
There was a problem hiding this comment.
please turn these into AnalyzerArgs, we can default them to what you have here. The user should be able to extend these regexes, so if user provides error_regex (i think we should name them error_regex instead of error_field_patterns, to keep consistent with how other plugins name it, see dmesg) in the plugin_config.json those values should be appended to this list.
| # | ||
| # MIT License | ||
| # | ||
| # Copyright (c) 2025 Advanced Micro Devices, Inc. |
|
|
||
|
|
||
| class NetworkAnalyzerArgs(AnalyzerArgs): | ||
| error_regex: Optional[Union[list[ErrorRegex], list[dict]]] = None |
There was a problem hiding this comment.
please make this a pydantic field and add a short description like here:
then it gets picked up by the doc generator script - we need to description for this table: https://github.com/amd/node-scraper/blob/development/docs/PLUGIN_DOC.md|
|
||
| error_regex: Optional[Union[list[ErrorRegex], list[dict]]] = Field( |
There was a problem hiding this comment.
it fails for me
(base) jaspals@smci350-zts-gtu-f10-15:~/node-scraper$ node-scraper run-plugins NetworkPlugin --error-regex '{"regex":"^rx_total_frames$"}' 2026-03-31 19:25:50 UTC INFO nodescraper | Log path: ./scraper_logs_smci350_zts_gtu_f10_15_2026_03_31-07_25_50_PM usage: node-scraper run-plugins NetworkPlugin [-h] [--collection {True,False}] [--analysis {True,False}] [--system-interaction-level STRING] [--data STRING] [--url STRING] [--netprobe {ping,wget,curl}] [--error-regex [JSON_STRING ...]] node-scraper run-plugins NetworkPlugin: error: argument --error-regex: invalid dict value: '{"regex":"^rx_total_frames$"}' (base) jaspals@smci350-zts-gtu-f10-15:~/node-scraper$
There was a problem hiding this comment.
according to the -h, i think it has to be a list of strings not a dict:
[--error-regex [JSON_STRING ...]]
so maybe try:
node-scraper run-plugins NetworkPlugin --error-regex ["^rx_total_frames$"]
? i think it just doesnt like the format you have
Add initial network (ethtool) analyzer. There is a need to ensure Tx PFC frames are zero at all times.