簡介
本檔案介紹如何在安全網路分析(SNA)流量收集器中開啟Proxy Watch/Proxy Ingest Service的偵錯日誌。
背景資訊
有時需要從SNA流量收集器代理接收功能的代理解析器啟用調試日誌。
代理接收功能是SNA流量收集器的固有功能,支援從思科網路安全裝置(WSA)、McAfee、Bluecoat和Squid接收代理日誌。
要配置此服務,請檢視適用於您的Secure Network Analytics版本的相應代理伺服器指南。
配置文檔位於產品支援頁面:https://www.cisco.com/c/en/us/support/security/stealthwatch/series.html
啟用代理分析程式調試
以root使用者身份訪問流量收集器控制檯,或者從sysadmin登入後可以訪問的System Configuration選單中開啟一個根shell。
使用建立空配置檔案 touch /lancope/var/sw-flow-proxyparser/config/a.xml
指令。
741fc:~# touch /lancope/var/sw-flow-proxyparser/config/a.xml
741fc:~#
注意:配置檔案可以具有任何名稱。配置檔案按字母順序載入,因此,在b.xml中定義的設定會覆蓋從a.xml載入的相同設定。
使用vi /lancope/var/sw-flow-proxyparser/config/a.xml命令編輯a.xml檔案並輸入配置示例。
提示:按「i」鍵進入vi中的插入模式。按Esc鍵退出vi中的插入模式。鍵入「:wq」儲存並退出vi。鍵入「:q!」退出vi並放棄更改。
<command-line>
<param>--loglevel</param>
<param>com.lancope.sws.syslogprocess.handlers=DEBUG</param>
</command-line>
儲存配置檔案後,使用systemctl restart sw-flow-proxyparser 命令重新啟動代理分析器服務
741fc:~# systemctl restart sw-flow-proxyparser.service
741fc:~#
使用tail -f /lancope/var/sw-flow-proxyparser/logs/syslogprocessor.log命令監控代理日誌解析錯誤的日誌檔案。
更多的描述性資訊被新增到syslogprocessor.log日誌檔案中,該檔案可以指示接收到的代理消息資料中錯誤的來源。
如果未看到調試消息,則使用此替代配置,這是舊版本所必需的。
<command-line>
<param>--loglevels</param>
<param>com.lancope.sws.syslogprocess.handlers=DEBUG</param>
</command-line>
禁用代理分析程式調試
運行rm -i /lancope/var/sw-flow-proxyparser/config/a.xml命令,並在提示刪除配置檔案時輸入y。
741fc:~# rm -i /lancope/var/sw-flow-proxyparser/config/a.xml
rm: remove regular file '/lancope/var/sw-flow-proxyparser/config/a.xml'? y
741fc:~#
使用systemctl restart sw-flow-proxyparser 命令重新啟動代理分析器服務。
741fc:~# systemctl restart sw-flow-proxyparser.service
741fc:~#
調試配置已刪除。