Gohai skill override settings
The Gohai skill reports node attribute data to Chef 360 Platform.
Role requirements
To create or modify skill override settings, you must use a profile with the node-manager role.
Update Gohai skill override settings
To update override settings for the Gohai skill, follow these steps:
Create a JSON file that defines the skill’s settings:
{ "skillName":"chef-gohai", "settings":[ { "name":"log_level", "value":"info" }, { "name":"log_file_path", "value":"/hab/svc/chef-gohai/logs/logs.log" }, { "name":"log_to_file", "value": true }, { "name":"log_to_stdout", "value": false }, { "name":"poll_interval", "value":"3600s" }, { "name":"max_size", "value":"100MB" }, { "name":"retention_days", "value":"7" }, { "name":"is_log_retention", "value":"true" } ] }Modify the JSON file using the following setting descriptions:
log_level- Sets the logging verbosity level.
Default:
"info"Valid values:
"debug","info","warn","error" log_file_path- Specifies the file path where logs should be written when
"log_to_file"is enabled.Default:
"/hab/svc/chef-gohai/logs/logs.log" log_to_file- Controls whether log messages are written to a log file.
Default:
true log_to_stdout- Controls whether log messages are written to standard output (console).
Default:
false poll_interval- Specifies how frequently chef-gohai collects and sends system data to Chef 360 Platform.
Default:
"1800s"(30 minutes)Supported units:
s(seconds),m(minutes),h(hours)Examples:
"1s"- Send data every 1 second"5m"- Send data every 5 minutes"1h"- Send data every 1 hour
max_size- Maximum size limit for individual log files before rotation.
Default:
"100MB" retention_days- Number of days to retain log files before deletion.
Default:
"7" is_log_retention- Enables or disables automatic log file retention and cleanup.
Default:
"true"
Get the override settings ID with the
find-all-settingscommand:chef-node-management-cli management setting find-all-settings \ --profile <PROFILE_NAME>Update the Gohai skill’s override settings with the
update-skillSettingssubcommand:chef-node-management-cli management setting update-skillSettings \ --skillName chef-gohai \ --settingId <SETTING_ID> \ --body-file <PATH_TO_JSON_FILE> \ --profile <NODE_MANAGER_PROFILE_NAME>The response is similar to the following:
{ "item": { "settingId": "31e1b6f2-3044-49f9-96b9-335672c140b7" } }Optional: After you’ve updated the override settings, you have to assign them to a node cohort before the settings are updated on nodes. To update a cohort with these settings, use the
cohort assign-settingcommand:chef-node-management-cli management cohort assign-setting \ --settingId <settingId> \ --cohortId <COHORT_ID> \ --profile <NODE_MANAGER_PROFILE_NAME>