1sos-collector(1) General Commands Manual sos-collector(1)
2
3
4
6 sos-collector - Collect sosreports from multiple (cluster) nodes
7
9 sos-collector
10 [-a|--all-options]
11 [-b|--become]
12 [--batch]
13 [-c CLUSTER_OPTIONS]
14 [--chroot CHROOT]
15 [--case-id CASE_ID]
16 [--cluster-type CLUSTER_TYPE]
17 [-e ENABLE_PLUGINS]
18 [--group GROUP]
19 [--save-group GROUP]
20 [--insecure-sudo]
21 [-k PLUGIN_OPTION]
22 [--label LABEL]
23 [-n SKIP_PLUGINS]
24 [--nodes NODES]
25 [--no-pkg-check]
26 [--no-local]
27 [--master MASTER]
28 [-o ONLY_PLUGINS]
29 [-p SSH_PORT]
30 [--password]
31 [--password-per-node]
32 [--preset PRESET]
33 [-s|--sysroot SYSROOT]
34 [--ssh-user SSH_USER]
35 [--sos-cmd SOS_CMD]
36 [-t|--threads THREADS]
37 [--timeout TIMEOUT]
38 [--tmp-dir TMP_DIR]
39 [-v|--verbose]
40 [--verify]
41 [-z|--compression-type COMPRESSION_TYPE]
42
43
45 sos-collector is a utility to collect sosreports from multiple nodes
46 and package them in a single useful tar archive.
47
48 sos-collector can be run either on a workstation that has SSH key
49 authentication setup for the nodes in a given cluster, or from a "mas‐
50 ter" node in a cluster that has SSH keys configured for the other
51 nodes.
52
53 Some sosreport options are supported by sos-collector and are passed
54 directly to the sosreport command run on each node.
55
56
58 -a, --alloptions
59 Enables all sosreport options.
60
61 This does NOT enable all sos-collector options.
62
63 -b, --become
64 Become the root user on the remote node when connecting as a
65 non-root user.
66
67 --batch
68 Run in non-interactive mode. This will skip prompts for user
69 input, with the exception of a prompt for the SSH password.
70
71 --all-logs
72 Sosreport option. Collects all logs regardless of size.
73
74 Default: no
75
76 -c CLUSTER_OPTIONS
77 Specify options used by cluster profiles. The format is 'pro‐
78 file.option_name=value'.
79
80 For example, for the ovirt plugin if you wanted to restrict node
81 enumeration to a specific cluster you would use '-c ovirt.clus‐
82 ter=example_cluster'.
83
84 Available cluster options can be listed by running 'sos-collec‐
85 tor -l'.
86
87 --chroot CHROOT
88 Sosreport option. Set the chroot mode. When --sysroot is used
89 commands default to executing with SYSROOT as the root direc‐
90 tory. This can be overridden by setting --chroot to "always"
91 (always chroot) or "never" (always run in the host namespace).
92
93 --case-id CASE_ID
94 Sosreport option. Specifies a case number identifier.
95
96 --cluster-type CLUSTER_TYPE
97 When run by itself, sos-collector will attempt to identify the
98 type of cluster at play. This is done by checking package or
99 configuration information against the localhost, or the master
100 node if "--master" is supplied.
101
102 Setting --cluster-type skips this step and forcibly sets a par‐
103 ticular profile.
104
105 Using a value of none or jbon (just a bunch of nodes) will
106 effectively disable all cluster-specific checks, and cause sos-
107 collector to only use the nodes specified by the --nodes option.
108 Note that in this scenario, regex string(s) for node names will
109 be ignored.
110
111 Example: sos-collector --cluster-type=kubernetes will force the
112 kubernetes profile to be run, and thus set sosreport options and
113 attempt to determine a list of nodes using that profile.
114
115 -e ENABLE_PLUGINS, --enable-plugins ENABLE_PLUGINS
116 Sosreport option. Use this to enable a plugin that would other‐
117 wise not be run.
118
119 This option supports providing a comma-delimited list of plug‐
120 ins.
121
122 --group GROUP
123 Specify an existing host group definition to use.
124
125 Host groups are pre-defined settings for the cluster-type, mas‐
126 ter, and nodes options saved in JSON-formatted files under
127 /var/lib/sos-collector/<GROUP>.
128
129 If cluster_type and/or master are set in the group, sos-collec‐
130 tor behaves as if these values were specified on the command-
131 line.
132
133 If nodes is defined, sos-collector extends the --nodes option,
134 if set, with the nodes or regexes listed in the group.
135
136 Note that sos-collector will only write group definitions to
137 /var/lib/sos-collector/ however the GROUP value may be a file‐
138 name for any group definitions that exist outside of the default
139 location. If you are manually writing these files, use the value
140 null when a python NoneType is expected. Caveat: use string
141 'none' if setting cluster_type to none.
142
143 --save-group GROUP
144 Save the results of this run of sos-collector to a host group
145 definition.
146
147 sos-colllector will write a JSON-formatted file with name GROUP
148 to /var/lib/sos-collector/ with the settings for cluster-type,
149 master, and the node list as discovered by cluster enumeration.
150 Note that this means regexes are not directly saved to host
151 groups, but the results of matching against those regexes are.
152
153 --insecure-sudo
154 Use this option when connecting as a non-root user that has
155 passwordless sudo configured.
156
157 If this option is omitted and a bogus sudo password is supplied,
158 collection of sosreports may exhibit unexpected behavior and/or
159 fail entirely.
160
161 -k PLUGIN_OPTION, --plugin-option PLUGIN_OPTION
162 Sosreport option. Set a plugin option to a particular value.
163 This takes the form of plugin_name.option_name=value.
164
165 Example: To enable the kubernetes "all" option in sosreport use
166 -k kubernetes.all=on.
167
168 --label LABEL
169 Specify a label to be added to the archive names. This label
170 will be applied to both the sos-collector archive and the sosre‐
171 port archives.
172
173 If a cluster sets a default label, the user-provided label will
174 be appended to that cluster default.
175
176 -n SKIP_PLUGINS, --skip-plugins SKIP_PLUGINS
177 Sosreport option. Disable (skip) a particular plugin that would
178 otherwise run. This is useful if a particular plugin is prone
179 to hanging for one reason or another.
180
181 This option supports providing a comma-delimited list of plug‐
182 ins.
183
184 --nodes NODES
185 Provide a comma-delimited list of nodes to collect sosreports
186 from, or a regex string to be used to compare discovered node
187 names against. If using a regex, only nodes matching the regex
188 will be used - i.e. it can be used as a whitelist but not a
189 blacklist.
190
191 This option can be handed multiple regex strings separated by
192 commas. Additionally, both whole node names/addresses and regex
193 strings may be provided at the same time.
194
195 --no-pkg-check
196 Do not perform package checks. Most cluster profiles check
197 against installed packages to determine if the cluster profile
198 should be applied or not.
199
200 Use this with --cluster-type if there are rpm or apt issues on
201 the master/local node.
202
203 --no-local
204 Do not collect a sosreport from the local system.
205
206 If --master is not supplied, it is assumed that the host running
207 sosreport is part of the cluster that is to be collected. Use
208 this option to skip collection of a local sosreport.
209
210 This option is NOT needed if --master is provided.
211
212 --master MASTER
213 Specify a master node for the cluster.
214
215 If provided, then sos-collector will check the master node, not
216 localhost, for determining the type of cluster in use.
217
218 -o ONLY_PLUGINS, --only-plugins ONLY_PLUGINS
219 Sosreport option. Run ONLY the plugins listed.
220
221 Note that a cluster profile will NOT override this option. This
222 may cause the sosreports generated to not contain the relevant
223 output for a given type of cluster.
224
225 This option supports providing a comma-delimited list of plug‐
226 ins.
227
228 --password
229 Specifying this option will cause sos-collector to prompt the
230 user for an SSH password that will be used to connect to all
231 nodes.
232
233 If you have differing passwords for the same user across cluster
234 nodes, you should ideally deploy SSH keys, but the --pass‐
235 word-per-node option is also available.
236
237 --password-per-node
238 When using this option, sos-collector will prompt the user for
239 the SSH password for each node that will have an sosreport col‐
240 lected from it individually before attempting to connect to the
241 nodes.
242
243 --preset PRESET
244 Specify a sos preset to use, note that this requires sos-3.6 or
245 later to be installed on the node. The given preset must also
246 exist on the remote node - local presets are not used.
247
248 If --preset is specified and a given node either does not have
249 that preset defined, or has a version of sos prior to 3.6, this
250 option is ignored for that node.
251
252 -p SSH_PORT, --ssh-port SSH_PORT
253 Specify SSH port for all nodes. Use this if SSH runs on any port
254 other than 22.
255
256 --ssh-user SSH_USER
257 Specify an SSH user for sos-collector to connect to nodes with.
258 Default is root.
259
260 sos-collector will prompt for a sudo password for non-root
261 users.
262
263 -s SYSROOT, --sysroot SYSROOT
264 Sosreport option. Specify an alternate root file system path.
265
266 --sos-cmd SOS_CMD
267 Define all options that sosreport should be run with on the
268 nodes. This will override any other commandline options as well
269 as any options specified by a cluster profile.
270
271 The sosreport command will execute as 'sosreport --batch
272 SOS_CMD'. The BATCH option cannot be removed from the sosreport
273 command as it is required to run sosreport non-interactively for
274 sos-collector to function.
275
276 -t THREADS --threads THREADS
277 Specify the number of threads to use for concurrent collection
278 of sosreports.
279
280 If the number of nodes enumerated exceeds the number of threads,
281 then sos-collector will start collecting from the first X number
282 of nodes and then continue to iterate through the remaining
283 nodes as sosreport collection finishes.
284
285 Defaults to 4.
286
287 --timeout TIMEOUT
288 Timeout for sosreport generation on each node, in seconds.
289
290 Note that sosreports are collected in parallel, so this can also
291 be considered to be approximately the same as a timeout for the
292 entire collection process.
293
294 Default is 180 seconds.
295
296 --tmp-dir TMP_DIR
297 Specify a temporary directory to save sos archives to. By
298 default one will be created in /tmp and then removed after sos-
299 collector has finished running.
300
301 This is NOT the same as specifying a temporary directory for
302 sosreport on the remote nodes.
303
304 -v --verbose
305 Print debug information to screen.
306
307 --verfiy
308 Sosreport option. Passes the "--verify" option to sosreport on
309 the nodes which causes sosreport to validate plugin-specific
310 data during collection.
311
312 Note that this option may considerably extend the time it takes
313 sosreport to run on the nodes. Consider increasing --timeout
314 when using this option.
315
316 -z COMPRESSION, --compression-type COMPRESSION
317 Sosreport option. Override the default compression type.
318
319
321 sosreport(1)
322
323
325 Jake Hunsaker <jhunsake@redhat.com>
326
327
328
329 April 2018 sos-collector(1)