Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit 9bb8068

Browse files
pebrcalaudazzithbkrkr
authored
Switch to eck-diagnostics 1.0.1 and remove eckdump.sh (elastic#4927)
Co-authored-by: Arianna Laudazzi <[email protected]> Co-authored-by: Arianna Laudazzi <[email protected]> Co-authored-by: Thibault Richard <[email protected]>
1 parent 53865df commit 9bb8068

File tree

6 files changed

+20
-392
lines changed

6 files changed

+20
-392
lines changed

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV KIND_VERSION_0_8=0.8.1
1313
ENV KIND_VERSION_0_9=0.9.0
1414
ENV OPENSHIFT_TOOLS_VERSION=4.7.0
1515
ENV EKSCTL_VERSION=0.34.0
16-
ENV ECK_DIAG_VERSION=1.0.0
16+
ENV ECK_DIAG_VERSION=1.0.1
1717

1818
# golangci-lint
1919
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \

docs/operating-eck/troubleshooting.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif::[]
1313
1414
If you are an existing Elastic customer with a support contract, you can create a ticket in the link:https://support.elastic.co/[Elastic Support Portal] and provide the following information so that we can help you.
1515

16-
- <<{p}-take-eck-dump, ECK dump>>
16+
- <<{p}-take-eck-dump, Run eck-diagnostics>>
1717
- link:https://github.com/elastic/support-diagnostics[Elasticsearch diagnostics package]
1818
1919

docs/operating-eck/troubleshooting/take-eck-dump.asciidoc

Lines changed: 16 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -5,191 +5,50 @@ link:https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-{page_id}.html[View
55
****
66
endif::[]
77
[id="{p}-{page_id}"]
8-
= Take ECK Dump
9-
10-
11-
Steps to take ECK dump:
8+
= Run eck-diagnostics
129

10+
`eck-diagnostics` is a stand-alone command line tool to create a diagnostic archive to help troubleshoot issues with ECK.
1311
[float]
1412
== Prepare
1513

16-
To download the ECK dump shell file and change mode to executable, run:
14+
The tool is available at https://github.com/elastic/eck-diagnostics/. You can find detailed installation instructions there.
15+
1716

18-
["source", "sh", subs="attributes"]
19-
------------------------------------------------
20-
curl -L -O https://raw.githubusercontent.com/elastic/cloud-on-k8s/master/support/diagnostics/eck-dump.sh && chmod +x eck-dump.sh
21-
------------------------------------------------
2217

2318
[float]
2419
== Run
2520

26-
Make sure to set the correct options. Check here for link:https://github.com/elastic/cloud-on-k8s/blob/master/support/diagnostics/eck-dump.sh[the latest version].
21+
The eck-diagnostics tool supports various command line flags. Run it with `-h` or `--help` to print all available options. The only required flag is `-r` or `--resources-namespace` which indicates the namespaces where your Elastic stack resources are deployed.
22+
There is also `-o` or `--operator-namespaces` that indicate where the ECK operator is deployed. If you don't specify this flag the tool assumes the operator to be deployed in the `elastic-system` namespace.
2723

2824
[source,bash]
2925
----
30-
Options:
31-
-N, --operator-namespaces Namespace(s) in which operator(s) are running in (comma-separated list)
32-
-n, --resources-namespaces Namespace(s) in which resources are managed (comma-separated list)
33-
-o, --output-directory Path to output dump files
34-
-z, --create-zip Create an archive with the dump files (implies --output-directory)
35-
-v, --verbose Verbose mode
26+
eck-diagnostics -o <operator-namespaces> -r <resources-namespaces>
3627
----
3728

38-
Command:
39-
40-
[source,bash]
41-
----
42-
./eck-dump.sh -o <path/to/output/dump/files> [-z] [-v] -N <operator namespace> -n <resources namespace>
43-
----
29+
By default, the tool automatically runs link:https://github.com/elastic/support-diagnostics[support diagnostics] for every Elasticsearch cluster and Kibana instance. This requires the temporary deployment of additional Pods into the Kubernetes cluster. If this is not what you want, you can turn off the feature by specifying the `--run-stack-diagnostics=false` flag.
4430

4531

4632
[float]
4733
== Example
4834

49-
Here is an example:
5035

51-
- Assuming the operator namespace is `elastic-system` and resources namespaces are `security` and `monitoring`
52-
- Generate dump log to current folder with `eck-dump-log` prefix
53-
- Also zip it
36+
Assuming the ECK operator is deployed in a namespace called `operators` and Elastic stack resources are deployed in the `security` and `monitoring` namespaces, you should run `eck-diagnostics` as follows:
5437

5538
[source,bash]
5639
----
57-
./eck-dump.sh -o eck-dump-log -z -N "elastic-system" -n "security,monitoring"
40+
eck-diagnostics -o=operators -r=security,monitoring
5841
----
5942

6043
Sample output:
6144

6245
[source,bash]
6346
----
64-
ECK info dumped to eck-dump-log-15_ 7_2021_15_52_45.tgz
47+
2021/10/06 20:34:20 ECK diagnostics with parameters: {DiagnosticImage:docker.elastic.co/eck-dev/support-diagnostics:8.1.4 ECKVersion: Kubeconfig: OperatorNamespaces:[operators] ResourcesNamespaces:[security monitoring] OutputDir:/tmp RunStackDiagnostics:true Verbose:false}
48+
2021/10/06 20:34:22 Extracting Kubernetes diagnostics from operators
49+
2021/10/06 20:34:23 ECK version is 1.8.0
50+
2021/10/06 20:34:23 Extracting Kubernetes diagnostics from security
51+
2021/10/06 20:34:23 Extracting Kubernetes diagnostics from monitoring
52+
2021/10/06 20:34:24 ECK diagnostics written to /tmp/eck-diagnostic-2021-10-06T20-34-21.zip
6553
----
6654

67-
Directory structure of the output files. The output may vary depending on the configuration.
68-
69-
[source,bash]
70-
----
71-
tree -A -L 10 eck-dump-log
72-
eck-dump-log
73-
├── clusterroles.txt
74-
├── elastic-system
75-
│ ├── agent.json
76-
│ ├── apmserver.json
77-
│ ├── beat.json
78-
│ ├── configmaps.json
79-
│ ├── controllerrevisions.json
80-
│ ├── daemonsets.json
81-
│ ├── deployments.json
82-
│ ├── elasticmapsserver.json
83-
│ ├── elasticsearch.json
84-
│ ├── endpoints.json
85-
│ ├── enterprisesearch.json
86-
│ ├── events.json
87-
│ ├── kibana.json
88-
│ ├── networkpolicies.json
89-
│ ├── persistentvolumeclaims.json
90-
│ ├── persistentvolumes.json
91-
│ ├── pod
92-
│ │ └── elastic-operator-0
93-
│ │ └── logs.txt
94-
│ ├── poddisruptionbudgets.txt
95-
│ ├── pods.json
96-
│ ├── replicasets.json
97-
│ ├── secrets.txt
98-
│ ├── services.json
99-
│ └── statefulsets.json
100-
├── monitoring
101-
│ ├── agent.json
102-
│ ├── apmserver.json
103-
│ ├── beat.json
104-
│ ├── configmaps.json
105-
│ ├── controllerrevisions.json
106-
│ ├── daemonsets.json
107-
│ ├── deployments.json
108-
│ ├── elasticmapsserver.json
109-
│ ├── elasticsearch.json
110-
│ ├── endpoints.json
111-
│ ├── enterprisesearch.json
112-
│ ├── events.json
113-
│ ├── kibana.json
114-
│ ├── networkpolicies.json
115-
│ ├── persistentvolumeclaims.json
116-
│ ├── persistentvolumes.json
117-
│ ├── pod
118-
│ │ ├── apm-01-prod-apm-server-8485b5bf97-j6g25
119-
│ │ │ └── logs.txt
120-
│ │ ├── apm-01-prod-apm-server-8485b5bf97-jxc6g
121-
│ │ │ └── logs.txt
122-
│ │ ├── apm-01-prod-es-master-0
123-
│ │ │ └── logs.txt
124-
│ │ ├── apm-01-prod-kb-b56645bb9-4kxlq
125-
│ │ │ └── logs.txt
126-
│ │ ├── apm-01-prod-kb-b56645bb9-5m2mb
127-
│ │ │ └── logs.txt
128-
│ │ ├── apm-01-prod-kb-c6d58674f-bcd62
129-
│ │ │ └── logs.txt
130-
│ │ ├── apm-01-prod-kb-c6d58674f-cjfzm
131-
│ │ │ └── logs.txt
132-
│ │ ├── apm-01-prod-kb-df76dbfff-9nhvx
133-
│ │ │ └── logs.txt
134-
│ │ ├── logs-01-prod-es-master-0
135-
│ │ │ └── logs.txt
136-
│ │ ├── logs-01-prod-es-master-1
137-
│ │ │ └── logs.txt
138-
│ │ ├── logs-01-prod-es-master-2
139-
│ │ │ └── logs.txt
140-
│ │ ├── logs-01-prod-kb-8599b565cf-4s9n2
141-
│ │ │ └── logs.txt
142-
│ │ ├── logs-01-prod-kb-8599b565cf-cx5wv
143-
│ │ │ └── logs.txt
144-
│ │ ├── logs-02-prod-es-master-0
145-
│ │ │ └── logs.txt
146-
│ │ ├── logs-02-prod-kb-7fff9c5fc6-pnlb2
147-
│ │ │ └── logs.txt
148-
│ │ ├── metrics-01-prod-es-master-0
149-
│ │ │ └── logs.txt
150-
│ │ └── metrics-01-prod-kb-7ffccd6747-cdqhw
151-
│ │ └── logs.txt
152-
│ ├── poddisruptionbudgets.txt
153-
│ ├── pods.json
154-
│ ├── replicasets.json
155-
│ ├── secrets.txt
156-
│ ├── services.json
157-
│ └── statefulsets.json
158-
├── nodes.json
159-
├── podsecuritypolicies.json
160-
├── security
161-
│ ├── agent.json
162-
│ ├── apmserver.json
163-
│ ├── beat.json
164-
│ ├── configmaps.json
165-
│ ├── controllerrevisions.json
166-
│ ├── daemonsets.json
167-
│ ├── deployments.json
168-
│ ├── elasticmapsserver.json
169-
│ ├── elasticsearch.json
170-
│ ├── endpoints.json
171-
│ ├── enterprisesearch.json
172-
│ ├── events.json
173-
│ ├── kibana.json
174-
│ ├── networkpolicies.json
175-
│ ├── persistentvolumeclaims.json
176-
│ ├── persistentvolumes.json
177-
│ ├── pod
178-
│ │ ├── siem-01-prod-es-master-0
179-
│ │ │ └── logs.txt
180-
│ │ ├── siem-01-prod-kb-554b496d8c-hk8js
181-
│ │ │ └── logs.txt
182-
│ │ ├── siem-02-prod-es-master-0
183-
│ │ │ └── logs.txt
184-
│ │ └── siem-02-prod-kb-855f7dbdc-bh6ks
185-
│ │ └── logs.txt
186-
│ ├── poddisruptionbudgets.txt
187-
│ ├── pods.json
188-
│ ├── replicasets.json
189-
│ ├── secrets.txt
190-
│ ├── services.json
191-
│ └── statefulsets.json
192-
└── version.json
193-
194-
28 directories, 92 files
195-
----

hack/diagnostics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This resource has been moved to a [new location](../../support/diagnostics/) within the top level [support](../../support) folder.
1+
You can find the support diagnostics tool for ECK at https://github.com/elastic/eck-diagnostics.

support/diagnostics/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
You can find the support diagnostics tool for ECK at https://github.com/elastic/eck-diagnostics.

0 commit comments

Comments
 (0)