Chef has added features to many of our tools which help to provide an appropriate amount of detail to help us help you. Here are some examples of how to gather the types of information which can help us, categorized by product.
When sharing terminal output, please be sure to always save terminal output into plaintext files with host-node identifying names and attach those to the support ticket. Zendesk alters the format of text which is submitted through the web interface and email, which can mean important context is lost. In addition, alternate formats like screenshots, PDFs, and Word Documents can be difficult for us to view depending on how and where we're working on your ticket. Use a code text editor like Visual Studio Code, Notepad++, vi, or emacs to create the text file, so extra formatting characters from your editor don't alter the text coming from the terminal.
Chef Infra Server
This is also what should be used on frontends in Chef Backend HA deployments
chef-server-ctl gather-logs
The result of this command is a tarball which should be attached to support tickets.
If you get a message like this:
$ chef-server-ctl gather-logs
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
Use your Linux distribution's package manager to install 'bzip2', otherwise your log bundle may be incomplete. It's also possible to get a zero-length tarball as a result if 'bzip2' hasn't been installed.
Chef Backend HA
This should only be used on the backends in Chef Backend HA deployments, see above for Chef Infra Server instructions to gather logs from frontends.
chef-backend-ctl gather-logs
The result of this command is a tarball which should be attached to support tickets.
Chef Automate
This should only be used for single-node Chef Automate deployments.
chef-automate gather-logs
The result of this command is a file which should be attached to support tickets.
Chef Automate Cluster
This should only be used for Chef Automate Cluster deployments. Chef Automate Cluster is an offering requiring professional services for setup and periodic ongoing maintenance.
To generate log bundles for Chef Support, go to the bastion system where you've got the cluster management tooling installed, and run (help command shown for example)
/hab/a2_deploy_workspace/scripts/gather-logs --help
/hab/a2_deploy_workspace/scripts/gather-logs --sudo-password=xxxx
The result of this command should be attached to support tickets.
Chef Infra Client
There are various files which could be useful for troubleshooting failed client runs, here are some examples, beginning with the most commonly useful.
To run Chef Infra Client with debug logging and output to a hostname- and time-stamped file:
chef-client --log_level debug 2>&1 | tee -a $(hostname)-chef-client-debug-$(date -u +"%Y-%m-%dT%H:%M:%SZ").log
For chef-client versions >= 14.0.202
, trace
provides much more granular detail:
chef-client --log_level trace 2>&1 | tee -a $(hostname)-chef-client-trace-$(date -u +"%Y-%m-%dT%H:%M:%SZ").log
The result of this command should be attached to support tickets.
Chef InSpec
There are various outputs which could be useful for troubleshooting issues with Chef InSpec, here are some examples, beginning with the most commonly useful.
inspec --log-level=debug --diagnose 2>&1 | tee -a $(hostname)-inspec-debug-$(date -u +"%Y-%m-%dT%H:%M:%SZ").log
The result of this command should be attached to support tickets.
Chef Habitat
There are various outputs which could be useful for troubleshooting issues in Chef Habitat, the most commonly useful when you're working on a Linux Habitat system is output from journald.
journalctl -u NAME-OF-HABITAT-SERVICE
Please be sure to save terminal output into plaintext files with host-node identifying names and attach those to the support ticket, as Zendesk alters the format of text which is submitted through the web interface and email.
For more involved Habitat component logging ( Supervisor, Builder, Depot, Applications and Automate Application groups) please see:
Comments
0 comments
Article is closed for comments.