Replicated built-in support bundles
Any Replicated installation has a built-in way to generate support bundles. These can include custom files collected from application containers and output from commands that also run in application containers. General format looks like this (starting at the root element)
support:
timeout: 300
files:
- filename: ...
source:
replicated:
component: Nginx
container: my-nginx
....
commands:
- command: [tail, -n1000, /var/log/nginx/access.log]
filename: ...
source:
replicated:
component: Nginx
container: my-nginx
...
More information can be found in Replicated Help Center for Native and Swarm schedulers.
Troubleshoot
The Troubleshoot product allows more flexibility in customizing support bundles. More information is available in Replicated Help Center, and full spec can be found here.
files:
Container files can be included by defining docker.container-cp
item for each file or directory to be collected.
collect:
v1:
- docker.container-cp:
timeout_seconds: 300
src_path: /var/log/nginx/access.log
container: supergoodtool-www
output_dir: /www/access/
In this block:
-
timeout_seconds
is equivalent to the globaltimeout
value -
src_path
is equivalent tofilename
-
container
is the container name from which to collect logs. It replaces thesource
section which identifies the containers associated with the Replicated component/container YAML section. However this requires that container be named. As an alternative, the new support bundle allows selecting containers by labels. In case of Swarm, service names can also be specified. -
output_dir
has no equivalent in the original format. The value ofsrc_path
would be used to generate the path in the support bundle.
commands:
Commands can be executed in application containers and their output included in support bundle by defining docker.container-exec
item for each command.
collect:
v1:
- docker.container-exec:
timeout_seconds: 300
exec_config:
Cmd:
- nginx
- '-t'
container: supergoodtool-www
output_dir: /www/debug/
In this block:
-
timeout_seconds
is equivalent to the globaltimeout
value -
exec_config
is equivalent tocommand
-
container
is the container name in which the command will be executed. It replaces thesource
section which identifies the containers associated with the Replicated component/container YAML section. However this requires that container be named. As an alternative, the new support bundle allows selecting containers by labels. In case of Swarm, service names can also be specified. -
output_dir
replacesfilename