Dell 自動化平台:如何擷取記錄套裝以進行故障診斷

Summary: 本文說明如何擷取記錄套裝以故障診斷問題 Dell 自動化平台 (內部部署)

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

此工具旨在收集內部部署安裝的所有 Dell 自動化平台 Kubernetes 記錄。它也會收集原生 Kubernetes 記錄,並收集目前狀態的 Pod 說明。它會收集系統記錄和 journald 日誌也是如此。收集後,它會創建一個壓縮包提供給工程團隊。其並非設計用於軟體即服務 (SAAS) Dell 自動化平台安裝。

此工具會穿越 Dell 自動化平台和 Knative Pod 並列出其中的容器。如需釐清,請參閱以下範例。 hzp-product-svc

root@labmachine01:/nas/tools# kubectl get po -n hzp hzp-product-svc-00001-deployment-5695678c66-79zwm -o jsonpath="{.spec.containers[*].name}"
hzp-ese-svc hzp-product-svc queue-proxy hzp-iam-proxy

例如,使用者在 tarball

root@labmachine01:/nas/tools# tar -tf /tmp/native_edge_eo-logs_default_2023-08-30T07-13-39.750/native_edge_eo-logs_default_2023-08-30T07-13-39.750.tar.gz | grep product
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-iam-proxy.current.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-product-svc.current.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-product-svc-00001-deployment-5695678c66-79zwm.hzp-iam-proxy-init.init.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-product-svc-00001-deployment-5695678c66-79zwm.describe
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-ese-svc.previous.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/queue-proxy.current.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/queue-proxy.previous.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-ese-svc.current.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-product-svc.previous.log
./native_edge_eo-logs_default_2023-08-30T07-13-39.750/hzp/hzp-product-svc-00001-deployment-5695678c66-79zwm/hzp-iam-proxy.previous.log

因此,這些檔案以以下結構儲存:

namespace/pod-name/namespace-container.log

用法:
首先,使用者必須連線並登入您的 Dell 自動化平台虛擬機器。

然後,使用者必須啟用根權限 (sudo -i su 如果已啟用)。

若要收集所有相關記錄,使用者必須下載名為 logs_pkb.zip 從本文到 Dell 自動化平台虛擬機器。

解壓縮安裝程式的內容。

unzip logs_pkb.zip -d logs-tool

移至該目錄並執行指令檔:

./logs.sh

執行後,使用者會看到有關可用空間的資訊訊息和繼續操作的提示 (輸入「y」以繼續):

This script will access your local k3s secrets (secret values are not going to be printed).
This script will collect all logs from all pods in NativeEdge-controlled namespaces and archive it in tarball.
Please press "y" if you agree with this.
You have 69G available on your storage. Consider that logs may require to have more that 1Gb of free space.

從版本 1.0-rc 開始,記錄收集工具會偵測 NativeEdge 或 Dell 自動化平台是否安裝在非預設命名空間中。如果工具找不到標準命名空間,它會提示使用者輸入有效的業務流程協調程式命名空間。請參閱以下範例

Available namespaces:
- default
- nativeedge
- kube-node-lease
- kube-public
- kube-system
- longhorn-system
- metallb-system
Warning: Namespace 'hzp' not found.
Please enter the namespace containing the 'nativeedge' containers:

如果有預設的命名空間安裝,該工具將顯示哪些命名空間在集合清單中:

Namespace 'hzp' found. Logs will be collected from following namespaces:
- hzp
- kube-system
- istio-system
- knative-eventing
- knative-serving
- longhorn-system

事件擷取:

從工具的 0.9 版開始,系統會提示使用者有關 EdgeOrchestrator/Dell 自動化平台事件擷取:

Do you want to collect the EO events (WARNING: this may require significant space on disk)?

此功能會將事件從 EdgeOrchestrator/Dell 自動化平台直接擷取至記錄中 tarball 並改進了故障排除。建議在您擁有足夠空間的機器中取得 EdgeOrchestrator/Dell 自動化平台事件。

如果使用者有其他說明,使用者可以在執行之前檢查指令檔的可用選項:

./logs.sh -h

使用者可以使用以下方式檢查目前版本:

logs.sh -v

略過資料庫集合

默認情況下,啟用資料庫收集,因為需要捕獲業務流程協調程式和門戶資料庫才能進行故障排除。若要略過資料庫收集,請使用 --skip-database 旗標
./logs.sh --skip-database
在執行過程中,將顯示以下確認訊息:
Skipping PostgreSQL database dump (--skip-database flag set)

 

Additional Information

此工具適用於 1.0 及更高版本的所有內部部署 Dell 自動化平台安裝版本。
此工具適用於所有 NativeEdge Orchestrator 2.0 及更高版本。

Affected Products

Dell Automation Platform, Dell Automation Platform Components
Article Properties
Article Number: 000216838
Article Type: How To
Last Modified: 21 Aug 2026
Version:  18
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.