1### YAML Configuration 2 3YAML is a human friendly data serialization standard for all programming 4languages. 5 6Refer: https://yaml.org/ 7 8YAML is the main orchestrator in terms of how the user arranges the data to be 9collected in this log collection tool. The better context and syntax usage would 10improve the execution, parsing and data collection feeds to the collector 11engine. 12 13### YAML Rules 14 15The collector parser and engine needs a very minimal set of rules user need to 16follow while writing a YAML block. The YAML standards applies as usual. 17 18``` 19<Block identifier> 20 <Sub block for a given protocol group>: 21 COMMANDS: 22 - <command> 23 FILES: 24 - <file name to save log> 25 PROTOCOL: 26 - <supported currently SSH, TELNET, SCP, SHELL> 27``` 28 29This block statement in YAML one must follow for the collector to do operation 30successfully. 31 32COMMANDS, FILES, PROTOCOL is mandatory for all YAML block. 33 34Note: The FILES directive is not needed for protocol using SCP (Refer YAML Block 35Example) 36 37### YAML Block Examples 38 39Generic syntax usage: 40 41``` 42OPENBMC: 43 OPENBMC_LOGS: 44 COMMANDS: 45 - 'peltool -l >/tmp/PEL_logs_list.json' 46 FILES: 47 - '/tmp/PEL_logs_list.json' 48 PROTOCOL: 49 - 'SSH' 50 51 # DUMP_LOGS: This section provides option to 'SCP if file exist'. 52 DUMP_LOGS: 53 COMMANDS: 54 - 'ls -AX /var/lib/systemd/coredump/core.*' 55 PROTOCOL: 56 - 'SCP' 57 58 # File contains the data returned from 'redfishtool GET URL' 59 REDFISH_LOGS: 60 COMMANDS: 61 - redfishtool -u ${username} -p ${password} -r ${hostname} -S Always raw GET /redfish/v1/AccountService/Accounts 62 FILES: 63 - 'REDFISH_bmc_user_accounts.json' 64 PROTOCOL: 65 - 'REDFISH' 66 67 # Commands and Files to collect for via out of band IPMI. 68 IPMI_LOGS: 69 COMMANDS: 70 - ipmitool -I lanplus -C 17 -U ${username} -P ${password} -H ${hostname} lan print 71 FILES: 72 - 'IPMI_LAN_print.txt' 73 PROTOCOL: 74 - 'IPMI' 75 76``` 77 78Example of using plugin in YAML (Refer plugin documentation) 79 80``` 81OPENBMC: 82 REDFISH_LOGS: 83 COMMANDS 84 - plugin: 85 - plugin_name: plugin.redfish.enumerate_request 86 - plugin_args: 87 - ${hostname} 88 - ${username} 89 - ${password} 90 - /redfish/v1/ 91 - json 92 FILES: 93 - 'REDFISH_enumerate_v1.json' 94 PROTOCOL: 95 - 'REDFISH' 96``` 97