You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/kubernetes/logs/collect-logs.md
+21-6Lines changed: 21 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,16 +25,31 @@ As of version 6.2.18-3, the log collector tool has two modes:
25
25
1. Download the latest [`log_collector.py`](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/log_collector/log_collector.py) file.
26
26
27
27
1. Have a K8s administrator run the script on the system that runs your `kubectl` or `oc` commands.
28
-
- Pass `-n` parameter to run on a different namespace than the one you are currently on
29
-
- Pass `-m` parameter to change the log collector mode (`all` or `restricted`)
30
-
- Run with `-h` to see more options
31
28
32
29
```bash
33
-
python log_collector.py
30
+
python log_collector.py
34
31
```
35
32
36
-
{{< note >}} If you get an error because the yaml module is not found, install the pyYAML module with `pip install pyyaml`.
37
-
{{< /note >}}
33
+
## Options
34
+
35
+
You can run `log_collector.py` with the following options:
36
+
37
+
| Option | Description |
38
+
|--------|-------------|
39
+
|`-n`, `--namespace`| Sets the namespace(s) to collect from. Can be set to a single namespace, or multiple namespaces (comma-separated). When left empty, will use the current context's namespace from kubeconfig. |
40
+
| `-o`, `--output_dir` | Sets the output directory. Defaults to current working directory. |
41
+
| `-a`, `--logs_from_all_pods` | Collect logs from all pods in the selected namespace(s), and otherwise collect only from the operator and pods run by the operator. |
42
+
| `-t`, `--timeout` | Time to wait for external commands to finish execution (Linux only). Default to 180s. Specify 0 to disable timeout. |
43
+
| `--k8s_cli` | The K8s cli client to use (kubectl/oc/auto-detect). Defaults to auto-detect (chooses between 'kubectl' and 'oc'). Full paths can also be used. |
44
+
| `-m`, `--mode` | Controls which resources are collected. In 'restricted' mode, only resources associated with the operator and have the label 'app=redis-enterprise' are collected. In 'all' mode, all resources are collected. Defaults to 'restricted' mode. |
45
+
| `--collect_istio` | Collect data from istio-system namespace to debug potential problems related to istio ingress method. |
0 commit comments