簡介
本檔案介紹在偵錯模式下收集Cisco IOS託管閘道聯結器日誌的過程。
必要條件
需求
使用完全管理員許可權訪問控制中心。
訪問本地網關的CLI(命令列介面)。
對聯結器GuestShell的訪問。
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- 聯結器應用程式(GuestShell)
- Cisco IOS XE軟體版本:17.15.01安
- 指令碼版本:3.1.1
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
網關聯結器是在Cisco IOS XE GuestShell容器上安裝並運行的小型應用程式,可幫助維護與控制中心的安全連線、協調事件並收集狀態資訊。
如果聯結器出現問題,則需要聯結器日誌處於調試級別以進行故障排除。
在調試級別收集網關聯結器日誌的步驟
步驟1.使用控制檯或SSH連線登入到網關,將下一個命令複製並貼上到路由器exec命令提示符下:
tclsh https://binaries.webex.com/ManagedGatewayScriptProdStable/gateway_onboarding.tcl
附註:您可以在任何指定點直接使用tclsh bootflash:gateway_connector/gateway_onboarding.tcl或tclsh https://binaries.webex.com/ManagedGatewayScriptProdStable/gateway_onboarding.tcl啟動(或重新啟動)TCL指令碼。
步驟2.顯示聯結器主選單:
===============================================================
Webex Managed Gateway Connector
===============================================================
Options
s : Display Status Page
v : View and Modify Cloud Connector Settings
e : Enable Guestshell
d : Disable Guestshell
l : Collect Logs
r : Clear Logs
u : Uninstall Connector
p : Apply Patch
q : Quit
===============================================================
Select an option from the menu:
按v選擇View and Modify Cloud Connector Settings選項。
步驟3.在下一個選單中,按l以修改Cloud Connector的日誌級別。
===============================================================
Webex Managed Gateway Connector
===============================================================
Script Version : 3.1.1
Hostname/IP Addr : X.X.X.X
DNS Server(s) : X.X.X.X 8.8.8.8
X.X.X.X
Gateway Username : doctorx
External Interface : GigabitEthernet2
===============================================================
Options
c : Update Gateway Credentials
e : Update External Interface
p : Update Proxy Details
n : Update DNS Server
k : Update Connector Package Verification Key
l : Modify log level for Cloud Connector
h : Go to home menu
q : Quit
===============================================================
Select an option from the menu:
步驟4.從下一個選單中,選擇雲聯結器的日誌級別。
===============================================
Number Log Level
===============================================
1 DEBUG
2 INFO
3 WARNING
4 ERROR
5 CRITICAL
===============================================
步驟5.按1將日誌級別設定為DEBUG。
===============================================================
Webex Managed Gateway Connector
===============================================================
Cloud Connector log level is set to : 1
===============================================
Number Log Level
===============================================
1 DEBUG
===============================================
===============================================================
Select option h for home menu or q to quit:
步驟6.按h轉到「首頁」選單。
===============================================================
Webex Managed Gateway Connector
===============================================================
Options
s : Display Status Page
v : View and Modify Cloud Connector Settings
e : Enable Guestshell
d : Disable Guestshell
l : Collect Logs
r : Clear Logs
u : Uninstall Connector
p : Apply Patch
q : Quit
===============================================================
Select an option from the menu:
步驟7.復制問題,然後選擇l以獲取聯結器日誌。完成後,命令列將顯示:
===============================================================
Webex Managed Gateway Connector
===============================================================
Log files are collected and stored at location
bootflash:/guest-share/gateway_webex_cloud_logs_2025025014034.tar.gz
===============================================================
Select option h for home menu or q to quit:
步驟8.複製開機畫面URL,然後按q退出GuestShell。
附註:您可以使用tclsh bootflash:gateway_connector/gateway_onboarding.tcl直接從bootflash記憶體中重新啟動TCL指令碼,從而防止網關在運行該命令時下載指令碼。
匯出聯結器日誌
聯結器日誌儲存在bootflash目錄中。您可以使用FTP、SCP、TFTP、SFTP和其他檔案傳輸網路通訊協定,這取決於您的喜好。
此範例假設使用TFTP伺服器傳輸聯結器記錄,請根據需要加以修改。
步驟1.在網關CLI中新增下一個命令。
Router#copy bootflash:/guest-share/gateway_webex_cloud_logs_2025025014034.tar.gz tftp:///.tar.gz
步驟2.輸入TFTP伺服器地址。
Address or name of remote host []?
步驟3.確認檔案名稱,然後按下Enter鍵。
Destination filename [gateway_webex_cloud_logs_2025025014034.tar.gz]?
!!
32137 bytes copied in 4.714 secs (6817 bytes/sec)
Router#
步驟4.tar檔案上傳到Cisco TAC案件。